6

How can one set vino's password through terminal in Ubuntu 18.04?

Here it uses vino-passwd command, but this gives me vino-passwd: command not found.

11

I haven't specifically tried on 18.04, but I have successfully used gsettings to do this in the past:

gsettings set org.gnome.Vino vnc-password $(echo -n 'mypasswd'|base64)

The Arch Wiki for Vino describes some other useful options you can modify using gsettings. My standard set is:

gsettings set org.gnome.Vino prompt-enabled false
gsettings set org.gnome.Vino authentication-methods "['vnc']"
gsettings set org.gnome.Vino require-encryption false
gsettings set org.gnome.Vino vnc-password $(echo -n 'mypasswd'|base64)
gsettings set org.gnome.settings-daemon.plugins.sharing active true
eths=$(nmcli -t -f uuid,type c s --active | grep 802 | awk -F  ":" '{ print "'\''" $1 "'\''" }' | paste -s -d, -)
gsettings set org.gnome.settings-daemon.plugins.sharing.service:/org/gnome/settings-daemon/plugins/sharing/vino-server/ enabled-connections "[ $eths ]"

Again, the above is not tested on 18.04, so your mileage may vary.

6
  • 1
    Thanks. With the command mentioned above, the password ("mypasswd" in this case) would get stored in the terminal history, right? Is this good practice? – SaTa Feb 21 '19 at 3:38
  • 4
    Your shell probably doesn't save commands if you add a blank space to the front. Reference – proximous Feb 21 '19 at 22:49
  • 1
    What are intents of the last 3 lines on the standard settings you have? – SaTa Feb 24 '19 at 18:56
  • 1
    Not sure about 18.04, but "...sharing active true" activated the sharing, "eths=..." finds all the active Ethernet interfaces using the NetworkManager (I had several on different networks), and the last line enabled Vino on all of those interfaces. Without that, it was only available on the 'primary' interface. – proximous Feb 24 '19 at 19:47
  • 1
    Thanks a lot. Last question, would setting require-encryption to false be a security risk or not a major one? – SaTa Feb 24 '19 at 21:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.