Friday, February 21, 2014

Use any Tablet/Smartphone as extended monitor wireless in GNU/Linux


Before we put our hands dirty, first, understand the concept and technologies involved in the solution. The resources used are present in any distribution GNU/Linux today, so I will not worry packages and their builds or installations of the same.

Technologies used

The technologies/resources used will be mentioned below. For further clarification, I suggest searching for more information on the official websites of each project. Operating the solution of this article, is the use of Xorg Dummy, Xinerama and VNC Server . The junction of these, lets get the functionality of an extended wireless monitor next to the VNC client installed on the mobile device. Tools: 

  • Xorg Dummy :: In this solution, we'll use the Xserver Dummy to allow booting virtual screen, ie, contrary to conventional X server that will not start without a monitor, Dummy allows such an operation. 
  • Xinerama :: is used because it is an extension of the X server, which lets you use more than one physical monitor with a single virtual display. Extremely useful herein. 
  • x11vnc :: Another important tool for this tutorial is the x11vnc because it is a VNC server that provides a Desktop XUnix specified in such a way that a remote VNC client, connects with full access to the actual screen graphic section 
  • Android-vnc-viewer :: This application Android-VNC , must be installed on your mobile device. Its main function will be to operate as a VNC client on the platform Android . If you are using a device with iOS or Windows Mobile, find a VNC client that works perfectly with this document.

With the installation instructions in this article, we will as a result, two or more monitors present in the GNU / Linux operating system. Below is an illustrative picture of the final result of the environment, the interesting thing is that we can move windows and mouse (s) monitor (s) for the conventional tablet as if by magic. If we want to go out with your Tablet in hand to another room. 

Linux: Use any Tablet / Smartphone as extended wireless monitor on GNU / Linux
Linux: Use any Tablet / Smartphone as extended wireless monitor on GNU / Linux



First, install the packages mentioned above ( Xinerama, x11vnx and Dummy ). Following the instructions in the distribution openSUSE . I suggest fetching instructions from your favorite distribution for installing the same. 

 #zypper in libXinerama1 libxcb-xinerama0 x11vnc xf86-video-dummy The magic is in the file 

 /etc/X11/xorg.conf , where we insert the following lines: In section ServerLayout enter 2 lines: 

Screen 1 "Screen1" Below "Screen0" 
Option "Xinerama" "1"

The first tells X that the wireless monitor will go below the main monitor as the second line, enable Xinerama feature. For comparison, the section ServerLayout would look like this: 

Section "ServerLayout"
    Identifier        "Layout0"
    Screen      0   "Screen0" 0 0
    Screen     1   "Screen1" Below "Screen0"
    InputDevice    "Keyboard0" "CoreKeyboard"
    InputDevice    "Mouse0" "CorePointer"
    Option          "Xinerama" "1"

Now create the virtual device by entering the following lines: 

Section "Device"
  Identifier "Device1"
  Driver "dummy"
  VideoRam 256000

Section "Monitor"
  Identifier "Monitor1"

Section "Screen"
  Identifier "Screen1"
  Device "Device1"
  Monitor "Monitor1"

Now restart the X server ( rcxdm restart ) and we are ready to start blogging NERD. Run x11vnc preceded the parameters, as the following example: 
 #x11vnc -noxdamage clip xinerama1 -forever
  this line, just lift the VNC server on virtual screen (Dummy) we set the file xorg.conf . With this, just configure the application android-vnc-viewer with the IP of the machine running x11vnc running (assuming the device is connected to the wireless network with the main computer), plug it in and go! 

Linux: Use any Tablet / Smartphone as extended wireless monitor on GNU / Linux

Below is a video demonstration with the aim of providing the end result of the toy. With this, we can carry the tablet for a meeting and continue the running task. Anyway, the possibilities are endless.

see video in Youtube




Jesse said...

Thanks a lot for this tip! It works on my LINUX MINT 17, like a charm!

If I may, I would like to mention that a "-" sign is missing for the option 'clip':

x11vnc -noxdamage -clip xinerama1 -forever

Cheers and happy new year!

Jesse said...
This comment has been removed by the author.
Unknown said...

Great idea!

I just tried to get the Xinerama working but for some reason when I enable it the randr extension cannot be loaded - dummy driver disables it and after that KDE misbehaves. Any clues what might be wrong?

Norman Elliott said...

I cannot find xorg.conf in my Mint 17.1. I don't think it has been in Mint for some time.
Do I have to create one with ust the parts you describe here and if so, where would I put it?