Convincing GNOME to allow remote desktop when screen is locked

By | June 5, 2021

Recent releases of GNOME on Ubuntu, and presumably in other distributions as well, finally support remote access to your GNOME desktop on both Xorg and Wayland from a VNC client. However, they do not allow you to connect to your desktop when it is locked, and similarly if your desktop locks — either because you lock it manually or because you have it configured to look after a certain amount of idle time — while you are connected, you’re disconnected.

There are legitimate security reasons for this: if you connect to a locked desktop remotely and unlock it, then it’s unlocked both in the remote desktop session and locally, which means anyone with physical access to your computer can walk up to it and mess around.

However, although there are obviously circumstances when this isn’t a substantive concern, the GNOME maintainers have not (yet) added a configuration session for people to allow remote connections to their locked desktop if they feel it is safe to do so.

I’ve written a GNOME Shell extension to do this. When the extension is installed and enabled, you are able to connect remotely to your locked desktop; when it’s not, you can’t. It’s that simple.

Enjoy!

Print Friendly, PDF & Email
Share

3 thoughts on “Convincing GNOME to allow remote desktop when screen is locked

  1. Victor

    Hello.
    I just upgraded to Fedora 35 which comes with Gnome 41.
    Do you have any plans to upgrade the extension to make it work with Gnome 41?
    Thank you.

    Reply
    1. jik Post author

      I don’t have access to a machine with GNOME 41 yet (I use Ubuntu, not Fedora, and even Ubuntu Jammy doesn’t have GNOME 41 in it yet), so I can’t test myself, but it’s likely that it’ll keep working in GNOME 41 if I just add GNOME 41 to the list of supported versions, so here’s a version of the extension that does that:

      https://drive.google.com/file/d/1Q8YeWslawRdE65oVB1OAcrpBVrrIDnbo/view?usp=sharing

      Can you test and let me know?

      You should be able to do:

      1. Download the zip file linked above and save it somewhere local.
      2. gnome-extensions uninstall allowlockedremotedesktop@kamens.us
      3. Restart GNOME shell (either Alt-F2 R RET if you’re using Xorg, or log out and log back in if you’re using Wayland).
      4. gnome-extensions install zip-file-path
      5. Restart GNOME shell again.
      6. See if it works and let me know.
      Reply

Leave a Reply

Your email address will not be published.