Blog

Mirroring iPad/iPhone screen on Linux

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

  1. Download UxPlay zip file (if the link doesn’t work you can clone the git repository visiting https://github.com/antimof/UxPlay)
  2. Extract the files
  3. In the Terminal enter the UxPlay’s directory created after the extraction of the Zip file (it should be UxPlay-master)
  4. Type the commands below
mkdir build
cd build
cmake ..
make

Using the UxPlay

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

Screenshots

20 comments

  1. 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

    Like

      1. 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`

        Like

  2. 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.

    Like

  3. 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.

    Like

  4. 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.

    Like

  5. 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

    Like

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: