HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

gksu — Frontend for `su`. Allows you to run graphical commands which need root access without having to run

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandfrontendruncliallowsforgksuyou
linux

Problem

How to use the gksu command: Frontend for su. Allows you to run graphical commands which need root access without having to run an X terminal emulator. Note: This command is deprecated in favor of commands like pkexec, and is no longer maintained. See also: gksudo. More information: <https://manned.org/gksu>.

Solution

gksu — Frontend for su. Allows you to run graphical commands which need root access without having to run an X terminal emulator. Note: This command is deprecated in favor of commands like pkexec, and is no longer maintained. See also: gksudo. More information: <https://manned.org/gksu>.

Run a command as a specific user:
gksu {{[-u|--user]}} {{userid}} {{command}}


Run the command while preserving the current environments:
gksu {{[-u|--user]}} {{userid}} {{[-k|--preserve-env]}} {{command}}


Force gksu to use su to run the command:
gksu {{[-u|--user]}} {{userid}} {{[-w|--su-mode]}} {{command}}


Force gksu to use sudo to run the command:
gksu {{[-u|--user]}} {{userid}} {{[-S|--sudo-mode]}} {{command}}


Output debug info for the given command:
gksu {{[-u|--user]}} {{userid}} {{[-d|--debug]}} {{command}}

Code Snippets

Run a command as a specific user

gksu {{[-u|--user]}} {{userid}} {{command}}

Run the command while preserving the current environments

gksu {{[-u|--user]}} {{userid}} {{[-k|--preserve-env]}} {{command}}

Force `gksu` to use `su` to run the command

gksu {{[-u|--user]}} {{userid}} {{[-w|--su-mode]}} {{command}}

Force `gksu` to use `sudo` to run the command

gksu {{[-u|--user]}} {{userid}} {{[-S|--sudo-mode]}} {{command}}

Output debug info for the given command

gksu {{[-u|--user]}} {{userid}} {{[-d|--debug]}} {{command}}

Context

tldr-pages: linux/gksu

Revisions (0)

No revisions yet.