• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 496
  • Last Modified:

No xinitrc file for users - I want root to be the user

OK, when I remote into my linux box as root, I want to be able to start the xWindow on start up.  I do not have a xinitrc file, do not know what's supposed to be in it aside from the startx command and do not know where to put it so that any user who logs on gets the windows x.

Can someone help me?  Thanks!

0
foreverdita
Asked:
foreverdita
  • 3
  • 3
1 Solution
 
willy134Commented:
what distribution of linux are you using?  What do you want to start?  How are you remoting into your box?  Are you do xdmcp queries?

Try this put

startkde

in a file called .xinitrc in your home directory.
0
 
foreverditaAuthor Commented:
Please forgive my ignorance - I have never used Linux before.  Do I name the file .xinirtc?  If so, how do I create that file using a linux command?
0
 
foreverditaAuthor Commented:
I want to start windows x - it says to put this line in my .xinitrc file, which I do not have.

/usr/share/xpde/bin/startxpde

0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
willy134Commented:
yes name the file .xinitrc

Just open up and editor and do it.

vi example

vi .xinitrc
---it will start vi (a console based editor)
then type in

i                                     ----starts insert mode
/usr/share/xpede/bin/startxpde

escape button then type :x (colon x)
that should create the file for you.
0
 
foreverditaAuthor Commented:
OK, I did that.  And now when I go to the box, it should give me the xpde, correct?
0
 
ttimonenCommented:
You don't really want to run X session as root.
0
 
willy134Commented:
ttimonen is right you don't want to do that....

However, we can't stop you.

now if you are running an xserver on the machine you are logging in from you can log in and hopefully xpde runs.

If you are running from windows you might want to look into vnc.  http://www.realvnc.com

then log into your linux box and run vncserver  (set up password)
then kill it with
vncserver -kill :1
then go to your .vnc directory and edit the xstartup file to point to xpde instead of twm
then run vncserver again

from your windows machine run vncviewer adn connect to
youlinux.box.domain:1

that should be what you want.

Just be very careful.  Root has a lot of power and linux gives you plenty of rope to hang yourself.

I usually run su or sudo
su will let you change a terminal session to a root terminal session and sudo will let you run program with root permissions.

look at /etc/sudoers to see how to set up sudo


good luck
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now