Some apps are already setup to open as root such as Synaptic, gparted, and Root Terminal. Normally they use something like su-to-root -X -c. Synaptic is one app that I can think of that does it that way, if you look at Synaptic in /usr/share/applications and open it with a text editor you see Exec=su-to-root -X -c /usr/sbin/synaptic.
sux - wrapper around su which will transfer your X credentials
Proper use of sux (note not installed by default):
Code: Select all
sux
root@craigevil:/home/craig# gedit
su - change user ID or become superuser
You can use su like this:
Code: Select all
su -
Password:
root@craigevil:~# gedit
gksu - GTK+ frontend for su and sudo
gksu is a frontend to su and gksudo is a frontend to sudo.
Their primary purpose is to run graphical commands that need root without the need to run an X terminal emulator and using su directly.
Proper gksu use:
Code: Select all
gksu gedit
kdesu - Runs a program with elevated privileges
Proper kdesu use in KDE:
Code: Select all
kdesu kwrite
sudo, sudoedit - execute a command as another user
sudo allows a permitted user to execute a command as the superuser or another user, as specified in the sudoers file.
Note sudo is installed on most Debian installs but is not setup in order to use sudo it needs to be setup properly using visudo.
Sudo Setup Guide - http://www.linuxhelp.net/guides/sudo/
Using sudo - http://aplawrence.com/Basics/sudo.html
sudo - Debian Wiki - http://wiki.debian.org/sudo
To keep from having issues with permissions please use gksudo or kdesudo.
See Running Sudo Graphically - http://www.psychocats.net/ubuntu/graphicalsudo for why.
Code: Select all
gksudo foo
Code: Select all
kdesudo foo
You can also use most file managers to navigate to the file you want to edit then right click and choose Edit as root. Or in the case of pcmanfm, Tools>open folder as root then click the file to edit with the default text editor. Nautilus and Konqueror have open as root and edit as root options.
If not you can download "service menus" from places like
http://kde-apps.org/
http://gtk-apps.org/
http://www.gnomefiles.org/
http://cli-apps.org/
Each command has a man page:
man sux
man sudo
man gksu
man kdesu
man su
Other helpful links:
Disallow SuToRoot on Debian - wiki.welmers.net - http://wiki.welmers.net/en/Disallow_SuToRoot_on_Debian
sudo setup - http://forums.debian.net/viewtopic.php?f=16&t=45390
Providing root privileges for users Using SUDO -- Debian Admin - http://www.debianadmin.com/providing-ro ... -sudo.html