如何通过终端设置vino的密码?

SaT*_*aTa 6 vnc gnome-terminal password vino 18.04

如何在 Ubuntu 18.04 中通过终端设置 vino 的密码?

在这里它使用vino-passwd命令,但这给了我vino-passwd: command not found.

pro*_*ous 11

我没有在 18.04 上专门尝试过,但我过去曾成功地使用 gsettings 来做到这一点:

gsettings set org.gnome.Vino vnc-password $(echo -n 'mypasswd'|base64)
Run Code Online (Sandbox Code Playgroud)

VinoArch Wiki描述了一些其他有用的选项,您可以使用 gsettings 进行修改。我的标准集是:

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 ]"
Run Code Online (Sandbox Code Playgroud)

同样,上述内容未在 18.04 上进行测试,因此您的里程可能会有所不同。

  • 如果您在前面添加一个空格,您的 shell 可能不会保存命令。[参考](https://unix.stackexchange.com/questions/115917/why-is-bash-not-storing-commands-that-start-with-spaces) (4认同)
  • 最后 3 行对您的标准设置的意图是什么? (2认同)