How to use gnome-remote-desktop persistence session?

Hi all,

I rebased my silverblue installation to the beta channel and the update was really smooth !
Great jobs !

Now, I’m wondering how I can make use of the new feature coming with Gnome 47, namely the gnome-remote-desktop persistence session ?

Is there some configuration to do ?
I have the remote login enabled. and what I tried is just

  1. login with RDP
  2. open some application
  3. then I disconnected without logout
  4. Tried to login again

but I could not get back into my previous session, I was just offered the choice to force kill the previous session and open a new one.

So I’m obviously missing something, and any help regarding this topix would be appreciated !

thanks.

Julien

No solution to this, sorry, but just wanted to confirm that I experience the exact same behaviour.

Hello bro!
I recently solved the same issue, unfortunately “Remote Login” due to some peculiarities (probably Wayland) does not work correctly, and after disconnecting from the session your remote desktop is terminated.
Fedora 40 gnome has a second option, called “Desktop Sharing”.
Irony or another peculiarity, but it will not work as long as the desktop is locked.
You must first log into the desktop and after that “Desktop Sharing” will work, but as soon as you lock the desktop, access to the RDP will disappear and you will have to unlock the desktop again.

This will allow you to use a persistent RDP session without terminating the desktop when disconnecting from RDP.

My solution consists of simulating keystrokes and key input.
You connect via ssh, execute the script, give it the password that it must enter, and it enters the password in the GDM lock window and presses enter, after which your screen is unlocked.
For this I use the ydotool.
I created a simple script that I saved on a PC to which I connect via RDP, and run the script from sudo via ssh.
You can use it for your own purposes.
This script must be saved on the PC to which you will connect via RDP.

#!/bin/bash

echo -n "Enter password to unlock screen(for current user): "
read -s PASSWORD
echo

sudo -S ydotool key 1:1 1:0 && #Automatically presses ESC.
sleep 1 #waits one second.
sudo -S ydotool key 1:1 1:0 && #Automatically presses ESC.
sleep 1 #waits one second.
sudo -S ydotool key 28:1 28:0 && #Automatically presses ENTER.
sleep 2 && #waits two second.
echo $PASSWORD | sudo -S ydotool type $PASSWORD &&
sudo -S ydotool key 28:1 28:0 #Automatically presses ENTER.

This combination of ESC and Enter keys was chosen through practice.
I don’t think this solution is 100% safe, but for now it’s the only way to get a normal working RDP on Wayland, without using third-party tools.

Also keep in mind that if you log in to the desktop without a password, the password for “Desktop Sharing” will be generated a new one each time.
You need to set a permanent password for your user and make sure that when you start your PC, you do not have automatic screen unlocking.
Another feature, if after turning on the PC you did nothing for several minutes, it will go to sleep (or something else) and the script will not work, you will have to reboot and execute the script within the first minute.
My sleep state is disabled everywhere, I don’t know why the PC can go to sleep BEFORE the first login.

2 Likes

Interesting, but not so straightforward to implement with silverblue :confused:

I’m still very novice with atomic and what is the best way to add extra package to the installation.

I’m still looking on how this works, and according to

We need to have the following packages at version >= 47

  • gdm - The GNOME Display Manager
  • gnome-remote-desktop - GNOME Remote Desktop screen share service
  • gnome-session* - GNOME session manager

and unfortunately, on my silverblue 41 beta, the package gdm is still at version 46.2

1 Like