How to set vino's password through terminal?
13,583
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.
Author by
SaTa
Updated on September 18, 2022Comments
-
SaTa over 1 year
How can one set vino's password through terminal in Ubuntu 18.04?
Here it uses
vino-passwd
command, but this gives mevino-passwd: command not found
. -
SaTa about 5 yearsThanks. With the command mentioned above, the password ("mypasswd" in this case) would get stored in the terminal history, right? Is this good practice?
-
SaTa about 5 yearsDo you know of other commands that would take in the password as you secretly type it in like what happens when one tries
sudo
for the first time in a terminal. -
proximous about 5 yearsYour shell probably doesn't save commands if you add a blank space to the front. Reference
-
SaTa about 5 yearsWhat are intents of the last 3 lines on the standard settings you have?
-
proximous about 5 yearsNot 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.
-
SaTa about 5 yearsThanks a lot. Last question, would setting require-encryption to false be a security risk or not a major one?