Last active
February 4, 2016 07:27
-
-
Save jettero/0d0be0fa3582ca0c9e96 to your computer and use it in GitHub Desktop.
Chrome Remote Desktop, actual remote desktop instead of a remote X session
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
#!/bin/bash | |
ACTUAL_DISPLAY=:0 | |
NUM=$(echo $DISPLAY | sed s/://) | |
PORT="55$NUM" | |
TARGET=127.0.0.1:$PORT | |
function killthemall() { | |
echo;echo "-----------------:= $(date) killing all running vncviewers and x11vncs" | |
for tokill in x11vnc vncviewer; do | |
while killall $tokill; do | |
echo killed some $tokill | |
done | |
done | |
} | |
echo;echo | |
echo;echo "-----------------:= $(date) starting $0" | |
killthemall | |
echo;echo "-----------------:= $(date) starting vncviewer" | |
vncviewer -encodings 'copyrect tight zrle hextile' \ | |
-fullscreen -truecolour -compresslevel 0 -quality 9 \ | |
-listen \ | |
& | |
echo;echo "-----------------:= $(state) starting x11vnc in connect mode, target=$TARGET" | |
x11vnc -nopw -display $ACTUAL_DISPLAY \ | |
-noxrecord -noxfixes -noxdamage \ | |
--connect_or_exit 127.0.0.1:$PORT | |
echo;echo "-----------------:= $(state) x11vnc stopped, shutting down $0" | |
killthemall | |
echo;echo |
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
export CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES=3840x1080 | |
export CHROME_REMOTE_DESKTOP_LOG_FILE=~/.chrome-remote-desktop.log |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment