Solved

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

Posted on 2004-08-23
7
482 Views
Last Modified: 2010-05-18
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
Comment
Question by:foreverdita
  • 3
  • 3
7 Comments
 
LVL 5

Expert Comment

by:willy134
Comment Utility
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
 

Author Comment

by:foreverdita
Comment Utility
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
 

Author Comment

by:foreverdita
Comment Utility
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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 5

Expert Comment

by:willy134
Comment Utility
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
 

Author Comment

by:foreverdita
Comment Utility
OK, I did that.  And now when I go to the box, it should give me the xpde, correct?
0
 
LVL 1

Expert Comment

by:ttimonen
Comment Utility
You don't really want to run X session as root.
0
 
LVL 5

Accepted Solution

by:
willy134 earned 500 total points
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now