Screen Mirroring iPhone to Linux

Screen Mirroring iPhone to Linux
ibnu gunawan prayogo

Ibnu Gunawan P

Sun, 15 2022, 10:54:00 am

Table Of Content

Screen Mirroring iPhone to Linux

Screen mirroring is a technology that allows you to display your mobile device's screen on a larger screen, such as a TV or monitor, just as it is, and view it on that screen.

#Introduction

Have you ever found yourself in a situation where you needed to give a presentation that required showcasing your smartphone screen? Perhaps you wanted to demonstrate a newly released app or show something on your device, but you were already focused on your PC or laptop, making it a hassle to reach for your smartphone. However, there are times when you still need your smartphone, for instance, to check an OTP code, and you'd rather not switch back and forth.

For Android users, the solution is straightforward with an application like Scrcpy. This app, developed by the creators of Genymotion, is a handy tool for Android screen mirroring. But if, like me, you're using an iPhone, I'll share a solution for screen mirroring with an iPhone. Nevertheless, you can check out how to use and install Scrcpy for your Android device here.

Installing UxPlay

Before we dive into it, make sure you've installed the necessary dependencies to compile UxPlay. I'm using Linux Mint, but for users of other Linux distributions, you'll need to adjust the package names and package manager commands accordingly.

sudo apt-get update && sudo apt-get install build-essential libssl-dev libplist-dev
sudo apt-get install libavahi-compat-libdnssd-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav gstreamer1.0-plugins-bad
sudo apt-get install gstreamer1.0-vaapi

Next, let's clone the UxPlay repository/source and compile it.

git clone https://github.com/antimof/UxPlay && cd UxPlay
cmake .

cmake.png

sudo make install

makeinstall.png

Using UxPlay

To see the available options and commands or to access the help page, run the following command:

uxplay -h

uxplay 1.png

To start screen mirroring, ensure that your iPhone is connected to your laptop via a USB cable. Also, make sure the avahi-daemon service is up and running.

Starting the avahi-daemon service

sudo systemctl start avahi-daemon

Next, check the status of the avahi-daemon service to ensure it's running smoothly or to diagnose any errors:

sudo systemctl status avahi-daemon

status.png

Running UxPlay

To launch uxplay, simply run the command uxplay in your terminal. Here, I've added the -avdec flag to force the software to use the h264 decoder.

uxplay -avdec

Now, on your iPhone, click "Mirroring" and select "UxPlay UxPlay@{{host/username linux}}."

Line 4.png

Screenshot from 2022-05-15 19-32-12 1.png

Finally, check your computer or laptop screen, and you should see your smartphone screen mirroring seamlessly.

# Author's Note

That's all I have to offer. I hope you find this information useful. Thank you! 😁