gksudo and kdesudo commands are okay, if we whether work in
GNOME or KDE environments, or are satisfied with the number of required dependencies.
However, these pacakges are pretty cumbersome, if we want just a lightweight GUI
version of sudo, especially on non-GTK/non-KDE environments like Xfce. In this post
I'll show a simple GUI front-end I use on my Xfce setup.
Steps:
- Install x11-ssh-askpass or similar.
- Create
~/bin/xsudoexecutable with the following contents:#!/bin/bash - sudo -A $@
- Set the
$SUDO_ASKPASSenvironment variable in some initialization script (e.g.~/.xinitrc, ~/.bash_profile, ~/.bashrcetc.):export SUDO_ASKPASS="/usr/bin/x11-ssh-askpass"
Alternatively, put the following into/etc/sudo.conffile:Path askpass /usr/bin/x11-ssh-askpass
(Make sure to adjust the path.)
xsudo command just as if it were gksudo or kdesudo.
No comments :
Post a Comment