How to Mirror iOS/iPadOS Screen in Debian 12 & Ubuntu 22.04 Desktop

Get an iPhone, iPad or other iOS device? You can share its screen on Linux desktop for showing your product or watching movie on big screen. Or stream audio only on Linux PC for lossless playback.

This can be done easily via UxPlay, a free open-source application available in most Linux repositories. It works by setting up a AirPlay mirroring server, using Apple’s screen sharing protocol.

No app, no cable, no jailbreak! Just make sure both iOS device and Linux machine are connected in same local network.

UxPlay uses gstreamer plugins for audio and video rendering, and uses hardware accelerated H.264 decoders when available for reliable performance. And, it supports audio only mode for Apple Lossless (ALAC) audio playback. However, Airplay2 video-streaming and AirPlay2 multi-room audio streaming are NOT supported.

Supported iOS devices include 32-bit iPad 2nd gen., iPod Touch 5th gen., and iPhone 4S, when upgraded to iOS 9.3.5, and later 64-bit devices.

Step 1: Install UxPlay on your Linux Desktop

First, search for and launch terminal from start menu (for Ubuntu, press Ctrl+Alt+T).

When terminal opens, run command to install the UxPlay as well as gstreamer plugins:

sudo apt install uxplay gstreamer1.0-plugins-bad gstreamer1.0-libav

NOTE: UxPlay is also available in Fedora and Arch (AUR) repositories, but I didn’t try them out until writing this tutorial.

NOTE: UxPlay in Ubuntu 22.04 is old without full-screen support! If you need the feature, go this PPA page, then click expand in-page link, download & install the .deb package. For Ubuntu 18.04 and Ubuntu 20.04, try this one instead.

Step 2: Run UxPlay to set up AirPlay server

After installed the software, you can simply run command in terminal to start the server:

uxplay

To stop it, just press Ctrl+C key combination or close that terminal window.

It by default starts the server with 1920×1080 display resolution. If your Linux desktop is running in another resolution, then you may use -s flag to change it.

For example, to start the server with different display resolution (2560×1440 in case below) and 60 refresh rate, run command:

uxplay -s 2560x1440@60

While screen mirroring, you can press F11 on keyboard to toggle full-screen. Or, start automatically in full-screen mode with -fs flag:

uxplay -fs

NOTE: default uxplay package in Ubuntu 22.04 is old and does NOT support full-screen mode!!

For choice, there are some other command flags, including:

  • -r L or -r R to rotate screen left or right 90 degree.
  • -vs 0 to disable video streaming, so audio only!
  • -as 0 to disable audio streaming, so video only!
  • -f H, -f V, or -f I to flip Horizontal, Vertical or Inversion.
  • -nc that does NOT close mirroring window on Linux desktop when client (iOS) stop mirroring.

Auto-start UxPlay at login

The commands above start the server until your close the terminal window.

If you want to make it start automatically in the background at every login, launch “Startup Applications” in Ubuntu (for Debian the setting varies depends on DE), and add new with:

  • Name: whatever as you want.
  • Command: uxplay command with your desired flags.
  • Comment: whatever as you want.

Step 3: Start Screen Mirroring in your iOS

Finally, in your iOS device pull down from top-right to open the control center, then click on the screen sharing icon.

If the uxplay server started successfully, then you’ll see your Linux machine in the list. And, just tap on it will open the window (or full-screen) in Linux Desktop streaming your iOS screen.

That’s all. Enjoy!

Exit mobile version