Using my tablet as secondary display (with FOSS linux software)

2022-05-12 (Updated 2026-05-14)

The other day I came upon a github repo with a script that creates a virtual display and use it as second display. I found out this can be done on my swayWM easily by hand.

This is a guide of how to use any device as your second display.

tldr

  1. Create a virtual display
  2. Start vnc server for that display
  3. Connect to the vnc server on another device
  4. (Optional) change relative position

Prerequisites

steps

Create a virtual display

(2026 update) When connected via ssh, make sure sway is running, and get the sock here:

export SWAYSOCK=$(ls /run/user/$UID/sway-ipc*.sock)

On swayWM/wayland, this can be done with

swaymsg create_output

Use swaymsg -t get_outputs to verify

Change output mode

If using gnome-connections , the output size will be automatically changed

Start vnc server

For wayland, use wayvnc

WAYLAND_DISPLAY=wayland-1 wayvnc -o <OUTPUT_NAME>

Connect to the vnc server

Make sure you firewall isn’t blocking the ports and enable encryption on public networks.

Change relative position

output <name> position|pos <X> <Y>
           Places the specified output at the specific position in the
           global coordinate space.

The man page of sway-output has a nice description.

(2026 update) After all these years, create_output is still undocumented, however, everything still works the same way. check out #5553


< Connect to Global Protect VPN with openconnectAMD Super Resolution On Linux >