hotwires81
Posts: 5
Joined: Wed Dec 12, 2012 12:58 am

StartX won't run under sudo

Mon Dec 24, 2012 3:06 am

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

User avatar
malakai
Posts: 1382
Joined: Sat Sep 15, 2012 10:35 am
Contact: Website

Re: StartX won't run under sudo

Mon Dec 24, 2012 4:18 am

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.
http://www.raspians.com - always looking for content feel free to ask to have it posted. Or sign up and message me to become a contributor to the site. Raspians is not affiliated with the Raspberry Pi Foundation. (RPi's + You = Raspians)

hotwires81
Posts: 5
Joined: Wed Dec 12, 2012 12:58 am

Re: StartX won't run under sudo

Mon Dec 24, 2012 4:20 pm

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

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4766
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: StartX won't run under sudo

Mon Dec 24, 2012 4:25 pm

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.

hotwires81
Posts: 5
Joined: Wed Dec 12, 2012 12:58 am

Re: StartX won't run under sudo

Mon Dec 24, 2012 5:01 pm

what is the terminal command for file manager? I would just need put "sudo" in front o that command?

dancytron
Posts: 51
Joined: Sun May 06, 2012 11:09 pm

Re: StartX won't run under sudo

Mon Dec 24, 2012 5:10 pm

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

JeremyF
Posts: 515
Joined: Wed Jan 25, 2012 9:06 pm
Contact: Website

Re: StartX won't run under sudo

Mon Dec 24, 2012 6:01 pm

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.
{sig} Setup: Original version Raspberry Pi (B, rev1, 256MB), Dell 2001FP monitor (1600x1200), 8GB Class 4 SD Card with Raspbian and XBMC, DD-WRT wireless bridge

User avatar
penguinmanraspberry
Posts: 12
Joined: Fri Jul 05, 2013 10:31 am

Re: StartX won't run under sudo

Fri Jul 05, 2013 10:42 am

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.

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 48 guests