gksu
TLDR
Run a command as a specific user
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-w, --su-mode
Force use of su for authentication-S, --sudo-mode
Force use of sudo for authentication-d, --debug
Output debug information-m, --message MSG
Custom message in password dialog-D, --description DESC
Description for the command being run
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.


