Would you like to mirror your iPhone screen onto your Ubuntu desktop? You can achieve this with a free, open-source application available in the Ubuntu repositories. UxPlay enables easy screen sharing from iPhone/iPad to Ubuntu, including audio, without requiring an app on your Apple device.
The application streams whatever is displayed on your Apple device screen to your desktop in real time. It presents the content in a floating window that you can freely move around the desktop or expand to full screen.
How does UxPlay function?
UxPlay utilizes AirPlay to mirror your iPhone screen onto your Ubuntu, Apple’s integrated screen sharing technology found in iOS. No hacks, cables, or jailbreaks are necessary; all you need is a device with AirPlay support (such as an iPhone 4 or later) and a functional network connection.
Although Apple introduced AirPlay 2 in 2017, they still maintain the “legacy protocol” essential for this app to enable screen mirroring on Linux. While Apple may remove the older protocol in a future update, it currently remains functional as of iOS 17.x.
If you’re seeking to mirror your iPhone or iPad to Ubuntu, UxPlay offers a simple solution, and it’s all provided as free, open-source software, which is fantastic!
See Your iPad or iPhone on Your Desktop
UxPlay mirror your iPhone screen onto your Ubuntu and its audio, meaning interaction with the mirrored content isn’t possible. Nonetheless, mirroring serves various purposes: it facilitates collaboration at work, enables presentation sharing, code demonstrations, showcasing art, and other content during streams or video calls, as well as allowing you to watch or listen to device content on a larger screen.
With UxPlay, performance is optimized by utilizing hardware-accelerated H.264 decoders whenever possible. In instances where hardware acceleration isn’t available, the software gracefully transitions to software decoding through GStreamer plugins. As a result, the video experience is generally smooth, with minimal stalls, stutters, or dropped frames. However, it’s worth noting that while the performance is excellent, it may not match the fluidity of a direct cable connection.
In addition to AirPlay mirror mode, which mirrors your screen along with its lossily-compressed AAC audio, UxPlay also offers support for AirPlay Audio mode, specifically for Apple Lossless (ALAC) audio. This mode allows you to stream audio only, without video, from your device.
If you solely wish to listen to content from your iPad or iPhone through your desktop or laptop speakers, this feature ensures the best possible audio quality.
To share your iPhone/iPad screen with Ubuntu:
- Search for it in Ubuntu Software/App Center apps or open a Terminal window and run
sudo apt install uxplay
to install it. - Install the necessary GStreamer plugins. Without these plugins, the app won’t function. Run
sudo apt install gstreamer1.0-plugins-bad gstreamer1.0-libav
to install them. - Launch UxPlay by running
uxplay
in a terminal. - On your iPhone/iPad, open Control Center by pulling down from the top-right of the screen. Tap the Screen Mirroring icon (overlapping squares), and select ‘UxPlay’ from the list.
When you’re finished, disconnect from your iPhone and close the UxPlay window on your desktop (if it doesn’t close automatically). Then, end the UxPlay process in the Terminal by pressing the Ctrl + C keys on your keyboard.
UxPlay has certain limitations
UxPlay isn’t just a “Scrpy for iPhone” or a “free Vysor alternative.” Unlike those apps, UxPlay is simply a mirror and doesn’t allow interaction with a device from your computer using a mouse and keyboard.
There are other limitations as well. UxPlay can’t display Apple video content encrypted by DRM, such as content from the Apple TV app, Amazon Prime, and similar apps.
Moreover, non-mirror AirPlay2 video streaming isn’t supported. This means you can’t directly stream video from an app to UxPlay without routing it through your device first. You can’t open an app, tap on a native ‘cast’ icon, select UxPlay, and have the video stream bypass your device to go directly to the app.
UxPlay offers several functionalities
Would you like to customize your UxPlay experience further?
UxPlay’s Github page provides comprehensive details on various configuration options. These options include rotating the screen, specifying frames per second (FPS) to improve performance, disabling video for audio-only streams, selecting a specific decoder, and more.
You can adjust these options manually when running the tool, or you can “hardcode” them in the config file for convenience.
Here are a few useful options:
- Set the resolution: Use the
-s
flag followed by the desired resolution, e.g.,uxplay -s 1366x768
. - Rotate the screen: Use the
-r
flag followed byL
orR
to rotate left or right, respectively, before connecting. - Enter full-screen mode: Press F11 on1 your keyboard (and again to exit) or use the
-fs
flag.
It’s worth noting that UxPlay can leverage hardware-accelerated decoding on the Raspberry Pi 4B (and older models) using Video4Linux2. However, this functionality may vary depending on the Linux distribution you’re using. On Ubuntu for the Raspberry Pi 4, hardware-accelerated decoding should work automatically.
That’s how you can easily share an iPhone or iPad screen to any desktop PC or laptop running Ubuntu using UxPlay.
While there are other options available with more functionality, most of them are paid software, limited to Windows or macOS, and require installing additional apps from the App Store.
For a straightforward and hassle-free approach using free and open-source software, UxPlay is hard to beat.
- The version of UxPlay in Ubuntu 22.04 LTS lacks this feature. ↩︎