Use Laptop as monitor (Ubuntu 18.04)
Solution 1
Virtual Monitor Over VNC
Similar to a couple of answers given, I was able to get it working using x11vnc by means of using my own code derived from the VNC Virtual Display Linker python code. I had a couple of issues with this code but I managed to get it working as shown below.
Simplified Intructions:
Please be aware of the notes and considerations at the end of this answer.
- Definitions: The "server" will be the computer which screen you want to extend, the "client" will be the computer (or tablet, any device able to deploy a VNC client) that you want to use as a screen.
-
Required Software: On the server install
x11vnc
andgtf
, on the client install a vnc client. - You need to know client's screen size (we'll call them:
CLIENT_WIDTH
,CLIENT_HEIGHT
) and the servers' screen size (we'll call them:SERVER_WIDTH
,SERVER_HEIGHT
). - In the server, run in a terminal
gtf CLIENT_WIDTH CLIENT_HEIGHT 60
(replace theCLIENT_WIDTH
andCLIENT_HEIGHT
with the corresponding values). As an example forgtf CLIENT_WIDTH CLIENT_HEIGHT 60
is
# 1384x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 86.62 MHz
Modeline "1384x768_60.00" 86.62 1384 1456 1600 1816 768 769 772 795 -HSync +Vsync
- From the previous result copy what is in front of
Modeline
, (in this case"1384x768_60.00" 86.62 1384 1456 1600 1816 768 769 772 795 -HSync +Vsync
) and use that as a parameter toxrandr --newmode
command. For example, in this case, we'll have to run in the serverxrandr --newmode "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
- In 5 we've created a newmode in
xrandr
, now we need to add it to the virtual screen, as followsxrandr --addmode VIRTUAL1 "1368x768_60.00"
(please remember to use your own newly created mode name, which is the value including quotes in 5). - Run
x11vnc -usepw -nocursorshape -nocursorpos -noxinerama -solid -repeat -forever -clip CLIENT_WIDTHxCLIENT_HEIGHT+SERVER_WIDTH+0
. As an example:x11vnc -usepw -nocursorshape -nocursorpos -noxinerama -solid -repeat -forever -clip 1368x768+1920+0
. This will create a VNC server in port5900
you can connect to. - Lastly, connect to the server from you other computer (or any VNC client, recommended
krdc
for linux machines). You should be able to enjoy your extended screen now.
Notes and considerations:
- In step 8, with krdc, it is recommended to use the "Medium Quality" option, even if you are on cable: both the "Low" and "High" quality options produce errors.
- I tried this over a WiFi network and it works properly, however on cable it's smoother.
- I had problems when starting the VNC server in step 7, the screen started to flicker and I couldn't see what I was doing on the screen. To fix this, I connected via the VNC server (the extended screen already works at this point), opened the
Displays
tool (the one that comes with the system where you can see the displays that are connected) andUnify Outputs
thenBreak Unified Outputs
(an example of this option in Kubuntu is shown below). Then everything worked.
Solution 2
Synergy is a $30-$40 commercial supported open source app (you can download the source code to compile and build it yourself) which does this.
Free? There's a free fork of Synergy, named Barrier (review) with a package for 18.04 and now 20.04.
x2vnc is also available and requires x2x or x11vnc on the subordinate PC, but unlike Barrier, it's out of maintenance.
Solution 3
SOLUTION HERE. I've found this project (is not with MIT Licensed but it's pretty cool).
The principle is :
-
Create a virtual screen and start x11 (this is done by VirtScreen)
-
from the slave laptop connect via viewer (i'm using vncViewer)
Related videos on Youtube
dack funk
Updated on September 18, 2022Comments
-
dack funk over 1 year
I have two laptops, both with Ubuntu installed. In the same network, I want one of them to be converted to simply be a monitor (like a slave for the main laptop, but not only share keyboard and mouse like barrier, it should become a slave, in other words i should be able to drag and drop in the other monitor).
Thanks.
-
K7AAY about 4 yearsYou may find this alternative useful: symless.com/synergy
-
K7AAY about 4 yearsDoes this answer your question? Extend Desktop to Monitor over LAN
-
Darth Continent about 4 yearsAgree with @K7AAY on Synergy. Last time I used it I had a relatively early version but it still offered the cool capability to hook up via network to another machine and be able to have it display stuff transferred over the network rather than cables.
-
dack funk about 4 yearsI Guys, tks for the rxeply. Honestly i was searching for a free tool. @K7AAY i've tried with Xdmx but in new versions seems to be broken...the only thing that i have not tried is to install the .deb version on ubuntu
-
Kamil Maciorowski about 4 yearsYou indicate the problem is solved by accepting an answer.
-
-
dack funk about 4 yearsBut the thing is that both of them do 'same mouse/keyboard for multiple PCs' .My goal is the principle of xdmx so, share the session between two laptop. One Laptop ,the slave, becomes an extension.
-
dack funk about 4 yearsit's broken for my ubuntu version, if i'll find another solution, i'll ping you :)
-
dack funk about 4 yearsREFUND ME. NOW.
-
Tim Strijdhorst about 2 yearsThanks for such an excellent and extensive description!