gksu
Graphical frontend for su with GTK password dialog
TLDR
SYNOPSIS
gksu [options] command
DESCRIPTION
gksu is a graphical frontend for `su` that prompts for a password using a GTK dialog. It allows running graphical applications with elevated privileges from the command line or menu entries without needing a terminal.The tool can operate in either su mode (authenticate as target user, typically root) or sudo mode (use current user's sudo privileges), with automatic detection based on system configuration.
DEPRECATED: gksu is no longer maintained and has security issues. Use pkexec from PolicyKit for graphical privilege escalation instead.
PARAMETERS
-u, --user USER
Run command as specified user (default: root)-k, --preserve-env
Preserve current environment variables, does not set `$HOME` or `$PATH`-l, --login
Make this a login shell (may cause problems with Xauthority)-w, --su-mode
Force use of su for authentication-S, --sudo-mode
Force use of sudo for authentication-d, --debug
Output debug information-g, --disable-grab
Disable locking of the keyboard, mouse, and focus while asking for the password-P, --prompt
Ask the user before grabbing the keyboard and mouse-m, --message MSG
Custom message in password dialog-D, --description DESC|FILE
Description for the command being run, used in the default message-p, --print-pass
Print the password to stdout, like ssh-askpass
INSTALL
CAVEATS
Deprecated and unmaintained. Running graphical applications as root can cause permission problems with user files (.Xauthority, config files). Modern desktop environments discourage running GUI apps as root entirely.
HISTORY
gksu was created in the early 2000s for GNOME to provide a graphical password prompt for privileged operations. It was deprecated around 2012 in favor of PolicyKit (pkexec), which provides finer-grained authorization controls.
