Results 1 to 9 of 9
  1. #1
    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

  2. #2
    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

  3. #3
    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

  4. #4
    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.

  5. #5
    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

  6. #6
    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

  7. #7
    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

  8. #8
    ASCII Moderator
    Overclockers.com Lead Editor

    splat's Avatar
    10 Year Badge
    Join Date
    Apr 2002
    Location
    Philly
    Author Profile
    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


  9. #9
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •