# Chapter 3. Using KDE su

Usage of KDE su is easy. The syntax is like this:

       1 $ kdesu [USER] [-ntqd] [-f FILE] -c
       2  COMMAND [ARG1 [ARG2 [...]]]
       3 $ kdesu -v|-h|-s
       4

The command line options are explained below.

-c PROGRAM

  This specifies the program to run as root. It has to be passed in one argument. So if, for example, you want to start a new file manager, you would enter at the prompt:

         1 $ kdesu -c "kfm -sw"
         2

-f FILE

  This option allow efficient use of KDE su in .desktop files. It tells KDE su to examine the file specified by FILE. If this file is writable by the current user, KDE su will execute the command as the current user. If it is not writable, the command is executed as user USER (defaults to root).

  FILE is evaluated like this: if FILE starts with a "/", it is taken as an absolute filename. Otherwise, it is taken as the name of a global KDE configuration file. For example: to configure the K display manager, kdm, you could issue a:

         1 $ kdesu -c kdmconfig -f kdmrc
         2

-t

  Enable terminal output. This disables password keeping. This is largely for debugging purposes; if you want to run a console mode app, use the standard "su" instead.

-n

  Do not keep the password. This disables the "keep password" checkbox in the password dialog.

-q

  Be quiet.

-d

  Show debug information.

-v

  Print version information and exit.

-h

  Print some help.

-s

  Stop the kdesu daemon. See Section 5.4.