Last updated March 8th 2021
As a professor in this pandemic days the first issue I faced while I was looking for a good setup to give my classes remotely was: how to mirror the screen of my iPad on Linux?
Currently, I’m using elementaryOS 5, which is based on Ubuntu 18.04, so this tutorial should work on any Ubuntu 18.04 (or later) based distribution.
Installing packages needed
Type the following commands on the Terminal:
sudo apt-get install cmake
sudo apt-get install libssl-dev libavahi-compat-libdnssd-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-libav
sudo apt-get install gstreamer1.0-vaapi (For Intel graphics - this is not part of the command, ok?)
Installing UxPlay on Linux
- Download UxPlay zip file (if the link doesn’t work you can clone the git repository visiting https://github.com/antimof/UxPlay)
- Extract the files
- In the Terminal enter the UxPlay’s directory created after the extraction of the Zip file (it should be UxPlay-master)
- Type the commands below
mkdir build
cd build
cmake ..
make
Using the UxPlay
Before you try to mirror be sure of two things:
- All your devices are accessing the same network
- Your iPad/iPhone is connected to 5Ghz WiFi connection
If everything went fine up to this point do:
On your computer. in the build directory type in the Terminal
./uxplay
On your iPad/iPhone: go to the control center -> Screen Mirroring -> UxPlay
Known Issues and Solutions
I’ve made a tutorial with solutions to the most common problems here. It’s been helping a lot of other users, so there is a high chance you can find the solution to your problem there. Read it if you are facing any problem.
Screenshots


This was amazing. Thank you professor
LikeLike
You’re welcome!
LikeLike
I get this warning: Initialized server socket(s)
*** WARNING *** The program ‘uxplay’ uses the Apple Bonjour compatibility layer of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see
And an error on the iPad saying “Unable to connect to UxPly”. It sees UxPlay in the list of mirrors, but it’s not working. Any ideas ?
I’m running Ubuntu 20.04
LikeLike
Could you tell me your computer’s specs?
LikeLike
32Gb RAM, AMD 8350 8-core processor, NVIDIA GM107 [GeForce GTX650], 64 bit Ubuntu 20.04.1 LTS
LikeLike
GeForce GTX 750 … sorry
LikeLike
Nothing can be done about the warning. The developers has to use this layer of compatibility. And the warning can be ignored.
Try to install the gstreamer without the vaapi. In the tutorial I put the command for installing gstreamer for intel graphics, in your case you should use just `sudo apt-get install gstreamer1.0`
LikeLike
cmaker da el siguiente error.
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.
Tell CMake where to find the compiler by setting either the environment
variable “CXX” or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.
LikeLike
Try this command
sudo apt-get install build-essential
LikeLike
I’ve had the same problem as Moraga Torres and you’re right, the comand “sudo apt-get install build-essential” solves the problem!! Thank you so much!
LikeLike
Getting green screen in Ubuntu 20.10. any solutions?
LikeLike
Try to install gstreamer1.0-plugins-bad
sudo apt-get install gstreamer1.0-plugins-bad
LikeLiked by 1 person
I had the same green screen problem, but rpiplay with this patch solved it:https://github.com/FD-/RPiPlay/issues/202
LikeLike
I will give it a try! Thank you for sharing it!
LikeLike
so I want to make it so that it can launch on start up. I also want to make then when i exit out of the screenshare that it doesn’t kill the command. I notice that after i stop sharing my iphone. the screen stays on. once i exit out. uxplay no longer shows in my screen mirror options.
LikeLike
Starting the UxPlay at the start up is not a problem. The problem is that when you close the window, UxPlay doesn’t know you have closed it and keeps running in the background. I suggest you register an issue at https://github.com/antimof/UxPlay/issues
LikeLike
I noticed the same issue here (my « remote » laptop is running Ubuntu, connected to TV screen. So when I stop the screen sharing on iPad/macOS, I end up with a static Uxplay window taking all the screen).
The ideal behaviour would be the UI window to close itself on Ubuntu client, when user stops screen sharing + open itself again when a new screen sharing is activated.
LikeLike
Muito top, super feliz por isso
LikeLike
After “cmake ..” I get “UxPlay-master/lib/dnssd.c:38:10: fatal error: dns_sd.h: No such file or directory” How does one resolve this header dependency? (Looked at https://stackoverflow.com/questions/19585117/error-dns-sd-h-no-such-file-or-directory, but it’s quite old & simple attempts at fixes didn’t help.)
LikeLike
I have been a bit brutal, but got it to work on Ubuntu 20.04.1 LTS:
“`
apt search libspa | grep ‘^gstreamer’|awk -F ‘/’ ‘{print “apt install “$1}’ > /tmp/prout
apt search libspa | grep ‘^libspa’|awk -F ‘/’ ‘{print “apt install “$1}’ > /tmp/meh
chmod +x /tmp/prout
chmod +x /tmp/meh
/tmp/prout
/tmp/meh
“`
A bit dirty, I probably got useless stuff installed, but it works.
LikeLike
Hi Rodrigo,
Thanks very much for this!
I go this to work on Ubuntu 20.04.
I got the timeout issues as reported above because I forgot to switch back from NVIDIA to Intel graphics card.
I also used:
apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
from here:https://github.com/FD-/RPiPlay/pull/146
and then rebuilt.
Works fine now!
Hope this helps,
Rory
LikeLike
I was looking for such a solutions since weeks… Months!!! I had almost lost any hope!!! Thank you very much!!!
I am a teacher in a school in Germany where a project about using iPads in the classes is being implemented… Unfortunately the whole school is of course using only computers with Windows 😦 I am almost the only one who uses Linux in his laptop!
In these days of home schooling the importance of these devices has grown considerably and I was going everyday to school in order to mirror my iPad screen on the computers of the school and from there to conference with my classes (the use of the iPad is much convenient because of the e-pencil). Now I can stay home and proudly conference from there with my laptop with Linux: Great!!!! Thank you again from the bottom of my heart!
Nicola Staffolani, Backnang, Germany
LikeLike
Thank you for the nice comment I totally understand your frustration and it was that kind of feeling that led me to look for a real solution.
I tried a Samsung Galaxy Tab and mirroring it on linux is trivial with Scrpy and the e-pencil is even better than the one made by Apple. If you have a change to try Android tablets with linux… Mirroring them is less painful than Apple devices…
LikeLike
hello, i dosent work for me due to some reason, help me,
this is what it shows:
raop_rtp_mirror starting mirroring
Segmentation fault (core dumped)
LikeLike
Have you tried to install ?
sudo apt-get install gstreamer1.0-plugins-bad
LikeLike
After installing and unzipping UxPlay-master and then type UxPlay-master into the terminal the command isnt found… What have I done wrong?
LikeLiked by 1 person
You must compile UxPlay first. The commands are described in the tutorial
LikeLike
I did your steps, step by step. Somehow I still have this problem:
after I start uxplay with ./uxplay and connect via my IPad, the windows opens but only shows a black screen. A while later my whole PC freezes (the sound doesnt tho) and I have to reboot it.
LikeLike
Have you tried to install plugins bad?
sudo apt-get install gstreamer1.0-plugins-bad
LikeLike
Yes, I have tried that.
LikeLike
Yes, I’ve tried that.
LikeLike
I just did it on my Notebook, on which it works just perfect.
I am running the same software (elementory os 5.1.7)
So it has something to do with the hardware right? Could it be the graphics card (GTX 970)? Or the fact that I am using two monitors?
LikeLike
Are you using NVIDIA’S drivers? If yes, try to switch to your onboard graphics card by going in the NVidia app and changing to the onboard gpu.
LikeLike
Hey! This is actually a life saver, I need to be able to share my ipad screen over zoom for a physics class I’m taking in college and I have ubuntu installed on my computer, so this was the perfect solution. I found that when I use my school’s wifi UxPlay doesn’t seem to pop up in the screen mirroring options, however it does work perfectly fine when using other wifi and even my phone hotspot. Does this have something to do with my school’s wifi settings or is it due to an unstable connection? Is there a way around this by any chance, either with bluetooth or something else? So far, I’ve just been using my hotspot when in school, but I’d rather not have to do that. Thank you again for this!
LikeLike
Hey! I’m glad the tutorial helped somehow. Have you tried to use uxplay passing -n “network_name”?
LikeLike
Hi Rodrigo,
I got the same problem as the first comment by Werner Kruger, though I have intel…
specs: 16Gb RAM, Intel® Core™ i5-1035G1 CPU @ 1.00GHz × 8, Mesa Intel® UHD Graphics (ICL GT1), Ubuntu 20.04.2 LTS, 64-bit
I can even connect to UxPlay, but shortly get in the terminal raop_ntp receive timeout and no screen is mirrored on my computer…
Do you have an idea how to fix this?
LikeLike
Have you tried any of the methods described in the post I did covering the most common problems?
LikeLike
Actually not because I could not identify my problem with any of the issues described in that post, even though I thought the zoom fix might come in handy once it is working at all 🙂
I really have little knowledge in any of this, do you think your solution on “NVIDIA Graphics card” could be helpful?
LikeLike
So, there is another project with the same purpose as UxPlay whose development has been more active these days. It’s called RPi Play you can check it here https://github.com/FD-/RPiPlay
In your case, I would try to install the gstreamer plugins I mentioned in the common problems post. If that doesn’t work, then I would try RPiPlay. The process of compilation and installation is essentially the same you did for UxPlay. Let me how it goes
LikeLike
wow, you are a genius, the first gstreamer plugin worked already. thanks a lot!
LikeLike
Cool! Welcome! =)
LikeLike
Hi and thanks for your work. I’m having an issue after all is set and done, can you please take a look and tell me
I’m getting this error, what’s wrong? Thanks is advance.
lib/libairplay.a(crypto.c.o): In function `sha_destroy’:
/home/linux/Downloads/UxPlay-master/lib/crypto.c:206: undefined reference to `EVP_MD_CTX_free’
collect2: error: ld returned 1 exit status
CMakeFiles/uxplay.dir/build.make:101: recipe for target ‘uxplay’ failed
make[2]: *** [uxplay] Error 1
CMakeFiles/Makefile2:72: recipe for target ‘CMakeFiles/uxplay.dir/all’ failed
make[1]: *** [CMakeFiles/uxplay.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2
LikeLike
Hi, Rodrigo. I would find this super helpful for studying, but somehow I am getting:
/home/s/UxPlay-master/lib/crypto.c:98: undefined reference to `EVP_CIPHER_CTX_reset’
lib/libairplay.a(crypto.c.o): In function `sha_init’:
/home/s/UxPlay-master/lib/crypto.c:175: undefined reference to `EVP_MD_CTX_new’
lib/libairplay.a(crypto.c.o): In function `sha_reset’:
/home/s/UxPlay-master/lib/crypto.c:197: undefined reference to `EVP_MD_CTX_reset’
lib/libairplay.a(crypto.c.o): In function `sha_destroy’:
/home/s/UxPlay-master/lib/crypto.c:206: undefined reference to `EVP_MD_CTX_free’
I have followed all the instructions but it is on the liking when I get this error.
do you have any idea?
Thanks 🙂
LikeLike
Have you tried all solutions I’ve posted here: https://rodrigoribeiro.site/2021/03/01/mirroring-ipad-iphone-screen-on-linux-solutions-to-known-issues/
LikeLike
So I’ve installed this on Feroda and it compiles just fine, but when I run ./uxplay what exactly is supposed to happen? I just get the warning about using the Bonjour compatibility layer and then it waits. Is some window supposed to pop up?
I can connect from an ipad and the program says it accepts the connection but I don’t get anything except the command line terminal output.
LikeLike
Thank you. It works perfectly fine until yesterday. A popup with message “cannot connect to UxPlayer” has shown but i dont know why. I have change my modem wifi recently, my computer and ipad connect to the new wifi.
LikeLike
It can be some sort of firewall. For instance, I can’t use it when I’m using the Wifi available at the university where I work at.
LikeLiked by 1 person
It definitely because of the firewall. I have disabled the firewall on my machine and it works again. Thank you very much.
LikeLike
Thanks Rodrigo for providing this page.
@Becks I got the same errors as you. We both have a Linux version that is too old. UxPlay uses libssl1.1, while my Linux (a derivative of Ubuntu 16.04) offers only libssl1.0.
LikeLike
I am a brazilian professor and the best I could did until now was to mirror the screen of an Tab S6 lite in my Linux Mint. I have an iPad 6th and I use the app Goodnotes which is much better than any similar app for android (my opinion). Your tip is gonna help me a lot. It worked perfectly here. Thank you very much. Oxe acabei de ver aqui que vc é br também. Sou prof (substituto/temporário) na UECE no Ceará e faço doc em matemática também (teoria de singularidades). Obrigado, professor!
LikeLike
Excelente!!!
Funciona muy bien en Ubuntu 20.04
PC: CPU: Ryzen 5 3600 y GPU Amd rx580
add:
apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio
Gracias…
LikeLike
I follow the instructions step by step
it only says:
raop_rtp_mirror starting mirroring
but nothing happen, I can see the phone screen on the laptop
I’m using Ubuntu 20.04.3 btw
LikeLike
Is there any chance you are behind a firewall or in a public network?
LikeLike
Thank you professor. It is amazing. i had raop_ntp receive timeout error and
sudo apt-get install gstreamer1.0-plugins-bad
fixed everything. many thanks
LikeLike
Hi Rodrigo. I followed all the instructions but when I use the command “./uxplay” no window is popping up on my screen. I am able to select “uxplay” in the screen mirroring devices list on my iPad, but given no window is popping up on my laptop screen I am not able to see my iPad screen. Do you know what is the problem?
Thank you very much!
LikeLike
Thanks! Very great solution for those of us who build iphone apps on our Linux boxes.
LikeLike
I have the following error when running cmake:
make[1]: *** [CMakeFiles/cmTC_7e0fe.dir/build.make:66: CMakeFiles/cmTC_7e0fe.dir/BSD.c.o] Error 1
make[1]: se sale del directorio ‘/home/brian/UxPlay/build/CMakeFiles/CMakeTmp’
make: *** [Makefile:121: cmTC_7e0fe/fast] Error 2
LikeLike
hi, first of all thanks.
second, i get this ERROR:
CMake Error at lib/CMakeLists.txt:137 (message):
libdns_sd missing; can be provided by avahi_compat-libdns_sd or
mDNSResponder.
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
LIBPLIST
linked by target “airplay” in directory /home/billy/UxPlay-master/lib
any ideas?
thank you
LikeLike
On Ubuntu 20.04 I also had to run ‘sudo apt-get install libplist-dev’
LikeLike