Solved

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

Posted on 2004-08-23
7
483 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
ID: 11874575
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
ID: 11874634
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
ID: 11874647
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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 
LVL 5

Expert Comment

by:willy134
ID: 11875349
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
ID: 11877387
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
ID: 11882302
You don't really want to run X session as root.
0
 
LVL 5

Accepted Solution

by:
willy134 earned 500 total points
ID: 11883713
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Guacamole and browser performance 1 63
Best way to split and output to csv in bash 2 61
Linux Scripting 3 97
How to install Ubuntu 16 in DELL venue 8 pro 20 44
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

910 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

21 Experts available now in Live!

Get 1:1 Help Now