Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I've noticed people using a product for Windows and Mac called iDisplay which lets you use your Android or iPad as a secondary display. This seems like a great idea, and something that could be done on Ubuntu. Unfortunately, I've got no idea how to get started.

How could you re-create this setup on Ubuntu?

share|improve this question

6 Answers

up vote 8 down vote accepted

Get a VNC client for Android, start up a new VNC server session on your computer (don't just share the current display - use vnc4server not x11vnc), connect to it from the Android VNC client, and (the clever bit) share the PC keyboard and mouse between the two sessions using synergy.

All necessary software to do this is available in the standard repos for the Ubuntu side, and there's a few free VNC clients available for Android in the market.

You won't be able to drag windows across the displays using this method. For that I think you would need to use Xdmx to bond the two sessions. This is a lot harder and would probably cause you to lose 3D acceleration.

Also be aware that synergy and vnc don't use encryption by default so you need to tunnel the connections if you are not on a trusted network.

share|improve this answer

I use the xorg dummy driver and x11vnc -clip. The mouse point is not stuck on the edge.

sudo apt-get install xserver-xorg-video-dummy

There is the /etc/X11/xorg.conf for dummy driver on second screen:

Section "Device"
        Identifier      "Configured Video Device"
    Driver "radeon"         #CHANGE THIS
EndSection

Section "Monitor"
        Identifier      "Configured Monitor"
EndSection

Section "Screen"
        Identifier      "Default Screen"
        Monitor         "Configured Monitor"
        Device          "Configured Video Device"
EndSection


##Xdummy:##
Section "Device"
  Identifier "Videocard0"
  Driver "dummy"
  #VideoRam 4096000
  VideoRam 256000
EndSection

##Xdummy:##
Section "Monitor"
  Identifier "Monitor0"
#  HorizSync   10.0 - 300.0
#  VertRefresh 10.0 - 200.0
#  DisplaySize 4335 1084
EndSection

##Xdummy:##
Section "Screen"
  Identifier "Screen0"
  Device "Videocard0"
  Monitor "Monitor0"
EndSection



Section "ServerLayout"
  Identifier   "dummy_layout"
  Screen       0 "Default Screen"
  Screen       1 "screen0" rightof "Default Screen"
    Option         "Xinerama" "1"
EndSection

Then login to X session and run: x11vnc -clip 1024x768+1280+0

share|improve this answer

(This is a follow-up question to chx's answer, but I don't have enough "reputation" to make comments so I post this as an answer)

I tried chx's answer and it works, almost: I can connect the ubuntu desktop to the android tablet, and I can (almost) drag objects from the desktop to the tablet -- but the desktop's mouse pointer gets stuck on the right edge of the desktop so I can't quite drag an object all the way over to the tablet. And on the tablet, the mouse point is stuck on the left edge, and I can't use the vnc viewer's mouse click to "take over" the mouse pointer. As a result this setup does not work (for me).

But we're so close... if there is a way to move the mouse pointer over the tablet and/or let the tablet takes over the mouse pointer...

share|improve this answer

tl; dr: xrandr --fb and x11vnc --clip together make a killer combo.

The thread linked by recognitium has a really interesting idea, not sure whether he meant this one because I couldn't find the author he indicated and also because I followed up on the forum post there, I will post this separately and not as an edit:

  1. First, let's assume the primary machine does have a screen resolution of 1280x800 and the secondary machine that you want to extend your desktop to over VNC has screen resolution of 1280x1024 and you want the extended screen to be right of your primary screen. The virtual screen needs to be 1280x800 + 1280x1024 = 2560x1024. (extend it horizontally and make the vertical resolution the bigger of the two) So run xrandr --fb 2560x1024.

  2. Now, that the screen is bigger than your primary monitor, you have to make sure there is no panning or any other unwanted "feature" activated and also that the coordinates of your primary monitor's top left corner are 0x0.

  3. x11vnc -clip 1280x1024+1281+0 plus add any other x11vnc options to taste :)

This should be it.

share|improve this answer
This seems like a way more seamless way to do it than the Synergy trick, nice! I'm curious how the extra virtual space will interact with my tiling window manager though. Will give this a shot in a little while and report back. – Ibrahim Jan 23 at 23:49

You can try what onescguy said at this thread:

http://ubuntuforums.org/showthread.php?t=1327186

share|improve this answer
3  
Link-only answers are not a good fit for the format of this site: please provide with the actual content of the answer, or if absolutely neccessary a summary of what you linked to. Link-rot will not help future users! – Nanne Dec 12 '12 at 10:34

This is in principle possible using xdmx (distributed multihead X) which allows you to create a single desktop using two X-servers running on separate machines.

three scenarios are possible in principle, but none are as seamless as iDisplay, because they all require restarting your X-session at least. I have not been able to get either to work perfectly, but I am running Ubuntu 10.10 and can't upgrade for various reasons. The three are:

1: run an X-server on android (there are two available now in the app store) and use xdmx to combine with your desktop or laptop display. - didn't work for me because xdmx crashed when the pointer moved to the tablet part of the desktop.

2: run a second X-server with vnc backend on your computer, use xdmx to combine that into one desktop with your computer screen, then look at the virtual part with a vnc viewer on the tablet - didn't work for me because xdmx requires all x-servers to have the same color visuals, which is not the case for the vncserver and the real display, and I wasn't able to convince vncserver to change.

3: run two vncservers, one for each screen, then connect them with xdmx and look at each part with a vncviewer on the respective machine. - This came closest to working for me, unfortunately inpout was messed up. it was also quite slow in true-color over wifi. I used this script to start xdmx and the vncs:

#!/bin/sh 
vncserver :2 -geometry 1024x768 -depth 24 && \
vncserver :3 -geometry 1920x1120 -depth 24 && \
startx -- \
/usr/bin/X11/Xdmx :1 \
-input :2 \
-display :2 \
-display :3 \
-ignorebadfontpaths \
-norender \
-noglxproxy \
+xinerama \
-nomulticursor
vncserver -kill :2 
vncserver -kill :3

YMMV

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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