Remote Desktop Ubuntu RDP

In order to allow remote desktop after screen locks, you need to install an gnome extension:
Refer: https://blog.mruckman.com/2024/01/rdp-stops-working-when-screen-locks-turns-off-ubuntu-22-04/

Works as of 2019-09-21
Refer: https://askubuntu.com/questions/1133134/remote-desktop-hang-os-or-block-all-the-connections

Did not try this one yet, keeping for reference
Refer: https://linuxize.com/post/how-to-install-xrdp-on-ubuntu-20-04/

No need to install repository for Ubuntu 21.10. Also, when connecting, you need to be logged off of the target system.

sudo add-apt-repository ppa:martinx/xrdp-hwe-18.04 -y
sudo apt-get update
sudo apt-get install xrdp
sudo systemctl enable xrdp

I then rebooted my computer, and then look at the following place in settings for Ubuntu 24.04, and you need to change the password, or at least learn it. It's auto generated. You also need to enable remote logon, and not just desktop sharing.

System, Remote Desktop

If you need to uninstall:

sudo apt-get purge --autoremove xrdp

xRDP – The Infamous “Authentication Required to Create Managed Color Device” Explained - Current Bug

Refer: http://c-nergy.be/blog/?p=12073

Older Notes, No Longer Works

Refer: https://www.makeuseof.com/tag/how-to-establish-simple-remote-desktop-access-between-ubuntu-and-windows/

Real Remote Desktop client from windows works better, reboot the laptop and also you will get some error prompt, hit enter to get past the blank page.

For Remmina, you need to connect with Xorg, and at least 24-bit color

Get your IP address
$ ifconfig

Install xrdp
$ sudo apt-get install xrdp

Start xrdp
$ sudo systemctl enable xrdp

RDP stops working when screen locks / turns off Ubuntu 22.04

Refer: https://www.youtube.com/watch?v=63uppKZ_Alk

On PopOS 22.04 I installed the application with Firefox, it seems like newer versions of Ubuntu required me to use Chrome, instead.

sudo apt-get install chrome-gnome-shell

GNOME Shell Integration Chrome Exention
https://chromewebstore.google.com/detail/gnome-shell-integration/gphhapmejobijbbhgpjhcjognlahblep?pli=1

https://extensions.gnome.org/

Search For: Allowed Locked Remote Desktop

Maybe this: https://extensions.gnome.org/extension/4338/allow-locked-remote-desktop/

RDP In Ubuntu with VirtualBox

Sometimes the display gets a bit wonky when using Ubuntu in VirtualBox and using RDP, install the following to fix the resolution detection and display.

$ sudo apt-get install virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11

MSTSC / RDP Shortcut Keys

Here's the full list of RDP/MSTSC shortcut hot keys for future reference

ALT+PAGE UP
Switches between programs from left to right.

ALT+PAGE DOWN
Switches between programs for right to left.

ALT+INSERT
Cycles through the programs in the order they were started.

ALT+HOME
Displays the Start menu.

CTRL+ALT+BREAK
Switches the client between full-screen mode and window mode.

CTRL+ALT+END
Brings up the Windows Security dialog box.

ALT+DELETE
Displays the Windows menu.

CTRL+ALT+MINUS SIGN (-)
Places a snapshot of the active window, within the client, on the Remote Desktop Session Host (RD Session Host) server clipboard (provides the same functionality as pressing ALT+PRINT SCREEN on the local computer).

CTRL+ALT+PLUS SIGN (+)
Places a snapshot of the entire client windows area on the RD Session Host server clipboard (provides the same functionality as pressing PRINT SCREEN on the local computer).

Remote Into a VirtualBox Appliance

The "magic sauce" is to remote into a headless appliance that way your remote session will automatically re-size. If you launch the appliance with VirtualBox locally and then remote into you cannot re-size it.

The alternative is to use VBoxHeadless directly, as follows:
C:\Program Files\Oracle\VirtualBox\VBoxHeadless.exe --startvm "Image Name"

Trouble Shooting

Make sure to turn off 3D video acceleration, it was causing a window to appear on my Windows 7 host, and it interfered with the remote connection.

Had trouble connected to my VM on my LAN, there were multiple Firewall rules with Windows 7.  Ended up deleting all of the rules for both Virtual Box and Headless, and when things started again, it allowed access.  That fixed the problem.