Last active
September 4, 2018 01:01
-
-
Save prozacgod/6c7ba261e8ba7fa0dcc88e0f7e9be1ff to your computer and use it in GitHub Desktop.
Just a quicky that I use to get my xauthority file remotely, combined with other script or things like x11vnc, helps when I'm remote and need to login through gdm too
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 | |
OWNER=`id -u` | |
if [[ -n "$1" ]]; then | |
OWNER=$1 | |
fi | |
ps ax | grep auth | grep $OWNER | python -c "import sys; print sys.stdin.read().split('-auth ')[1].split(' ')[0]" | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment