Remote login to existing Debian desktop session?

Can you keep a secret?

For Christmas this year, my young nephew will be getting his first PC. Both his parents aren’t very computer savvy though, so it will be up to me to teach him how to do stuff. The long story short is that the PC will be running Linux and that I’m also a Linux user.

They live too far away for me to regularly go to their house and update and install stuff, let alone spend time showing my nephew how to do this or that, or edit videos, install Minecraft mods etc.

So I’m looking for some kind of remote desktop solution. I need something that will let me securely connect to his remote system from mine, and enable me to intimate and oversee updates and the like. Crucially though, I want to be able to show him how to do things. Which means that the remote solution can’t be terminal only, and I also need to be able to login remotely whilst he is already logged in locally… to take control of his session basically.

This probably goes without saying but it also needs to be secure. So I thought it might be worth mentioning that I use a pfSense firewall. Perhaps setting up a VPN server might be part of the puzzle?

Create your own public server or use a VPN and host on your private network. Regarding a VPN Protocol, I would suggest wireguard.

1 Like

SSH is the base tool here. By default it wants a password, but you can also set it up with a private/public key. Generate a key pair, then copy the public part to the remote machine. Now you can log in w/o typing the password.

RDP (remote desktop protocol) allows sharing of a desktop environment remotely, VNC is (apparently) often used to implement this. I don’t use it, so can’t comment on ease of use, security, etc.

HTH!

1 Like

SSH with a key is indeed the most secure tool. But OP will also need a reverse proxy or port forwarding in order to reach the machine…

VNC services that come with a reverse proxy is probably the best bet considering OP wants GUI.

I generally prefer VNC over SSH, if setting up a reverse proxy (cloudflare tunnel might also work if you use a port that they support) isn’t an issue

1 Like

Beware vnc opens a new session by default, attaching to an existing desktop session is tricky, but doable.

Rustdesk is like anydesk or teamviewer, but selfhosted and open source. It will most likely run out of the box.

2 Likes

Yeah Rustdesk works for me out of the box. Be aware that for Wayland sessions you will have to be at the computer you’re remoting into the first time to accept the connection from the client, and you will have to repeat that every time you close Rustdesk on the computer you want to remote into (or reboot it obviously). But if you keep Rustdesk running after remoting in once, it will keep accepting connections from your laptop for example. Fully unattended access still seems to be X11 only.

There are probably some workarounds to get fully unattended access going for Wayland as well, but this worked fine for me.

2 Likes

Tailscale + Vnc/Rdp.

It’s best to focus on what will give you 3D acceleration, otherwise it’s just a light slideshow.

2 Likes

Don’t VNC and XRDP depend on … well, X.ORG?
If you go the Wayland route (hello Gnome) those options won’t work.

Whatever solution you end up with, show him how to run Anydesk as a backup option.

1 Like

Or rustdesk: Linux – Documentation for RustDesk

1 Like

When you set it up. You can have it use RDP or VNC. Gnome defaults to RDP if using Wayland.

You can also use the Google Remote Desktop tool. It works completely through the browser.
There is also Discord Desktop and Screen Sharing.

1 Like

If anybody has figured out one of these workarounds, I’d love to hear it. I mainly use sunshine/moonlight (which doesn’t support clipboards) and the KDE RDP server (which hasn’t been super-reliable and has compatibility issues with some RDP clients), but would love to use RustDesk more…except when it doesn’t work I’m usually remote and allowing access isn’t possible. I’d like something that works even after a reboot.

Thank you all for your input and apologies for not replying sooner but I’ve had a lot of stuff on my plate lately.

Rustdesk looks great and I’ll certainly keep it in mind but I’d rather avoid having another service on my server that I have to keep an eye on. I’m trying to cut back on that sort of thing because sometimes it feels too much like work rather than recreation.

If there is a lighter weight, still performant option, then I would prefer it to be honest but Rustdesk is still on my list of candidates though… just not at the top.

I’m also looking into Wireguard. Specifically whether I should go desktop to desktop, or whether I should add pfSense’s Wireguard package into the setup, and just how much access I want someone outside my LAN to have.

I’ve had some issues with Wayland on my desktop, so I do use X11 most of the time. Having my nephew potentially switch back and forth between Wayland and X11 is a possibility but not desirable. Also, unattended access isn’t really an issue because the computer won’t be left on all the time. So when it is on, there will be someone home who can accept the connection.

I’ve got logging into an existing session working with VNC using krfb but even on LAN, performance with Remmina’s settings all left on their defaults is crappy. It’s usable for what I’d need it for but still not exactly pleasant to use.

Thanks for the suggestion. I’ll look into that for sure.

1 Like