I've managed to get a shared VNC session on Linux such that
the session started at the root X window (a.k.a. console)
is sharable via VNC. It is fairly easy to do (once one
figures out some of the undocumented features and options
of vncserver). Here's the procedure for SuSE Linux 8.0
(Intel), using kdm as the display manager:
1. (obviously) the vnc package, X, and a suitable display
manager need to be installed. xfstt is also helpful.
2. configure xfstt to run in run levels 3 and 5. The
YaST2 system -> run level editor can be used.
3. edit the vncserver (in /usr/X11/bin) script to
configure a suitable default color depth, default
xstartup file contents, and font paths.
I use a depth of 16 and the following for the font path:
$cmd .= " -fp /usr/lib/X11/fonts/misc/";
$cmd .= ",/usr/lib/X11/fonts/misc:unscaled";
$cmd .= ",/usr/lib/X11/fonts/75dpi:unscaled";
$cmd .= ",/usr/lib/X11/fonts/100dpi:unscaled";
$cmd .= ",/usr/lib/X11/fonts/URW";
$cmd .= ",/usr/lib/X11/fonts/Speedo";
$cmd .= ",/usr/lib/X11/fonts/cyrillic:unscaled";
$cmd .= ",/usr/lib/X11/fonts/latin2/misc:unscaled";
$cmd .= ",/usr/lib/X11/fonts/latin7/75dpi:unscaled";
$cmd .= ",/usr/lib/X11/fonts/japanese:unscaled";
$cmd .= ",/usr/lib/X11/fonts/hellas/misc:unscaled";
$cmd .= ",/usr/lib/X11/fonts/hellas/75dpi:unscaled";
$cmd .= ",/usr/lib/X11/fonts/hellas/100dpi:unscaled";
$cmd .= ",/usr/lib/X11/fonts/hellas/Type1";
$cmd .= ",/usr/lib/X11/fonts/misc/sgi:unscaled";
$cmd .= ",/usr/lib/X11/fonts/75dpi";
$cmd .= ",tcp/localhost:7101";
YMMV (the last is for use with xfstt). I use the
following for the default xstartup (edit $HOME/.vnc/xstartup
also if vnc has already been used):
$defaultXStartup
= ("#!/bin/sh\n\n".
"xrdb \$HOME/.Xresources\n".
"xsetroot -solid grey\n".
"#xterm -geometry 80x24+10+10 -ls -title \"\$VNCDESKTOP Desktop\" &\n".
"#twm &\n".
"kde &\n");
4. put a shell script named vnc in /usr/X11/bin,
containing the following three lines (edit the
geometry and dpi arguments to suit local conditions):
#!/bin/sh
vncserver -geometry 1024x768 -once -alwaysshared -dpi 94
vncview
5. put a shell script named vncview in /usr/X11/bin,
containing the following 3 lines:
#!/bin/sh
display=$(ls -t $HOME/.vnc/*:*.* | head -1 | cut -d: -f2 | cut -d. -f1 )
vncviewer -fullscreen -passwd $HOME/.vnc/passwd :$display
6. Add three entries to the login session manager via
the KDE Control Center, System -> Login Manager
"Sessions" tab. The entries should be "vnc",
"vncview", and "vncviewer".
7. Add "vnc" to the list of window managers in
/usr/X11/bin/wmlist (in case startx is used).
To use:
At the login session window, select "vnc" from the
session type drop-down menu. The vnc server will be
started (usu. on :1) and a full-screen vnc viewer
window will be opened connecting to the server using
the root window for the viewer. Remote connections
specify host:1 (unless for some reason the server has
started on a different X display). If the vnc viewer
in the root window is prematurely closed or crashes,
but the Xvnc server is still running, one can use the
"vncview" session selection in the login window to
reconnect to the vnc server without starting an
additional KDE (or other window manager) session.
Caveats:
It is presumed that the most recent $HOME/.vnc/*:*.*
file corresponds to the session established at login.
If additional sessions are established for the same
user, and the "vncview" session is used to try to
reconnect after closing the root vnc viewer, that
might not be the case. Use the "vncviewer"
session as described above to manually connect to the
correct vnc server (then one can use F8 to get a full
screen viewer). Obviously, errors in editing critical
files can cause problems; use the instructions above
at your own risk.
Pleasant surprises:
The vnc viewer in the root window can be used with
keyboard shortcuts (e.g. ALT + TAB to switch program
windows in the KDE session). Of course that won't work
from a MS Windows version of the VNC viewer.
Q&A:
Q: Why bother? On UNIX, you don't need to share the
console session -- you can start an additional user
session for each viewer [blah, blah, blah...]
A: Additional separate window manager sessions (i.e.
other than the root window desktop session) don't
permit doing what the VNC description states:
"[...] you can leave your desk, go to another machine,
whether next door or several hundred miles away, reconnect
to your desktop from there and finish the sentence you were
typing. Even the cursor will be in the same place".
That description DOES apply with a shared root window
session.
Q: How do I do this for Red Hat [or other] Linux?
A: I don't know. Experiment.
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
http://www.realvnc.com/mailman/listinfo/vnc-list