My main computer is dual boot (Ubuntu 20.04, Windows 10) and connected to our family TV. Sometimes I'm working on something and somebody else wants to use the TV so I have to leave it as they switch over to the cable box. If I'm logged into Windows 10, I can just go to my Ubuntu laptop, open Remmina, start an RDP session, and everything I was working on pops up exactly as I left it on my laptop. I'm still logged in, all my windows are still open, etc.
However, if I'm logged into Ubuntu on the TV, I can't seem to find a setup that works the same. VNC seems useless because my laptop resolution is so much smaller than the computer I'm connecting to, so I can only see a small portion of my screen. I tried installing xrdp and remoting in that way, but when I do, I can't see any of my previously open windows. It's as if I'm being logged into a different user or session. To make things worse, if I had Firefox open on the main computer I can't open it on the laptop because it says there's already an instance open even though I can't see it.
I'm just looking for a setup that works just like my Ubuntu laptop remoting into a Windows 10 session. Any help is much appreciated. Thanks!
51 Answer
Limitation of Gnome
Xrdp (the RDP protocol) works differently in Windows and in Ubuntu. In particular, gnome does not allow xrdp to access an existing local session. In other words, you can use xrdp only when you are logged out of the local session. Similarly, if you remain logged in remotely using xrdp, you won't be able to login to the deskop locally until you logout or kill the remote session from the terminal.
VNC Option -geometry
You can add the -geometry WxH option to the VNC server startup script. Where W is the width of your laptop screen and H is the height. For example, my laptop has the native resolution of 1366x768. So, I can use -geometry 1366x768. This scales everything down to fit my laptop but it makes the words on the remote screentoo small for me to read.
Other Software
There are some closed-source but free for non-commercial use software you can try.
I have not tried NoMachine. I have tried both AnyDesk and TeamViewer and they both work. I like AnyDesk because it is a leaner app as compared with TeamViewer and NoMachine. for example, the deb file download size of the three apps at the time of this writings are:
- AnyDesk
5.3 MB - NoMachine
47.8 MB - TeamViewer
68.1 MB
AnyDesk
Download and install AnyDesk in both the main computer and the laptop. The same software works as a client and a server. The installation process will add its PPA to the list of repositories, and AnyDesk will be updated like most Ubuntu software.
Unattended Access
By default AnyDesk does not allow unattended access. That is, when someone tries to remotely access your main computer using AnyDesk you will have to accept the connection from within the main computer. This is not possible in your use-case.
Open AnyDesk on your main computer. Click on the "hamburger" menu icon ≡ on the top left corner and click on Settings
Go to the Security tab on the right panel of the Settings window.
You have to click on the Unlock Security Settings and enter your password to get this page to work. Once unlocked you will see a page like this:
Check the Enable Unattended Access box and set a password. If you want you can also enable Two Factor Authentication. This will require installing an app on your phone that can generate two factor authentication tokens, such as Google Authenticator, or Authy.
Finally, note down the AnyDesk ID number of your main computer. You can see it under the This Desk heading on the left panel.
You can close the Anydesk app on the Main computer. The app need not be open for remote access.
On your laptop open AnyDesk and enter the ID number of the main computer in the Remote Desk box on the left panel and click on the Play icon ▶.
Hope this helps