15

My Objective

I would like to use my laptop, which is running Fedora 24, as a second monitor for desktop computer, which is also running Fedora 24.


What I have tried and what doesn't quite cut it or: Why this isn't a duplicate question

Xdmx

After doing a search of the internet and this website I found quite a few posts which were similar to this one, all of which basically contained the same few steps:

  1. Install Xdmx on both computers.
  2. ssh into one computer from the other with -X option going.
  3. Use Xdmx to turn the computer which is on the recieving end of the ssh into a monitor using the following command: startx -- /usr/bin/Xdmx :1 +xinerama -display :0.0 -display localhost:10.0 -norender -noglxproxy

Doing so first makes both computer screens go black for a few seconds, then gives me a long error message which ends with:

xinit: XFree86_VT property unexpectedly has 0 items instead of 1
xinit: connection to X server lost

waiting for X server to shut down 
Couldn't get a file descriptor referring to the console

Googling the error returns this blog post from July 2015, in which a user follows the exact same steps as I did except for using Ubuntu instead of Fedora, and ends up with the exact same result as I did. There are six comments on the post as recent as October 2016, all six of which claim to have followed the same steps, and have received the same error.

Fedora Remote Desktop

While this does allow me to control one computer from another, it requires that I use a GUI on the host computer to control laptop. To use the gui effectively, it has to take up a large amount of space on one monitor. So, when I want to use the host monitor, I have to alt-tab remote desktop away. As such, I do not actually gain a monitor, since I am unable to simultaneously use the two monitors for two different tasks. This is more similar to just switching workspaces, which is something that I am already able to do. Also, I can not move programs between screens.

Ssh -X

Same as above. Yes I can control my other computer, but I have to actively use the host monitor to control my laptop monitor.

Synergy.

The program actually works, but it only allows the sharing of mouse and keyboard. Programs can not be moved between monitors, so it's not completely what I am looking for. Also, I am a stingy college student, and the license fee is $20. For this price I could just buy a used monitor, which would allow me to move programs between monitors. There is a FOSS version in the Fedora dnf repository, but that version is outdated.

7
  • @fixer1234 The first comupter is an all in one while the second one is a laptop. So,neither one has a detachable screen. Sorry, I should have probably specified that just reconnecting a monitor is not an option. Dec 21 '16 at 10:28
  • A lot of what I was remembering were Windows solutions, but there are also a bunch of previous Linux questions. I just used "use laptop as monitor is:q linux" as a search string and got 86 results. So that's a starting point. Without digging too deeply, these are some of what came up: superuser.com/questions/661385/… (accepted answer points to a Fedora reference), superuser.com/questions/51031/…, superuser.com/questions/143833/… (cont'd)
    – fixer1234
    Dec 21 '16 at 19:22
  • (slightly different case but potentially adaptable?), superuser.com/questions/71794/…
    – fixer1234
    Dec 21 '16 at 19:22
  • @fixer1234 Hey, thanks for your examples, but I'm afraid that I can't actually use them. 1 is using remote desktop to control another computer. I have gotten this to work, but this doesn't really give me a second screen but instead lets me control the laptop from my main computer. It requires the laptop's desktop to be displayed on my PC. 2 references DMX, which seems to have mysteriously stopped working for everyone some time in the past few years. 3 once again is just remote control, which works fine for the user because he does not have an actual monitor. 4 is once again Xdmx. Dec 21 '16 at 20:17
  • 1
    My suggestion would be the following: (1) increase the geometry of the desktop on your desktop computer using xrandr --fb <width>x<height> to match the combined size of both monitors; (2) start a VNC server on your desktop; (3) connect with VNC from your laptop to your desktop with an explicit geometry, viewing the right-most (on your desktop monitor "unvisible") part of the desktop.
    – agtoever
    Dec 30 '18 at 19:19
5

I use Ubuntu 18.10 and this shell tool https://github.com/mrenrich84/vnc_virtual_display_linker

if you are using x11 and x11vnc in your fedora 24 you could give it a try.

I use this to make a second screen with my Android Tablet (you just need a vnc client on the second screen device).

Mouse and Keyboard of my PC are also available on the second screen.

0

Virtual Monitor Over VNC

xdmx didn't worked for me either, however 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.

  1. 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.
  2. Required Software: On the server install x11vnc and gtf, on the client install a vnc client.
  3. 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).
  4. In the server, run in a terminal gtf CLIENT_WIDTH CLIENT_HEIGHT 60 (replace the CLIENT_WIDTH and CLIENT_HEIGHT with the corresponding values). As an example for gtf 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
  1. 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 to xrandr --newmode command. For example, in this case, we'll have to run in the server xrandr --newmode "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
  2. In 5 we've created a newmode in xrandr, now we need to add it to the virtual screen, as follows xrandr --addmode VIRTUAL1 "1368x768_60.00" (please remember to use your own newly created mode name, which is the value including quotes in 5).
  3. 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 port 5900 you can connect to.
  4. 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) and Unify Outputs then Break Unified Outputs (an example of this option in Kubuntu is shown below). Then everything worked.

Unify Outputs

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.