I’m surprised just how easy it is to use an iPad or an Android tablet as a second monitor with Ubuntu 22.04 LTS.
Not just “access your desktop” but “use it to extend your desktop” as though it were a regular, physically connected external monitor.
I know: I’m supposed to be on the pulse of stuff like this and yet, here I am, monsieur slow-train, only learning about this capability cos it got mentioned it in a Reddit thread that, mercifully, passed before my eyes.
Naturally I had to dive it to try it out first hand. I’ve wanted something like this on Linux for a long time – albeit not out of any major need for a second monitor, more the satisfaction of knowing ‘anything Apple can do…’ etc 😉.
And it works pretty well, as you can see in this (hastily recorded) video:
We have GNOME developers to thank for this.
Among the various GNOME 42 features were a number of changes relating to the desktop’s support for the remote desktop protocol (RDP) and screen sharing. This included the ability to extend the desktop on to a virtual monitor as though it were a real one (including respecting any multi-monitor preferences you have configured).
Now, using a tablet as a second screen using RDP asks a little more of performance than just being able to access a desktop over RDP (which can be pretty laggy). To help, GNOME devs plumbed in frame tracking and enhanced hardware acceleration to ensure we get a smooth experience (though as this is still network dependant don’t expect miracles).
In a nutshell, on any Linux distribution using GNOME 42 you can use a RDP-supported device (e.g., an Android tablet, an old iPad, another computer) as an external monitor in much the same way as Apple’s SideCar feature (which lets macOS lets users extend their desktop on to an iPad screen).
The virtual monitor behaves like a regular monitor. You can also ‘drag’ your virtual monitor to your desired location directly from the Settings > Display panel, where you can also adjust the virtual monitor’s screen resolution independently of your main display.
While this kind of feature is not ‘new’ new – it’s been possible to use tablets as external monitors (including on Linux) via a local network for a while – what is new is that all of relevant components to make this work well come baked into GNOME 42.
Let’s look at how to set it up.
How to Enable Virtual Monitors in GNOME 42
Before you do anything make sure you are using Ubuntu 22.04 LTS or a Linux distribution based on GNOME 42. The various parts that make this possible are not included in earlier versions of the desktop environment. Also, while I have tested this feature in a Wayland session it should work in Xorg ones too but YMMV.
First, open a Terminal window and run:
gsettings set org.gnome.desktop.remote-desktop.rdp screen-share-mode extend. This step is needed to enable extendable virtual monitors over RDP. This feature is, at present, a hidden one because this stuff isn’t polished enough for the masses to make use of yet — so be aware!
Next, open the Settings app, navigate to the Sharing panel, and turn on Sharing, and turn on (once it appears) the ‘Remote Desktop’ option. You will want to set up a username and password too, to allow you to connect from a different device.
Use an RDP client on your tablet/phone — I used Microsoft’s free Remote Desktop Mobile which is available for Android and iOS — to connect to your computer from your tablet using your local IP (plus the right login credentials, if set previously). In Microsoft’s app just tap the “+” icon, enter your PCs IP address1, and the user credentials you created previously. Make sure you hit the ‘save’ button before backing out or you’ll have to do it again.
Now from the main screen of the app tap on the listed thumbnail to connect and hey, presto!
Finally, head back to the Settings > Display panel to reposition your virtual monitor, configure the screen resolution, etc. Remember: any multi-monitor behaviours you’ve tweaked elsewhere (e.g., ‘show dock on all monitors’) are respected by virtual monitors too.
A few caveats
Once connected through an RDP app on the second screen everything should “just work”. Don’t get carried away, mind: you can’t use your virtual monitor as, say, a playback monitor when video editing because the frame rate isn’t 100%. Also, you can’t use touch events on the tablet to interact with any windows or desktop environment either, nor something like an Apple Pencil.
You will also see a second cursor on the virtual monitor. This doesn’t “work” (though you can move out of the way). This is a bug at present and will be fixed in a future GNOME update.
Also make sure that when you’re not using this feature to turn off remote desktop in the sharing app. While it’s unlikely anyone will be local-enough to access your computer, it’s a possibility.
1 To find your IP in Ubuntu go to Settings > Network, click the cog icon next to your active network, find your IP in the ‘details’ pane.