Created
January 28, 2016 20:44
-
-
Save cmdcolin/f0e45122f85b3515f0f3 to your computer and use it in GitHub Desktop.
X11 as sudo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # usage: x11sudo.sh username | |
| su - $1 -c 'xauth list' | grep `echo $DISPLAY | cut -d ':' -f 2| cut -d '.' -f 1 | sed -e 's/^/:/'`|xargs -n 3 xauth add |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment