-
-
Save trishmapow/7344e5f1c82684888c36683a024d2111 to your computer and use it in GitHub Desktop.
Activate VNC support in Ubuntu, from command-line (for active sessions)
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/sh | |
# This assumes you have access to the system via SSH already, and need | |
# remote VNC access as the same user, and you want only the primary display. | |
export DISPLAY=:0 | |
# Encoded password with http://www.motobit.com/util/base64-decoder-encoder.asp | |
export VNC_PASSWORD="dm5jX3Bhc3N3b3JkNzE=" # vnc_password71 | |
export VNC_PASSWORD="dm5jX3Bhc3M=" # vnc_password (a character limit is enforced?) | |
# Sadly many common VNC clients don't support encryption. | |
export USE_ENCRYPTION=false # alternatively "true" | |
# Set a bunch of useful defaults. (for remote support cases.) | |
gsettings reset org.gnome.Vino network-interface | |
gsettings set org.gnome.Vino enabled true | |
gsettings set org.gnome.Vino prompt-enabled false | |
gsettings set org.gnome.Vino notify-on-connect true | |
gsettings set org.gnome.Vino require-encryption ${USE_ENCRYPTION} | |
gsettings set org.gnome.Vino vnc-password "${VNC_PASSWORD}" | |
# List all current settings | |
for i in `gsettings list-keys org.gnome.Vino`; do | |
echo $i `gsettings get org.gnome.Vino $i`; | |
done | |
# Run the server | |
/usr/lib/vino/vino-server | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment