Linux command
gksu 命令
文本
复制后可按需替换文件名、目录或参数。
常用示例
Example
gksu -u [userid] [command]
Example
gksu -u [userid] -k [command]
Example
gksu -u [userid] -w [command]
Example
gksu -u [userid] -S [command]
Example
gksu -u [userid] -d [command]
说明
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.
参数
- -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
FAQ
What is the gksu command used for?
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.
How do I run a basic gksu example?
Run `gksu -u [userid] [command]` in a terminal, then adjust file names, paths, flags, or remote targets for your system.
What does -u, --user _USER_ do in gksu?
Run command as specified user (default: root)