Page 1 of 1

StartX won't run under sudo

Posted: Mon Dec 24, 2012 3:06 am
by hotwires81
I have the latest Raspbian image on my SD card (2012-12-16) and When I enter "sudo startx" I get this msg: xinit: Unable to run program "/usr/bin/xterm/": No such file exists. I never had this problem with the earlier version of raspbian. Please help! I need LXDE to run with root privileges

Re: StartX won't run under sudo

Posted: Mon Dec 24, 2012 4:18 am
by malakai
running startx under sudo is not recommended. I believe if you were to do it it would be sudo -H startx would need to look it up under the man sudo unless things have changed. What are you needing to do as root in X.

Re: StartX won't run under sudo

Posted: Mon Dec 24, 2012 4:20 pm
by hotwires81
malakai wrote:running startx under sudo is not recommended. I believe if you were to do it it would be sudo -H startx would need to look it up under the man sudo unless things have changed. What are you needing to do as root in X.
when running Apache2 I like to use file manager to move webpage files in and out of the /var/www folder from USB drive. I compose pages on a Mac with iWeb and load them into RPi to test. I'm sure this can be done at the prompt with various linux commands, however I find it easier to have read/write privledges in startx and use the mouse to move files.
It worked on my old RPi/SD card. I bought a 512 MB RPi and wanted the lastest OS but lost my sudo startx capabilites. I'll try the -H. Thanks

Re: StartX won't run under sudo

Posted: Mon Dec 24, 2012 4:25 pm
by ShiftPlusOne
Moved from 'Forum glitches'.

Starting X as root is a Bad Idea™. If you must use a file manager as root, run X normally, open up a terminal window and run the file manager as root.

Re: StartX won't run under sudo

Posted: Mon Dec 24, 2012 5:01 pm
by hotwires81
what is the terminal command for file manager? I would just need put "sudo" in front o that command?

Re: StartX won't run under sudo

Posted: Mon Dec 24, 2012 5:10 pm
by dancytron
hotwires81 wrote:what is the terminal command for file manager? I would just need put "sudo" in front o that command?
Yes. Even better, make shortcuts for sudo file manager and sudo editor on your desktop by editing the shortcut and just adding sudo in front of the command

Re: StartX won't run under sudo

Posted: Mon Dec 24, 2012 6:01 pm
by JeremyF
dancytron wrote:
hotwires81 wrote:what is the terminal command for file manager? I would just need put "sudo" in front o that command?
Yes. Even better, make shortcuts for sudo file manager and sudo editor on your desktop by editing the shortcut and just adding sudo in front of the command
When you are in X and need to run the filemanager as root, you can type "sudo pcmanfm" in a terminal emulator.

Re: StartX won't run under sudo

Posted: Fri Jul 05, 2013 10:42 am
by penguinmanraspberry
malakai wrote:running startx under sudo is not recommended. I believe if you were to do it it would be sudo -H startx would need to look it up under the man sudo unless things have changed. What are you needing to do as root in X.
I want to run everything as Super user, I want X to be root, and to have complete read write access to all files automatically. Why ?, because we are using the raspberry pi to do things like control a brew fridge, or a fish tank pond. Why ? because it cost 35 dollars and the whole operating system is running on an SD card from the grocery store. Linux Gurus get jumpy at the mention of root privileges. We are not administering the pay roll server of the FBI. And I don't care if I' big-time crash' my model train controller. Typing in a password every time we need to change something or getting access-denied when installing (qt creator for example) can become tiresome.