Last active
February 27, 2018 17:36
-
-
Save vilmibm/13d935e5617486c9dba3b9ecbbf3e3cb to your computer and use it in GitHub Desktop.
This file contains 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
# CARDBOARD VR VNC TETHERING | |
_find_ip () { | |
# tethering always sets ip to the below prefix | |
ip addr | grep enp | grep -Eo "inet 192.168.42.[0-9]+" | grep -Eo "192.168.42.[0-9]+" | |
} | |
start_vnc () { | |
tethering_ip="$(_find_ip)" | |
if [ -z "$tethering_ip" ]; then | |
echo "could not find tethering IP. Are you USB tethered?" | |
else | |
x11vnc -auth /home/vilmibm/.Xauthority -scale 2/3 -allow "192.168.42." -bg 2&>/dev/null | |
echo "VNC running at $tethering_ip. Don't forget to use 64 colors on the VR VNC client." | |
fi | |
} | |
stop_vnc () { | |
killall x11vnc | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment