MacBook Air(macOS Catalina) & Ubuntu 20.04 connected on the same network locally.
- Install XRDP and enable
sudo apt install xrdp
sudo systemctl enable xrdp
sudo systemctl start xrdp
- Allow RDP through the firewall (if enabled)
sudo ufw status
sudo ufw allow 3389/tcp
sudo ufw reload
- Now login through RDP Client.
Sometimes even though the two devices are on the same network, even ping fails. In such cases disable the guest network if created.
One cause of this is that xfce4 has added code that prevents a second session from opening. You will find that if your computer's main screen is logged into xfce4 you may not be able to use it with xrdp.
To solve this "second session" problem and allow as many sessions as you need, edit /etc/xrdp/startwm.sh
and add these lines before the lines that test and execute Xsession. The $HOME/.profile is not part of the solution, but is something that should be run before starting the session anyway.
unset DBUS_SESSION_BUS_ADDRESS
unset XDG_RUNTIME_DIR
Sometimes if the user is not a root user then the rdp session logouts immediately after the desktop is loaded. Probably has some issues with GNOME desktop, so instead use xfce4
. This problem occurs randomly.
- Install xfce4
sudo apt-get install xfce4
Select lightdm.
2. Create xfce
session for each user logging through rdp
echo "xfce4-session" >> /home/username/.xsession
- Login again