Use your Tablet as a Second Screen for your Notebook

A script that turns an Android tablet into a second monitor over USB — no extra hardware or Wi-Fi required. It only supports Android and has been tested with the following devices:

ManufacturerModel
SamsungTab S9+

How does the tool work?

The script sets up an Android tablet as a second monitor under Hyprland:

  1. Check prerequisites – Load configuration, clean up old wayvnc processes, verify that adb, hyprctl, and wayvnc are installed.
  2. Detect tablet – Show a notification and wait for a USB-connected ADB device.
  3. Create virtual monitor – Create a HEADLESS monitor in Hyprland, configure it, and position it to the right of the primary display.
  4. Start VNC session – Point wayvnc at the HEADLESS monitor and forward it to the tablet on port 5900 via an ADB reverse tunnel.
  5. Monitor – Every 2 seconds check whether the tablet and wayvnc are still running; automatically restart wayvnc if it crashes.
  6. Cleanup – On disconnect or abort: stop wayvnc, restore Hyprland settings, and remove the HEADLESS monitor.

Setup

Tablet

  1. Go to Settings → About device and tap Build number seven times to enable Developer options.
  2. Go to Settings → Developer options and enable USB debugging.
  3. Connect the tablet to your notebook via USB and confirm the ADB authorization prompt on the tablet.
  4. Install a VNC viewer. AVNC is a good open-source option available on F-Droid and the Play Store.

Notebook

Install dependencies:

Arch:

BASH
sudo pacman -S android-tools && yay -S wayvnc

Ubuntu:

BASH
sudo apt install android-tools-adb wayvnc

Install the script:

BASH
mkdir -p ~/.config/hypr/scripts
curl -o ~/.config/hypr/scripts/tablet-monitor.sh \
  https://raw.githubusercontent.com/MlNUX/secondscreen_tablet/main/tablet-monitor.sh
chmod +x ~/.config/hypr/scripts/tablet-monitor.sh

Create a .desktop file so the script appears in your app launcher:

BASH
mkdir -p ~/.local/share/applications
INI
# ~/.local/share/applications/tablet-monitor.desktop
[Desktop Entry]
Type=Application
Name=Tablet Monitor
Comment=Use tablet as a second monitor via USB (wayvnc)
Exec=/bin/bash -lc '~/.config/hypr/scripts/tablet-monitor.sh'
Icon=/usr/share/icons/breeze/devices/24/tablet.svg
Terminal=false
Categories=Utility;

Usage

  1. Plug in the tablet via USB.
  2. Launch Tablet Monitor from your app launcher, or run the script directly:
BASH
~/.config/hypr/scripts/tablet-monitor.sh
  1. A notification will appear while the script waits for the ADB device. Once detected, the virtual monitor is created and the VNC session starts automatically.
  2. In AVNC on the tablet, add a new connection with host localhost and port 5900.