[ltp] Dual monitor setup: T40p+XFree-4.3.0

Paul Kaplan linux-thinkpad@linux-thinkpad.org
Thu, 6 Nov 2003 08:20:40 -0400


If I understand correctly, you are able to get different content on the 
internal and external monitor with only one physical video card.  I'd 
definitely be interested in reading more details as per your offer.
Thanks,
Paul

On Wednesday 05 November 2003 06:35 pm, Klaus Weidner wrote:
> On Wed, Nov 05, 2003 at 01:38:35PM -0800, pete hilton wrote:
> > The only caveat is that I have not been able to get X to behave if you
> > start it expecting two displays and only have one.
>
> I have a different approach, which allows you to dymamically add and
> remove the second monitor without reconfiguring or restarting anything.
> It's a bit hackish, but works well for my purposes.
>
> First get the software you need:
> 	apt-get install x2vnc vncviewer
>
> My XF86Config-4 is attached, important is the "ServerLayout" section that
> refers to the two screens - and of course the two screens also need to be
> configured:
>
> Section "ServerLayout"
>         Identifier      "indep"
>         Screen      0 "LCD"
>         Screen      1 "VGA"
>         InputDevice     "Generic Keyboard"
>         InputDevice     "Configured Mouse"
>         InputDevice     "Generic Mouse"
>         Option "Xinerama" "false"
> EndSection
>
> I do *not* use Xinerama, instead this configures two completely separate
> screens (:0.0 and :0.1). If you do a normal "startx", you'll get your
> window manager and apps running completely on the builtin LCD, and the
> second screen (external monitor connected to VGA port) shows just the
> default gray X background. You won't be able to send mouse or keyboard
> events to this second screen yet.
>
> Now start a VNC server in the background:
>
>         vncserver -geometry 1024x768 :3
>
> put a fullscreen VNC client on the external screen:
>
>         xvncviewer -nocursorshape -shared -fullscreen -display :0.1 :3
>
> and connect them:
>
>         x2vnc -shared -east localhost:3
>
> Move the mouse off the right edge of the LCD ("-east") to send input to
> the apps running on the external screen. If there aren't any, launch
> them, i.e.:
> 	xterm -display :0.1 &
> 	icewm -display :0.1 &
>
> Advantages of this approach:
>
> - the desktops are completely independent. You can't move windows between
>   the screens, but instead you can run different window managers with
>   independent virtual desktops on each, which I prefer. Resource hogs
>   (i.e. Notes under Wine) tie up only one of your X servers. You could
>   even run the Xvnc under a separate user ID for security, i.e. a web
>   browser that can't get at your other files.
>
> - if you disconnect the external monitor, get your applicatins back onto
>   the main screen using "xvncviewer -shared :3", and continue using them
>   normally.
>
> - it's nice for slides or other presentations - run "xvncviewer -shared
>
>   :3" on the internal screen, and you get a copy of the external one,
>
>   including the mouse pointer, on your LCD. If your LCD has a higher
>   resolution than the projector, you have space around the screen copy
>   for notes, a shell prompt, and other things. If you temporarily need
>   more space, you can cover up or minimize the copy window without
>   affecting what the projector is displaying.
>
> - runs well with icewm and other non-Xinerama-aware window managers, and
>   you never get popup windows split across both your monitors or in dead
>   areas.
>
> - run movies fullscreen with mplayer on either monitor, using hardware
>   scaling:
> 	mplayer -fs FILE.mpg
> 	mplayer -fs -display :0.1 FILE.mpg
>   or as picture-in-picture (one corner of the external display shows a
>   movie, the mouse and apps stay behind it):
>   	mplayer -geometry +0+0 -display :0.1 FILE.mpg
>
> I'd welcome feedback on this, if there's enough interest I'll do a longer
> writeup and put it on my web page.
>
> -Klaus