This is a step by step guide shows how to mirror your iOS or iPadOS screen onto Ubuntu computer desktop through Apple AirPlay.
AirPlay is a protocol allowing to stream or share content from Apple Devices to Apple TV. Thanks to free open-source software (FOSS), it’s also easy to setup AirPlay server on Windows and Linux PC to receive content from Apple devices.
There’s a popular Scrcpy tool to mirror & control Android screen on Ubuntu Desktop.
For iOS, there’s a similar tool UxPlay can do the job mirroring iOS screen and forwarding sound, but without ability to control from computer.
Install UxPlay
UxPlay is available in all current Ubuntu and most other Linux system repositories.
To install it in Ubuntu, press Ctrl+Alt+T
on keyboard to open terminal and run command:
sudo apt install uxplay
The package in Ubuntu repository is always a bit outdated. For the latest version, you may follow the guide in Github project page to build from the source tarball.
Start UxPlay and Mirror Your iOS Screen
After installed the application, just start it by running the command below in terminal:
uxplay
The app has many CLI options, including:
-pin xxxx
– 4 digit pin code for authentication purpose.-async 1
– audio only mode without screen mirroring. Number 1 is audio delay in millisecs.-fps 120
– max allowed streaming framerate (default 30).-fs
– full screen mode.-s 1920x1080@120 - set screen resolution and refresh rate.
For example, run the command below to start mirroring in full-screen mode, with 120 max fps, and iOS need to type 1234 to authenticate.
uxplay -fs -fps 120 -pin 1234
NOTE: don’t know why, but some options are just NOT working properly in my case.
After started uxplay in computer, swipe down from top-right in iOS screen, tap “Screen Mirroring” (the two square icon) and choose “UxPlay@Hostname” to start mirroring your screen.
Run UxPlay as background service
If you want to mirror your screen regularly, then you may run uxplay as a systemd service silently in the backend.
Firstly, open (Ctrl+Alt+T) and run command to copy’n’paste service file into /etc/system/user
directory.
sudo cp /usr/share/doc/uxplay/systemd/uxplay.service /etc/systemd/user/
Next, enable and start the service as current user:
systemctl enable --now --user uxplay.service
You may then run systemctl status --user uxplay
to check the service status. Or, replace status
with start | stop | restart
for other operations.
UxPlay also reads configuration from .config/uxplayrc
file. Create the file if not exist, and write the cli options (without – at beginning) one per line.
Then try starting uxplay from command line, it should output that “reading configuration from /home/USER/.config/uxplayrc.”
Add Indicator icon to start/stop UxPlay (GNOME only)
For the default gnome desktop, there’s an extension that adds an indicator applet in system tray, allowing to turn on/off and configure the AirPlay server quickly with few clicks.
The extension so far supports GNOME 45 ~ 48, meaning for Ubuntu 24.04 and higher, and Fedora 40+.
Ubuntu user may first search and install Extension Manager from App Center (filter by Debian package). Then, use the tool to search & install the “UXPlay Control” extension.
While other Linux may visit the extension in EGO, then use ON/OFF switch to install (need to install browser extension if it asks and refresh).