• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

A somewhat comprehensive list of safe su tasks while in X?

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

Misfit138

Member
Joined
Mar 23, 2005
Location
Jersey
I understand there are dangers of logging into the desktop environment as root, but I was wondering if someone might inform me as to some general guidelines to follow as a regular user in X, but logging into konsole as su for certain tasks. (I avoid logging into X as root.)
For instance, while in KDE, I need to be root in konsole to install or remove apps using pacman, after which I logout (or simply close the window.) This type of use hasn't brought me any unexpected results.
For some tasks, like using Kate or Kwrite to edit config files as root, I use 'kdesu' instead of 'su'. This has worked out fine so far as well.
However, I HAVE messed up SUperkaramba twice, with 2 distros, and here is how.
I have had a konsole opened, logged in as root, and did 'reboot'. It seems like kde skips a step of saving something or other, because when I log back in after reboot, the Superkaramba theme I was using would be gone. (And there is nothing I can do, apparently, to get it back. The theme appears to be installed on the 'get new stuff' and can't be re-installed)
I will, needless to say, avoid doing that again in the future, but could someone give me an explanation, and/or some general guidelines to follow while logged in as regular user, but doing su tasks in a konsole?
I have googled this unsuccessfully, as most info is somewhat ambiguous.
Thanks.
 
Using the reboot command will send TERM and then KILL signals to all the currently running processes ready to reboot the machine. The kill signal is probably sent before KDE has a chance to cleanly log out. It is a better idea to log out of KDE first, before rebooting. This can probably be said for any window manager.
 
Flamed_Chip said:
The kill signal is probably sent before KDE has a chance to cleanly log out.

Thanks, I guess that makes sense. I am still learning, slowly, so I will try and remember to avoid rebooting before properly logging out in the future.
I guess I will continue to research what NOT to do as root, while in X. Over my short Linux exposure, I have seen some unexpected behavior from various distros, and can only attirbute it to ignorance on my part, so I'd like to learn as much as I can without breaking anything else. :p
 
Misfit138 said:
Thanks, I guess that makes sense. I am still learning, slowly, so I will try and remember to avoid rebooting before properly logging out in the future.
I guess I will continue to research what NOT to do as root, while in X. Over my short Linux exposure, I have seen some unexpected behavior from various distros, and can only attirbute it to ignorance on my part, so I'd like to learn as much as I can without breaking anything else. :p

Anything that you can run as a user, don't use root. The reason is that it can potentially change your permissions, and the home directory is used for configuration files. Only use sudo for things that require root priviledges.
 
eNightmare said:
Anything that you can run as a user, don't use root. The reason is that it can potentially change your permissions, and the home directory is used for configuration files. Only use sudo for things that require root priviledges.

So I will try everything as regular user first. Good advice. I am sort of learning some things quite backward...How easily this simple guideline eluded me.
I can get through the Arch install (which is pretty hands-on compared to many others I've tried) but simple things like this can throw me for a loop.
Incidently, I installed sudo thru pacman, I like it more than switching back and forth. :p
 
I've never heard of anyone being injured by using su in X, so I think you're safe.

As for not causeing problems, I actually can't think think of anything that has caused me problems through su or sudo just because X was running.
 
Gnufsh said:
I've never heard of anyone being injured by using su in X, so I think you're safe.

As for not causing problems, I actually can't think think of anything that has caused me problems through su or sudo just because X was running.

Thanks for the reply, Gnu.
Well, like I said, since I am still learning, I am just not sure how much of an impact certain tasks, as su, have on stability...but this is pretty good news.
Also, as I stated, I did lose a superkaramba widget by rebooting from konsole as su...and I was quite annoyed because it was a great widget (chilehardware) and no matter what I tried, I could not reinstall it, as the 'get new stuff' wizard still shows it as installed, but I cannot add it to my desktop any longer.
This happened twice, with two different distros, so I attribute it to rebooting from konsole as su, while in KDE. (Something which I won't do anymore)
learning learning learning....

Thanks again for all the replies.
 
rm -rf /

just kidding, thats only safe in CLI

...o man, I am on a roll (DISCLAIMER: seriously, don't ever do that)
 
Back