Score:0

Make Screen Sharing Active at Ubuntu 20.04 using CLI

in flag

I want to build a script that will make the "screen sharing" through CLI (I have to do it on a lot of computers in the future and I want to add such script to another scripts that will configure the OS),

I currently know how to do it through the GUI: https://linuxhint.com/enable-screen-sharing-ubuntu/

How can I use CLI to make this configuration: using GUI

I don't find on the NET any bunch of instructions that can make it... the most close answer to my question i found is this: Enable remote VNC from the commandline? but it still not triggers the sharing at the GUI.

Score:0
br flag

One step that is not often mentioned is that you need to enable auto login, you can do so by editing the following file:

sudo vi /etc/gdm3/custom.conf

And adding the following lines (or modifying existing vales):

[daemon]
AutomaticLoginEnable=true
AutomaticLogin=myuser

Also sharing has to be enabled for specific network connection(s).

Find the current active "Network Manager" connection UUID via:

nmcli con

You can see the currently shared networks via:

dconf read /org/gnome/settings-daemon/plugins/sharing/vino-server/enabled-connections

If the UUID for the network connection to want to desktop share over is not there add it as follows:

dconf write /org/gnome/settings-daemon/plugins/sharing/vino-server/enabled-connections "['2bae8cfd-0d24-3e0d-ab84-4ae606e11df7']"

Set the password:

PASSWORD="passwordgoeshere"
dconf write /org/gnome/desktop/remote-access/vnc-password \"\'$(echo -n $PASSWORD | base64)\'\"

Set remaining sharing settings:

dconf write /org/gnome/desktop/remote-access/authentication-methods "['vnc']"
dconf write /org/gnome/desktop/remote-access/prompt-enabled false
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.