Sponsored Links

Maxabout.com > Tips

Kdesu And Gksu

Added on:9/1/2008 11:34:22 PM
In Linux Tips
 Rated by 1 users


    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.

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

  2. 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:
    CODE
    $ kdesu kedit /etc/X11/xorg.conf

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

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


Sponsored Links
Tools
Bookmark/Discuss