14

Introduction

I am a rather new user of Ubuntu, and I'm trying to set up remote desktop access to my Ubuntu 22.04 in a specific way. I have tried both native GNOME Remote Desktop and XRDP; however, I have not been able to reach the desired behaviour which is the following.

When I work on my Ubuntu desktop, I need to switch between working physically on-site on the desktop and remotely working on the desktop. More importantly, I need to switch between working on-site and remotely without logging out of the user session. Therefore, I need to remote access the running user session on the remote Ubuntu desktop preferably not by a "screen mirror" method. (The same way as you can access the running user session on Windows using Windows RDP.)

Remote access options

I have looked into both the native Remote desktop in Ubuntu 22.04 (GNOME Remote Desktop) and XRDP. If I understand them correctly, they both have disadvantages which prevent me from using them for my specific remote access needs. Please see the overview of the remote access options below, and correct me if I am wrong in something.

GNOME Remote Desktop (GRD)

GNOME Remote Desktop supports a "screen share", also known as "remote assistance" mode, through VNC or RDP. This means that when you connect to the remote desktop using GNOME Remote Desktop, you connect to the existing session of the currently logged user, and you only see a mirrored screen of the user on remote desktop and you can control his mouse and keyboard. It is very similar to Anydesk or Chrome Remote Desktop. The remote desktop can be configured to either of the following:

  • Screen mirror only. This can be achieved by setting Remote Desktop "ON" and Remote Control is "OFF" on the remote desktop.
  • Full screen share (screen mirror + mouse & keyboard control). This can be achieved by setting Remote Desktop "ON" and Remote Control "ON" on the remote desktop.

Advantages:

  • You can connect to an existing session of the user logged on the remote desktop without disrupting it (i.e. without disrupting running processes), see why it is important.
  • The GUI is exactly the same as on the remote desktop because you are seeing the exact copy of the remote screen.

Disadvantages:

  • The remote desktop must be connected to a monitor, and the monitor must be turned on. Otherwise, there would be no screen to mirror back to you.
  • The remote access is much less seamless (compared to, e.g., XRDP) due to the screen mirror. Specifically, when opening and closing windows, the picture is laggy and blurry.
  • Anyone who has physical access to the remote desktop can see what you are doing on the remote desktop, and it it not possible to protect your computer from a local physical intrusion.

The third disadvantage can be partially solved by tweaking various settings but the first two disadvanatages remain.

XRDP

XRDP is very different from GNOME Remote Desktop and similar to Windows RDP. When you remote access the remote desktop using XRDP, you create a new session (log as a new user). The new session acts as a "virtual machine" accesible only to you, which means that whatever you do in the session can only be seen in your client desktop. On the remote desktop, only login screen is visible, and it looks like nothing is happening.

Advantages:

  • The remote desktop does not have to be connected to a monitor because the "virtual machine" is created specifically for your client monitor.
  • The remote access is so seamless that you can not even notice that you are working on remtoe desktop and not local desktop. Specifically, even when opening and closing windows, the picture is super fast and clean.
  • No one (even with physical access to the remote desktop) can see what you are doing on the remote desktop.

Disadvantages:

These disadvantages can be partially resolved by tweaking various settings as can be seen in the links above. However, even after this tweaking, some disadvantages remain.

Windows RDP

Windows RDP cannot be used on Ubuntu (as far as I know), but I present it here because it has the exact functionality that I am looking for.

Windows RDP is similar XRDP. As in the case of XRDP, when you connect to the remote desktop you create a "virtual machine" accesible only to you, which means that whatever you do in the session can only be seen in your client desktop. However, unlike XRDP, Windows RDP allows you to both create a new session (log as a new user) as well as connect to the existing session of the currently logged user. On the remote desktop, the currently logged user is locked out of his account but not logged out which means that the running processes are not disrupted!

Advantages:

  • You can connect to an existing session of the user logged on the remote desktop without disrupting it (i.e. without disrupting running processes).
  • The GUI is exactly the same as on the remote desktop.
  • The remote desktop does not have to be connected to a monitor because the "virtual machine" is created specifically for your client monitor.
  • The remote access is super seamless.
  • No one (even with physical access to the remote desktop) can see what you are doing on the remote desktop.

Disadvantages:

  • none?

As I have come to understand, Windows RDP combines the advantages of both GRD and XRDP without having any of their disadvantages.

My question

When I connect from Ubuntu client to Ubuntu remote desktop, Remmina uses the GRD or XRDP on the remote side and this has the abovementioned disadvantages. However, when I connect from Ubuntu client to Windows remote desktop, Remmina uses the Windows RDP on the remote side and everything is satisfactory.

Is there a way to achieve the desired behaviour for connecting from Ubuntu client to Ubuntu remote desktop?

I would be very grateful for any tips or links to relevant tutorials :)

EDIT 1:

This reddit question (and especially this comment) also nicely describe my problem.

EDIT 2:

I am currently using NoMachine to connect to the remote desktop. Although it is a "screen share" remote access (same as GRD and Anydesk) it does solve the "local physical intrusion" disadvantage by blanking the screen for local user and blocking local inputs. It also partially solves the "seamless" disadvantage. NoMachine is more seamless than GRD or Anydesk. However, since it still is a screen share remote access, it is much less seamless than XRDP or Windows RDP. In future, I may try Vino VNC or RealVNC as recommended by others in hopes that though still a screen share, it will be more seamless.

4 Answers4

3

In a word "No"

When you use Remmina in Ubuntu to connect to a Windows desktop using the RDP protocol, the remote Windows computer acts as a RDP server. It behaves in a specific way, that you describe as "satisfactory".

When you use Remmina in Ubuntu to connect to another Ubuntu desktop using the RDP protocol, the remote Ubuntu computer acts as a xRDP server or the new Gnome Remote Desktop (GRD) server. The xRDP and the GRD servers are not designed to mimic Windows functionality. Even though both Windows and Ubuntu uses the same RDP protocol, the differences in the behavior you have described is due to the differences between the operating systems.

The display systems used in Ubuntu, either XORG or Wayland, are very different from the Windows display system. Because of fundamental differences between Windows and Ubuntu, what you are asking for is not possible.

You have two choices, either use xRDP or use GRD and live with the respective disadvantages. You may also try other closed source desktop sharing apps like Anydesk, but the local visibility and security problem will remain.

Hope this helps

user68186
  • 37,461
1

Try x2go in the standard repositories. You can set up many parameters including desktop sharing xfce etc so you can go in remotely without being seen or affecting the current user. Also can go in as any user. very nice system.

1

Note: This answer does not satisfy my question completely as it does not satisfy the "preferably not by a 'screen mirror' method" part. However, it is the best solution to the problem I have found, and the answer might help others with the same problem.

The only way for a semi-secure and semi-seamless remote connection to an existing user session on a remote Ubuntu desktop is the following.

I use the NoMachine remote access software. It is "screen-share" remote access (same as Anydesk) and not a virtual session (such as Windows RDP) so the remote work is not as seamless as Windows RDP; however, for short time work, the seamlessness is sufficient. The software has an option to blank the screen for local user and block local inputs when remote connection is established, which solves the "local physical intrusion" problem of screen-share remote access. Since it is a screen-share remote access, monitor must be connected to the remote desktop and must be turned on. The issue of power-consumption and screen flashes during start and end of remote session (which might annoy people close to the local machine) can be partially solved by setting brightness, contrast, and RGB values to 0 on the local monitor. Thus, the minotor is (almost) black, but still on.

Setup steps:

  1. Install NoMachine server on the remote desktop.
  2. Set the settings to "Blank the physical screen when somebody connects."
  3. Set the local monitor brightness, contrast, and RGB values to 0.
  4. Connect to the desktop using the remote access.
  5. Work.
  6. Lock the local user session (so that none can use the session locally after you disconnect).
  7. Close the remote session.
1

X2go does what you want,, install it and then for any connection go to session preferences and you can connect as the logged in user shared desktop or in any user or stealth mode in desktop your desktop environment type kde, xfce etc email me if you need additional clarification