I have been trying to connect from my laptop to my desktop (2 monitors) and only show one of the monitors to my laptop but 2 monitors are always shown beside each other.

What I have tried:

  • x11vnc -display :0.0 Instead of just 0. Which just shows both monitors
  • x11vnc -display :0.1 Which gives an error XOpenDisplay failed (:0.1)
  • x11vnc -display :1 Which gives the same error as above but :1

I have tried to show the options for display peramiter by doing both

(cd /tmp/.X11-unix && for x in X*; do echo ":${x#X}"; done) Which only gives :0


for m in $(xrandr --query | grep " connected" | cut -d" " -f1)
    echo $m

Which gives


I have also read x11vnc's wiki and xorg's wiki

Also, I have looked at nvidia settings and it shows only 1 screen under x server information which if confusing as it recognised 2 monitors. (I have looked for answers to this but nothing I have found works). For further info, I am running arch and i3. With my xserver running at login with This

1 Answer 1


What you have on your desktop is a Xinerama display. You can move your mouse cursor as well as windows from one monitor to the other seamlessly. To X, it's one logical display with one screen. Regardless through how many real outputs it is displayed. That's why :0 and :0.0 are the same and the other display:screen identifiers don't work.

You want the -clip option of x11vnc.

This snippet may help you creating x11vnc exports by monitor automatically:

xrandr --listactivemonitors\
|awk -- 'BEGIN { getline } { gsub(/\/[[:digit:]]+/,"",$3) ; print $3 }'\
|while read GEOMETRY
    x11vnc -clip $GEOMETRY &
  • 2
    Not sure about Arch, but on Ubuntu x11vnc's man page suggests: Use '-clip xinerama0' to clip to the first xinerama sub-screen (if xinerama is active). xinerama1 for the 2nd sub-screen, etc. . Works here anyway...
    – Tfb9
    Aug 27, 2020 at 21:16
  • @Tfb9 this was exactly what I was looking for to share one desktop/screen in a multi-monitor configuration. Thank you!
    – Richard
    Sep 24, 2021 at 21:25
  • RE: -clip xinerama0: github.com/LibVNC/x11vnc/blob/…
    – genpfault
    Oct 4 at 15:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.