Remote access to Windows and Ubuntu test PCs from a Mac
7 November 2026 · John Spurgin
This sets up two cheap desktops, one running Windows 10 Pro and one running Ubuntu 24.04, as headless test machines reached over RDP from a Mac on the same network. Both connect from Microsoft's free Windows App on the Mac, and neither needs a keyboard, mouse or monitor once set up.
Hardware
I used two ex-office Fujitsu Esprimo E910 towers (Core i5-3470, 8GB RAM, 120GB SSD), bought on eBay for £38.95 each with Windows 10 Pro installed. Anything similar works, with two points to check:
- Windows 10 Pro, not Home. Home cannot host Remote Desktop sessions.
- The video outputs. These machines have DisplayPort and DVI, with no HDMI, which matters if you ever need a dummy display plug.
Windows 10 Pro
- Turn on Remote Desktop: Settings -> System -> Remote Desktop.
- Find your network details. Run
ipconfigand note the Default Gateway (the router) and the current address. Don't assume the subnet; home routers commonly use 192.168.0.x or 192.168.1.x. - Set a fixed address: Settings -> Network & Internet -> Ethernet -> your connection -> IP assignment -> Edit -> Manual. Enter an address on the same subnet but outside the router's DHCP range, prefix length
24, and the router's address for both gateway and DNS. - Set the network profile to Private in the same Ethernet settings. On Public, the firewall blocks incoming connections.
- On the Mac, install the Windows App from the App Store and add the PC by its IP address, using the Windows account credentials.
Windows blocks incoming ping by default, so a failed ping proves nothing. Test the RDP port from the Mac instead:
nc -vz <windows-ip> 3389
RDP cannot wake a sleeping PC. Either press the power button when you need it, set up Wake-on-LAN, or turn sleep off from an administrator prompt:
powercfg /change standby-timeout-ac 0
powercfg /change hibernate-timeout-ac 0
Ubuntu 24.04 with xrdp
xrdp gives each connection its own desktop session, independent of the login screen and of any attached monitor.
Install Ubuntu
- Download the latest 24.04.x desktop ISO (
ubuntu-24.04.x-desktop-amd64.iso) and write it to a USB stick with balenaEtcher. - Boot from the stick (F12 for the boot menu on these Fujitsus) and choose Erase disk and install. Leave encryption off: a passphrase at boot stops a headless machine coming back after a reboot.
- Leave automatic login off.
Configure it
-
Update and add SSH:
sudo apt update && sudo apt full-upgrade -y sudo apt install -y openssh-server -
Set a fixed address: Settings -> Network -> Wired -> gear icon -> IPv4 -> Manual, with the same subnet, netmask
255.255.255.0, and the router's address for gateway and DNS. Toggle the connection off and on, then check withhostname -I. -
In Settings -> System -> Remote Desktop, make sure Remote Login and Desktop Sharing are off. They use port 3389, which xrdp needs.
-
Install xrdp:
sudo apt install -y xrdp sudo adduser xrdp ssl-cert sudo systemctl enable --now xrdp -
Give the remote session the standard Ubuntu desktop:
printf 'export GNOME_SHELL_SESSION_MODE=ubuntu\nexport XDG_CURRENT_DESKTOP=ubuntu:GNOME\nexport XDG_CONFIG_DIRS=/etc/xdg/xdg-ubuntu:/etc/xdg\n' > ~/.xsessionrc -
Reboot and leave the machine at the login screen.
Connect from the Mac
In the Windows App, add the Ubuntu machine's IP and log in with your normal Ubuntu username and password.
Saving the credentials in the Windows App works with xrdp, so you are logged straight in. If the text is too small on a high-resolution display, edit the PC in the Windows App and set a lower fixed resolution under Display.
Running headless
-
Stop Ubuntu sleeping. The login screen suspends the machine after about 20 minutes idle, regardless of user settings. Disable sleep system-wide:
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target -
BIOS settings (F2 at boot on these Fujitsus): set power-on after AC loss to On, so the machine restarts after a power cut, and disable any keyboard check.
-
Cold-boot test. Shut down, unplug the keyboard and monitor, power on, and connect from the Mac.
-
Snapshot. Install Timeshift (
sudo apt install timeshift) and take a snapshot of the working setup, so you can roll back after each round of testing.
Managing xrdp sessions
xrdp keeps your desktop session running after you disconnect, and reconnects you to it next time. If a connection drops while the desktop is still starting, the half-started session stays behind and every later connection is sent back to it. The symptom is a connection that opens and then closes after about 20 seconds, with the network and SSH working normally.
List the sessions over SSH:
loginctl list-sessions
Typical output:
| Session | User | Seat | TTY | Meaning |
|---|---|---|---|---|
| 4 | alex | - | pts/0 | SSH login |
| c1 | gdm | seat0 | tty1 | Local login screen |
| c3 | alex | - | - | xrdp desktop |
Identify each session by the service that started it:
for s in $(loginctl list-sessions --no-legend | awk '{print $1}'); do echo "$s: $(loginctl show-session $s -p Service -p Type --value | paste -sd ' ')"; done
- SSH:
sshd tty - xrdp:
xrdp-sesman x11 - Local login screen:
gdm-launch-environment wayland
To see which session the terminal you are typing in belongs to, run echo $XDG_SESSION_ID.
Clear a stuck session by ending the xrdp one, never the SSH one or the gdm login screen:
sudo loginctl terminate-session <session id>
Then reconnect from the Mac for a fresh desktop. Don't terminate an xrdp session you are currently using; it closes that desktop.
Logs for connection problems:
systemctl status xrdp xrdp-sesman --no-pager -l
sudo tail -30 /var/log/xrdp-sesman.log
In the sesman log, reconnected session followed by the client dropping shortly afterwards points to a stuck session.
Notes
- Black screen over xrdp: the same user is logged in at the physical machine. Log out locally and reconnect. A connection that opens and closes after about 20 seconds is a stuck session; see Managing xrdp sessions.
- GNOME Remote Login (Ubuntu's built-in RDP) failed for me on both 24.04 and 26.04. Its handover from login screen to session didn't complete with the Mac Windows App, leaving a blank screen or error 0x204. xrdp avoids the handover entirely.
- NoMachine no longer has a free edition. From version 10 the server needs a paid licence.
- RustDesk can't show the login screen on Wayland, so it needs automatic login, which conflicts with xrdp.
- X11, not Wayland: xrdp sessions run on X11. To test an app on Wayland, log in at the machine itself.
- SSH host key warning after reinstalling on the same IP: clear the old key on the Mac with
ssh-keygen -R <ip>.