How to Use Your Smartphone as a Second Monitor for Your Linux Desktop

Make your smartphone useful again.

Tablet As Monitor Linux Featured

Having a second monitor can be a productivity booster that gives you more screen real estate and a better multitasking experience. Whether you are on the go and can’t carry an actual monitor with you or just want to use your mobile device as a monitor, this guide will help you achieve that.

This tutorial shows you three different methods of using your smartphone and tablet as a second monitor for your Linux desktop.

1. Using Remote Desktop Protocol on Gnome 42

While Remote Desktop Protocol (RDP) is not a new feature for Linux desktops, Gnome 42 lets you use extendable virtual monitors over an RDP connection. This is by far the easiest and most convenient way to share a virtual monitor on Linux.

Before starting, make sure you are using a distro with Gnome 42, like Ubuntu 22.04 LTS on Wayland (the default display server of Gnome 42).

Enabling Virtual Monitor Feature in Gnome 42

To enable the virtual monitor feature, run the following in your terminal:

gsettings set org.gnome.desktop.remote-desktop.rdp screen-share-mode extend
Tablet As Monitor Linux Enable Rdp

This feature allows you to share and treat your virtual monitor like an actual monitor.

Setting Up Remote Desktop From Settings

  1. Go to Settings and select “Sharing.”
Tablet As Monitor Linux Remote Dekstop
  1. Select “Remote Desktop,” and from the Remote Desktop menu, enable Remote Dekstop and Remote Control.
  2. Set a username and password to use for connecting to this desktop.
Tablet As Monitor Remote Desktop Pop Up
  1. Close the window and log out from your current Gnome session. Once you log back in, you can use the Remote Desktop feature.

Connecting With an RDP Client From Your Mobile Device

On your mobile device, download any RDP client to connect to the remote desktop. In my case, I’m using Microsoft’s Remote Desktop app, which is available for Android, iOS and ipadOS.

  1. On the Remote Desktop app, select the “+” icon and “Add PC.”
Tablet As Monitor Linux Add Pc
  1. In the “PC NAME” field, enter your PC’s IP address and save it. Make sure that all of your devices are connected to the same network.
Tablet As Monitor Linux Ip Address
  1. If you don’t know your PC’s IP address, you can easily it find it by running hostname -I in the terminal.
Tablet As Monitor Linux Hostname
  1. Select your PC on the Remote Desktop app. It will ask for your username and password. Enter the previously configured username and password and select “Continue.”
Tablet As Monitor Linux Enter User Account

Setting Up Your Virtual Monitor Position

You can configure your virtual monitor position just as an actual monitor. From the Settings app, go to “Displays.”

Here you can change your virtual display position relative to your laptop/PC’s display. Also, you can change the orientation of your virtual monitor from the “Orientation” option.

Tablet As Monitor Linux Position

2. Using VirtScreen

VirtScreen is a Linux-exclusive app that can create and share a virtual screen using a VNC server. VirtScreen is currently not supported on the Wayland display server, so make sure you’re using Xorg to run VirtScreen.

Installing VirtScreen

You can download VirtScreen from its GitHub page.

To install the VirtScreen deb package, run:

sudo dpkg -i path/to/virtscreen.deb

Replace “path/to/virtscreen.deb” with your actual file path.

Tablet As Monitor Linux Dpkg Install

Running VirtScreen

  1. Run virtscreen in your terminal to start up VirtScreen.
Tablet As Monitor Linux Run Virtscreen
  1. From the menu bar, select the VirtScreen icon and “Open VirtScreen.”
Tablet As Monitor Linux Open Virtscreen
  1. If selecting “Open VirtScreen” doesn’t open anything because of drive incompatibility, run export MESA_LOADER_DRIVER_OVERRIDE=i965; in your terminal and run virtscreen again.
Tablet As Monitor Linux Export And Run Virtscreen
  1. On the VirtScreen pop-up window, set your preferred screen resolution for the virtual screen and select “ENABLE VIRTUAL SCREEN.”
Tablet As Monitor Linux Enable Virtual Screen
  1. On the VNC tab, select “START VNC SERVER.”
Tablet As Monitor Linux Start Vnc

Using a VNC Client to Connect to Virtscreen

Now that you have the VNC server running, open a VNC Viewer (or any VNC client of your choice) on your mobile device and select the “+” icon to create a new connection. Enter your displayed IP address and port number and select “CREATE.” (You can leave the name field empty.) For example, I put the address 192.168.0.108:5900 where 192.168.0.108 is my IP address and 5900 is the available port number.

Tablet As Monitor Linux Vnc Address

On the next screen, select “Connect” to connect to VirtScreen.

Tablet As Monitor Linux Connect

VNC Viewer will show up in the virtual screen on your secondary device.

3. Using Deskreen

Deskreen is a cross-platform app that can share your screen to any device with a web browser.

Installing Deskreen

You can download the Deskreen deb package from its official website.

To install Deskreen, run:

sudo dpkg -i path/to/deskreen.deb

Make sure to replace “path/to/deskreen.deb” with your actual file path.

Tablet As Monitor Linux Dpkg Deskreen

If you want, you can also run Deskreen without installing it by using the Deskreen AppImage file.

Sharing a Single Window With Deskreen

Once you have the Deskreen app installed, open the app and go to the displayed address bar from any web browser.

Tablet As Monitor Linux Deskreen Address

If Deskreen asks for confirmation, select “Allow” to let Deskreen share the screen with your device.

Tablet As Monitor Linux Deskreen Confirm

Select “Application Window” and choose one of the opened windows to share.

Tablet As Monitor Linux Final Confirmation

Using Deskreen to Share an Extended Display

Deskreen requires a dummy display plug to share your extended display. A dummy display plug is a cheap device that makes your PC think that it is connected to an external display. Alternatively, you can also use VirtScreen to create a virtual screen.

Once you have the dummy plug connected to your PC, go to Settings and select “Displays.” On the Displays page, set the display mode to “Join Displays.” On the Deskreen app, select “Entire Screen” after connecting your secondary device.

Tablet As Monitor Linux Choose Window

Select the second screen (the extended screen). On the new screen, click “Confirm,” which will share the extended screen to your secondary device’s web browser.

Tablet As Monitor Linux Share Entire Screen

As of now, sharing the “Entire Screen” feature needs workarounds to work on Wayland, so make sure you are on Xorg when using this feature.

Drawbacks of Using Deskreen Compared to the Other Two Solutions

Deskreen shares your screen as a video stream so that you can not interact with your PC from your secondary device. You also need to keep the shared window running in the background. Minimizing the window will result in a blank video on your browser.

Frequently Asked Questions

Why does an RDP connection not work after a restart?

This a commonly known issue and can be solved by signing out of the current session and signing in again.

How can I change the display server from Xorg to Wayland and vice versa?

If you are using Gnome, you can easily choose which display server to use on the login screen by selecting the setting icon and choosing your preferred display server.

Can I use more than one virtual display in Gnome 42?

While it’s possible to use more than one virtual display, your Linux desktop’s performance might start to suffer once you do so.

Can I play videos on my secondary display?

Whether you are using Deskreen, RDP protocol, or VirtScreen, video playback is good enough and doesn’t look too choppy. Try to use a good 5Ghz network for better playback.

Can I interact with my Linux Desktop from the secondary device?

If you are using an RDP connection on Gnome 42 or VirtScreen, you can interact with your Linux desktop from both of your devices. However, it’s not possible for Deskreen to interact with your desktop from the secondary device, as Deskreen only streams a video of your screen.

Image credit: Screenshots by Muhammad Munna

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox