Skip to content

Instantly share code, notes, and snippets.

@tech-nickel
Forked from mauron85/launchvnc.sh
Created June 22, 2020 16:30
Show Gist options
  • Save tech-nickel/0f4ae9e13bfac1ad7c513d2a086b8f8d to your computer and use it in GitHub Desktop.
Save tech-nickel/0f4ae9e13bfac1ad7c513d2a086b8f8d to your computer and use it in GitHub Desktop.
Launch vino vnc server without configuring it first
#!/bin/bash
# This script should have been runned by user (non root)
# In case of errors like cannot open display:
# 1. Change DISPLAY=:0 for actual working display
# 2. Check (and change) permissions of files and dirs in user home dir
# specialy when you run this script as root by accident
# sometimes dirs like .dconf may be owned as root.
# As result vino server will not run under user privileges
dbus-launch --exit-with-session gsettings set org.gnome.Vino enabled true
dbus-launch gsettings set org.gnome.Vino authentication-methods "['vnc']"
dbus-launch gsettings set org.gnome.Vino vnc-password $(echo -n "mypassword"|base64)
dbus-launch --exit-with-session gsettings set org.gnome.Vino require-encryption false
dbus-launch gsettings set org.gnome.Vino prompt-enabled false
DISPLAY=:0 /usr/lib/vino/vino-server
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment