Dual screen workflows without screens across operating systems

Background

My X380 sadly has been having port issues. This meant that my M14 was no longer a viable option for my second screen needs.

Outline

The general form of the solution works in one of two ways:

VNC Viewer
Where the (second-screen) laptop connects to a VNC server on the primary laptop
Peripheral Shares
Where the secondary laptop runs a server to enable proxying mouse and keyboard access from the primary laptop

VNC and Windows

For laptops running Windows, I personally just set up TightVNC. The standard settings work well enough for the peripheral share described below.

Comments

This is best used for working with Windows only stuff like Office.

VNC and Linux

Peripheral Share

For the secondary laptop we need to run a server (tigervnc) without setting an external screen.

1x0vncserver -rfbauth ~/.vnc/passwd

Now on the main laptop, we will simply leverage x2vnc to extend into the secondary laptop.

1x2vnc $ip -west

Where we can get the IP (local) by checking with ifconfig on the secondary laptop.

Meta

This works best when combined with a networked file-system, since then you can interact with files in tandem. Otherwise, there is quite a bit of git based back and forth.

VNC and Android

There are two parts to this solution. Note that, as Android devices don’t run X11 systems in a meaningful way, the direct access method is through a paid application, a2vnc server lite, which also did not work well in my tests. We will therefore focus on setting a VNC viewer up to connect to the primary laptop.

Primary Settings

XRandR Setup

For the primary laptop, we will start by obtaining our present screens configuration.

1xrandr | grep " connected"
1eDP1 connected primary 1920x1080+1920+0 (normal left inverted right x axis y axis) 290mm x 170mm

Naturally your output will differ. We also need the resolution of the Android device. In my case, they are the same. At this point we are ready to figure out the mode-line.

1gtf 1920 1080 60
1# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
2Modeline "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync

Let us now use this information to create a bunch of modelines.

1xrandr --newmode "1920x1080_60.00"  172.80  1920 2040 2248 2576  1080 1081 1084 1118  -HSync +Vsync

Note that we can create more of these in the same manner. We can now move forward with making a virtual screen.

1xrandr --addmode VIRTUAL1 1920x1080_60.00

We can now finally set up the output.

1xrandr --output VIRTUAL1 --mode 1920x1080_60.00 --left-of eDP1

Note that it is better to use mons to work with our newly created virtual screen.

1mons -e left

This is still a bit ugly, since the process needs to be repeated with each reboot.

VNC Setup

Now we need prepare our VNC. x11vnc is recommended at the moment.

1x11vnc -vencrypt nodh:only-ssl -ssl SAVE -clip 1920x1080+0+0

Android Settings

For this section, I personally use bVNC Pro. The setup is pretty dead simple. A basic VNC connection is all that is required.

Comments

In practice, I use the x86 setup, with the secondary laptop acting as a viewer for a virtual screen, mostly because that way I can tune into multiple Zoom meetings (a bonus).

Conclusion

The final setup is quite robust to changes. Future posts might go into setting up the kind of local networking tools to help move files, code and more between both machines, to improve on the peripheral share approach. Additionally, there are still some manual steps which can and should be automated. I’m not super pleased with the setup, it takes longer than a wireless screen. This post is complimented by the work and setup with touchscreens here.