Advertisement
Guest User

Untitled

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