Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- # (C) serge 2012
- # The script is licensed to all users of StackExchange family free of charge
- # Fixes/Enhancements to the script are greatly appreciated.
- #
- # SUDO_ASKPASS has to be set to the path of ssh-askpass
- # fix the following two lines if your distribution does not match this autodetection
- . /etc/profile.d/gnome-ssh-askpass.sh
- export SUDO_ASKPASS="${SSH_ASKPASS}"
- SUDOUSERNAME="$1"
- shift
- xauth nlist "${DISPLAY}"|sudo -HA -u $SUDOUSERNAME env --unset=XAUTHORITY \
- bash -c "xauth nmerge - ; $*"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement