Skip to content

Instantly share code, notes, and snippets.

@mauron85
Last active April 6, 2023 08:12
Show Gist options
  • Save mauron85/ad87c587f3f6effb291218cf18213601 to your computer and use it in GitHub Desktop.
Save mauron85/ad87c587f3f6effb291218cf18213601 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
@will-code-for-pizza
Copy link

Hi, does this script still work?
Due to the fact, that many changes happened between 2018-2021, you should check out the functionality f.e. of

gsettings set org.gnome.Vino enabled true

and the new way

dconf write /org/gnome/desktop/remote-access/enabled true

Let me know, if you need support.
Best.
Will Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment