How to Use UxPlay to Turn Your Linux Box into a Second Display for Your Mac
Have you ever wished you could extend your Mac’s display to your Linux machine using AirPlay? If you’ve tried AirPlay on your Mac to stream content to Apple devices, you might have wondered if Linux could join the party. The good news is, it can! With UxPlay, an open-source AirPlay client for Linux, you can easily turn your Linux box into a second display for your Mac. In this guide, I’ll walk you through the entire process, from installation to setup, so you can start streaming seamlessly.
Why Use UxPlay?
UxPlay is a powerful tool that allows Linux users to receive AirPlay streams from Apple devices like Macs, iPhones, and iPads. Whether you want to mirror your Mac’s screen or extend it to your Linux desktop, UxPlay makes it possible. Plus, it’s lightweight, open-source, and works like a charm on most Linux distributions.
Prerequisites
Before diving in, make sure you have the following:
- A Mac running macOS 10.8 or later.
- A Linux machine with a graphical desktop environment installed.
- Both devices connected to the same local network.
Step 1: Install Dependencies
To get started, you’ll need to install the necessary dependencies on your Linux machine. Open a terminal and run the commands below based on your Linux distribution.
For Debian/Ubuntu-based Distributions:
sudo apt update
sudo apt install build-essential cmake libavahi-client-dev libcairo2-dev libxcb1-dev libxcb-render0-dev libxcb-shape0-dev libxcb-shm0-dev libxcb-util0-dev libxcb-xfixes0-dev libssl-dev libplist-dev libavahi-compat-libdnssd-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
For Fedora/RHEL-based Distributions:
sudo dnf install gcc-c++ cmake avahi-compat-libdns_sd-devel cairo-devel libxcb-devel openssl-devel libplist-devel gstreamer1-devel gstreamer1-plugins-base-devel
Step 2: Download UxPlay
Next, you’ll need to download the UxPlay source code from GitHub. Run the following commands in your terminal:
git clone https://github.com/antimof/UxPlay.git
cd UxPlay
Step 3: Build and Install UxPlay
Once you’ve downloaded the source code, it’s time to build and install UxPlay. Run these commands:
mkdir build
cd build
cmake ..
make
sudo make install
Step 4: Set Up AirPlay on Your Mac
Now that UxPlay is installed on your Linux machine, it’s time to configure AirPlay on your Mac.
- On your Mac, locate the AirPlay icon in the menu bar (it looks like a rectangle with a triangle at the bottom).
- Click the icon and select “UxPlay” from the dropdown menu as the destination for your AirPlay content.
Step 5: Connect Your Mac to Linux
With AirPlay enabled on your Mac, your Linux machine should now appear as an available destination. Select your Linux box from the AirPlay menu, and voilà! Your Mac’s screen will be mirrored or extended to your Linux desktop.
Optional: Customize Your Experience
Change Resolution
By default, UxPlay uses a 1080p resolution. If this doesn’t match your Linux display’s native resolution, you can change it using the -s
flag. For example, to set the resolution to 1366×768, run:
uxplay -s 1366x768
Enable Full-Screen Mode
One of the best features of UxPlay is its full-screen mode. If you’ve installed UxPlay from source, simply press F11 to enter full-screen mode. This is especially useful for an immersive viewing experience.
Disconnecting AirPlay
When you’re done using AirPlay, disconnecting is easy. Just click the AirPlay icon on your Mac and select “Turn Off AirPlay.”
Conclusion
With UxPlay, you can effortlessly turn your Linux box into a second display for your Mac. Whether you’re mirroring your screen or extending it, UxPlay is a reliable and easy-to-use tool. I’ve personally tested it on Debian and Ubuntu (versions 23.04 and 22.04), and it works flawlessly.
So, if you’ve ever wanted to bridge the gap between your Mac and Linux setup, UxPlay is the perfect solution. Give it a try and let me know how it works for you!
Pro Tip: If you’re a Linux enthusiast looking to explore more ways to integrate Apple devices into your workflow, UxPlay is just the beginning. Stay tuned for more guides and tips on making the most of your tech ecosystem!
Happy streaming! 🚀