Tips Linux Explorers   All Things Linux Forum   Great Linux Links   Hometown   Email 


The official line for "kdesu" and "gksu" is: "Runs a program with elevated privileges" . . . Now, in real life what does this mean ? Let me have a go at it.

Imagine there is a program or tool you want to run as "root", if this is a command line tool we already know we have to do "su" ( or "sudo" in case of Ubuntu ). But if it is a GUI tool you want to run as root, and you simply do "su" and start the program from the command line there is a big chance you will be presented a screen full of errors ( or even worse get the Xlib Error ).
In these kind of situations the "kdesu" ( for KDE ) and the "gksu" ( for Gnome ) are the ticket.

Here is an example, you are running KDE and you want to open a file in Kedit because you want to have an easy way to edit the ( /etc/X11/xorg.conf ) file as root, what you do is give the following command as user:

$ kdesu kedit /etc/X11/xorg.conf

The "kedit /etc/X11/xorg.conf" part of the command is for opening the file in Kedit, but the "kdesu" that precedes that command triggers a box to pop up where you are asked to give the root-password. After you give the password Kedit will open with the file loaded and you can edit it ( as if you were root ).

The same story goes for the "gksu" command if you are a Gnome user. It avoids error messages and allows you to run any GUI based tool as root without actually having to log out as "user" and log in as "root". . . .  Using kdesu and gksu is a much safer practice.

Keep your system safe.


PS: In some distros "gksu" is replaced by "gnomesu" or "gtksu"

-- Sept 10 2006 --

Tips Linux Explorers   All Things Linux Forum   Great Linux Links   Hometown   Email