Notices

Overclockers Forums > Software > Alternative Operating Systems
Alternative Operating Systems Linux, Mac, Unix Operating Systems and Applications
Forum Jump

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

Post Reply New Thread Subscribe Search this Thread
 
 
Thread Tools
Old 12-04-06, 07:39 AM Thread Starter   #1
Misfit138

 
Misfit138's Avatar 

Join Date: Mar 2005
Location: Jersey

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


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.

__________________
archlinux: Power in simplicity.
Amiga 1000 microATX mod
Misfit138 is offline   QUOTE Thanks
Old 12-04-06, 07:43 AM   #2
Flamed_Chip
Member

 
Flamed_Chip's Avatar 

Join Date: Dec 2001
Location: Yorkshire, UK

 
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.

__________________
Herb: 2 x Intel PIII-S 1.4 GHz - GIGABYTE GA-6VTXDR - 1024MB PC133 - 2 x Tt Volcano 7+ - PCI nVIDIA GeForce fx5500 128MB - 60GB Samsung 7200RPM - 200GB Seagate Barracuda - 500W PSU - Debian GNU/Linux
Wyatt: XP 1800+ @ 1725 (150x11.5) 1.85 vcore - Asus A7V266-E - 512MB DDR PC2100 - SK6 modded for Delta 80mm "SHE" - nVIDIA GF2 MX 400 64MB DDR - 40GB WD 7200RPM - 20GB WD 7200RPM - Generic 300W PSU - Load Temp: 45*C (Ambiant 22*C) - Debian GNU/Linux
Moon: Intel PIII 1GHz - Generic Intel motherboard - 512MB PC133 - 7GB HDD - Generic PSU - FreeBSD
Kaya (laptop): Sony Vaio PCG-GRT815M - P4 2.8Ghz - 512MB DDR - 80GB 5400RPM - nVIDIA GF FX5600 64MB - Ubuntu GNU/Linux / Windows XP
Flamed_Chip is offline   QUOTE Thanks
Old 12-04-06, 10:32 AM Thread Starter   #3
Misfit138

 
Misfit138's Avatar 

Join Date: Mar 2005
Location: Jersey

 
Quote:
Originally Posted by Flamed_Chip
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.

__________________
archlinux: Power in simplicity.
Amiga 1000 microATX mod
Misfit138 is offline   QUOTE Thanks
Old 12-04-06, 09:43 PM   #4
eNightmare
Member

 
eNightmare's Avatar 

Join Date: Feb 2005

 
Quote:
Originally Posted by Misfit138
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.
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 is offline   QUOTE Thanks
Old 12-05-06, 08:33 AM Thread Starter   #5
Misfit138

 
Misfit138's Avatar 

Join Date: Mar 2005
Location: Jersey

 
Quote:
Originally Posted by eNightmare
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.

__________________
archlinux: Power in simplicity.
Amiga 1000 microATX mod
Misfit138 is offline   QUOTE Thanks
Old 12-06-06, 05:54 PM   #6
Gnufsh
Senior Member

 
Gnufsh's Avatar 

Join Date: Dec 2001
Location: June Lake, California

 
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.

__________________
Lost access to the classifieds? Look here.
Forum Policies
Sig Rules

"Men occasionally stumble over the truth, but most of them pick themselves up and hurry off as if nothing ever happened."
-Sir Winston Churchill
Gnufsh is offline   QUOTE Thanks
Old 12-07-06, 07:21 AM Thread Starter   #7
Misfit138

 
Misfit138's Avatar 

Join Date: Mar 2005
Location: Jersey

 
Quote:
Originally Posted by Gnufsh
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.

__________________
archlinux: Power in simplicity.
Amiga 1000 microATX mod
Misfit138 is offline   QUOTE Thanks
Old 12-07-06, 10:33 AM   #8
splat
ASCII Moderator
Overclockers.com Lead Editor


 
splat's Avatar 

Join Date: Apr 2002
Location: Philly

10 Year Badge
 
rm -rf /

just kidding, thats only safe in CLI

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

__________________
______________________________/\/\__________________/\/\_____
_______/\/\/\/\__/\/\/\/\____/\/\____/\/\/\______/\/\/\/\/\__
____/\/\/\/\____/\/\__/\/\__/\/\________/\/\______/\/\_______
_________/\/\__/\/\/\/\____/\/\____/\/\/\/\______/\/\________
__/\/\/\/\____/\/\________/\/\/\__/\/\/\/\/\____/\/\/\_______
_____________/\/\___________
once you clock you can't go stock
[RHCSA, RHCE] || articles || folding stats || overclockers last.fm group

splat is offline Author Profile   QUOTE Thanks
Old 12-07-06, 11:03 AM   #9
Suicide Al
Member

 
Suicide Al's Avatar 

Join Date: Jun 2003
Location: Shawano, WI

 
you could try manually building the widget and installing it that way if you really wanted to.

__________________
Desktop:Asus P5LD2, E2160, 4 Gigs of Memory, Geforce 7200GS, Windows 7 Pro 64 bit, Dual 17" Monitors
Suicide Al is offline   QUOTE Thanks

Post Reply New Thread Subscribe


Overclockers Forums > Software > Alternative Operating Systems
Alternative Operating Systems Linux, Mac, Unix Operating Systems and Applications
Forum Jump

Thread Tools Search this Thread
Search this Thread:

Advanced Search


Mobile Skin
All times are GMT -5. The time now is 02:48 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
You can add these icons by updating your profile information to include your Heatware ID, Benching Profile ID or your Folding/SETI profile ID. Edit your profile!
X

Welcome to Overclockers.com

Create your username to jump into the discussion!

New members like you have made this the best community on the Internet since 1998!


(4 digit year)

Why Join Us?

  • Share experience
  • Max out your hardware
  • Best forum members anywhere
  • Customized forum experience

Already a member?