[ltp] using vncserver for presentations on T40

Brad Langhorst linux-thinkpad@linux-thinkpad.org
Tue, 01 Feb 2005 16:51:53 -0500


I've recently started trying to build a configuration for presentations
based on Klaus Wiedner's config.  Since I have to give a bunch of
lectures this semester I want to make my life easy.

Here's a the shell script that I want to use to start a presentation: 

==================================================================
#!/bin/sh
res="$2"
#set resolution to 1024x768 by default
if [ -z "$res" ] ; then res="1024x768" ; fi
echo "switching to $res"

xrandr -d :0.1 -s $res

#create a new instance of X for vnc
vnc4server :3 -name 'presentation' -localhost -geometry $res

#put a full screen version on the external display
xvnc4viewer -display :0.1 -Shared -FullScreen -UseLocalCursor :3 -passwd
~/.vnc/passwd &

#put window of the presentation on the main display
xvnc4viewer -Shared -UseLocalCursor :3 -passwd ~/.vnc/passwd &

#i want to run this command in the xvnc server not on display 0.1...
#ooimpress -display :0.1 -show $1
===================================================================

It took me a while to understand that vncserver starts up its own
instance of X and that I need to open windows on that instance.  Right
now I only know how to start stuff in there using .vnc/xstartup
I tried x11vnc to skip vncserver altogether but it sucks... you have to
move the mouse very hard to get it out of the vnc window and the refresh
rate is very slow. If I could get the mouse to easily release then I
might use it anyway since i don't really care that much about the
quality of display on my laptop.

Here are my problems with this setup:

1) the keyboard focus never comes back to my main screen until I kill
the vncserver.  The mouse does switch focus correctly - this is a major
problem for me.

2) I want to be able to run commands to display in the vnc x server but
can't find any way to do that

3) The external display gets an instance of my normal window manager
(gnome's metacity)... I don't want that to happen but I can't seem to
avoid it. Essentially, Iwant the window manager to be vncviewer :3.

4) When I run "xrandr -d :0.1" display :0.0 gets corrupted.... I have to
drag some windows around to force a redraw (probably a driver issue)

5) If I don't start X with the external display connected xdpyinfo shows
only one display.  It'd be really nice to just walk into the
presentation room, unsuspend, and run presentation.sh foobar.sxi. Right
now i have to log out and restart X before i can present.  This is not a
huge problem since I rarely restart X and i can just take care to always
start with an external display connected.

Does anybody else who uses this type of config have solutions for these
problems ?

thanks!

brad