7

I use the following script to VNC into my computer using an old tablet to turn the tablet into a second monitor:

xrandr --fb 3840x1080 --output eDP-1 --panning 3840x1080+0+0/3840x1080+0+0
sleep 3
xrandr --fb 3840x1080 --output eDP-1 --panning 1920x1080+0+0/3840x1080+0+0
x11vnc -clip 1920x1080+1921+0 -nocursorshape -nocursorpos -ncache 10 -ncache_cr
xrandr --fb 1920x1080

I don't think there is an equivalent of xrandr on (any major) Wayland (implementations), so I wonder if there is any other ways to use an old tablet as a second monitor. Sorry for the bad title, I just didn't know how else to phrase it.

I am using Ubuntu 18.04 if that matters.

Thanks!

Bora M. Alper
  • 201
  • 2
  • 8
  • 1
    I'm using Wayland on Debian, and xrandr is available, and currently lists XWAYLAND0 as an output to screen 0. But I couldn't create a new output (eDP-1), as it says "warning: output eDP-1 not found; ignoring". Perhaps it is related to Wayland, I'm not sure. I found [these steps](https://www.hitbits.net/2016/02/26/use-an-android-tablet-as-a-second-monitor-for-linux-pc/) for setting up a vnc server (like yours, but with modeline !!!), though it also fails for me the exact same way: "warning: output VIRTUAL1 not found; ignoring". – rslemos Apr 09 '20 at 15:54
  • Related question... unfortunately without answer either: https://www.reddit.com/r/wayland/comments/623los/distributed_multi_head_like_using_wayland_similar/ – Pietro Battiston May 27 '21 at 05:48

1 Answers1

2

As of June 2021, only the Sway compositor appears to allow extending the desktop to another device, via VNC (source). Indeed, users have reported this to work fine.

For instance Mutter (the default compositor for GNOME 3, in turn the default desktop environment in recent versions of Ubuntu) can create headless monitors (since version 40.0, released in March 2021), but more work is required both to standardize the cross-platform API for screen casting of a virtual monitors, and to teach GNOME to record from one (so that it can be streamed over VNC).