I set up a automated kickstart-installation based on Fedora 30 (soon 32), now I want to add the enabling of the “Gnome Screen Sharing” to the installation. I got this to work via the settings in the GUI (Settings - Sharing - Screen Sharing) and I’m also able to set the “subsettings” via gesettings, e.g.
gsettings set org.gnome.desktop.remote-desktop.vnc view-only false
gsettings set org.gnome.desktop.remote-desktop.vnc auth-method 'password'
But I wasn’t able to find the setting to enable the “Screen Sharing” itself. When I enable it via the GUI, I can see via systemctl status :
I tried to start this service and also the “daemon” directly with systemctl start, but it only results in Failed to start gnome-remote-desktop-daemon.service: Unit gnome-remote-desktop-daemon.service not found.
There are two quite similar questions on stackexchange, but the seem outdated, because I don’t have a schema “org.gnome.Vino”.
Also i don’t have a vino-server systemctl service, which i could start, like described in a topic here. Has someone an idea how I can start the remote-desktop service?
I’ve invested a lot of time to get this to work and could solve all but one problem. I now know, that I have to start the service as User, so my whole procedure is:
gsettings set org.gnome.desktop.remote-desktop.vnc auth-method 'password'
gsettings set org.gnome.desktop.remote-desktop.vnc view-only false
gsettings set org.gnome.settings-daemon.plugins.sharing.service:/org/gnome/settings-daemon/plugins/sharing/gnome-remote-desktop/ enabled-connections "['$( grep UUID /etc/sysconfig/network-scripts/ifcfg-enp1s0 | cut -d= -f2)']"
# Start the Remote-Desktop-Service
systemctl start --user gnome-remote-desktop
I set it to “password” to not have someone to click on “accept”, “view-only” to “false” to be able to control it and set the UUID of my network-interface. Afterwards I can start the service correctly configured. The last missing step is, that I’m not able to set the password via the commandline. I tried it like for vino and also with secret-tool, but it doesn’t work
gsettings set org.gnome.Vino vnc-password $(echo -n "myPassword"|base64)
secret-tool store (...)
So because in my case I only need a way to check whats on the screen right now, the new approach is, to make a screenshot. But even this is difficult, i guess because of wayland. I tried to start “gnome-screenshot” via cronjob - of course this dosen’t work, although it works when i do this directly in the terminal.
Has someone an idea, how I can take a Screenshot via commandline-SSH-Connection?
Thanks to a guy on stackexchange, I’m now able to get screenshots over SSH. One simply has to set WAYLAND_DISPLAY and gnome-screenshots works:
WAYLAND_DISPLAY=wayland-0
gnome-screenshot
I guess there has to be a Display connected to the client (but I haven’t tested it without) and the screenshots are stored in the Homedirectory of the user under Pictures. An also under wayland working alternative to gnome-screenshot would be “flameshot”, available in the official repositories.
This isn’t a solution for the original question, but a solution for my case. Maybe this helps someone!
Markus thanks for posting this, it helped a lot
I’m running Ubuntu 21.04 though but your tips were invaluable
I have managed to set password with (shall work in Fedora too):
You have to SSH directly to the user that has the gnome-session on the monitor, set WAYLAND_DISPLAY like described and you can take the screenshot with gnome-screenshot and it is stored under Pictures, eg. ~/Pictures/Screenshot from 2021-04-28 07-03-50.png. And that’s it.
I did not manage to do it by SSH to another user and sudo su - logged_in_user to, because it can not connect to the display then.
In my case I take the screenshots with a cronjob and convert them to a smaller size.