Warning 1: this patch is no longer required =
because=20
is included in the original sources of the current releases.=20
Warning 2: this option is usefull only if =
you want=20
to use XDM to start the user sessions (otherwise you get just a gray =
screen) ,=20
check the xdm man pages.=20
I wasn't able to convince my users to start their own Xvnc before = using the=20 viewer, so it must start on demand. With this patch you'll be able to = use=20 inetd to launch Xvncs as clients connect.
To achieve this we've made some minor changes for Xvnc to support the =
new=20
-inetd command line option.
If -inetd option is not =
used=20
then Xvnc should work as usual and can be started by the vncserver =
perl=20
script provided with Xvnc.
This patch was designed to minimise changes to the original source = code,=20 currently only two files are patched (init.c and sockets.c).
Features (-inetd option):
Suppose you have the Xvnc source. Would be better to compile it first = (just=20 to be sure its ok).
Get the appropriate patch file (check "Change Log"):
Newer releases of Xvnc |
No patch required, -inetd option included in original = source. |
Xvnc version 3.3.3 |
18062000 - ixvnc3b.tgz=
=20
(10 Kb) 18062000 - ixvnc= 3b.patch.tgz=20 (1 Kb) 20091999 - ixvnc3a.tgz= =20 (10 Kb) 18091999 - ixvnc3.tgz= A>=20 (10 Kb) |
Xvnc version 3.3.2 R3 |
12031999 - ixvnc.tgz= =20 (16 Kb) |
(*) Now you can also use the patch versions, untar the=20 ixvncXX.patch.tgz file and then, in the vnc directory, use the patch = command=20 (patch < ixvncXX.patch).
New entries are required in /etc/services and = /etc/inetd.conf.=20
In this file the new services must be defined: service-name=20 port-number/protocol. In our case we want to give users several = options=20 about geometry's and depths so my file has this lines (you may want just = one):
vnc-640x480x8 5950/tcp vnc-800x600x8 5951/tcp vnc-800x600x16 5952/tcp
On the client side this means displays :50 :51 and :52. The display = number=20 used by Xvnc won't be the same; with -inetd option an available = display=20 number will be searched and used.
In this file you must add the lines to launch Xvnc, in my case the =
basic=20
options are:
vnc-640x480x8 stream tcp nowait = nobody /usr/local/bin/Xvnc Xvnc -inetd -broadcast -once -geometry = 640x480 -depth 8 vnc-800x600x8 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd = -broadcast -once -geometry 800x600 -depth 8 vnc-800x600x16 stream tcp nowait nobody /usr/local/bin/Xvnc Xvnc -inetd = -broadcast -once -geometry 800x600 -depth 16
You must add other command line options required for your local=20 configuration, namely -fp.
As you can see Xvnc will run as nobody (check if that's ok for = your=20 local configuration). Any number of clients may connect to :50 :51 or = :52, inetd=20 will launch a Xvnc for each. You may use any Xvnc options (some systems = may=20 restrict the number of command args in inetd.conf) but don't forget = -inetd=20 -broadcast -once, of course -broadcast can be replaced by = -query {hostname}.
After changing these files you must send a HUP signal to inetd = process (or=20 reboot).
12-03-1999 |
For Xvnc version 3.3.2 R3, patched files are: init.c sockets.c=20 rfbserver.c |
18-09-1999 |
Just adapting to Xvnc version 3.3.3, and minor changes: only = two=20 patched files are required now (init.c sockets.c). Instead of = searching a=20 free display up, starting at 0, search is now down, starting at=20 99. |
20-09-1999 |
Logging support added/Bug removed - iXvnc now closes handle 2 = (stderr),=20 the X-server stuff detects this and will write logs to file=20 /usr/adm/Xddmsgs (where dd is the = display=20 number). Of course this only works if the user id used by Xvnc has = the=20 right permissions there. Logging is most useful for trouble = shooting, I=20 hope it won't be used too often, when something goes wrong just = check the=20 log file. |
18-06-2000 |
Now TCP port number (6000+display) is checked, this should =
solve the=20
problem of systems where the X-Server locking mechanism is not =
used=20
(HP-UX). I don't have any HP-UX around to test, i hope this will =
solve the=20
problem. |
andre@dei.isep.ipp.pt
http://www.dei.isep.ipp.pt/~an=
dre
Departamento=20
de Engenharia Inform=E1tica (DEI)
Instituto Superior de =
Engenharia=20
do Porto (ISEP)
Instituto =
Polit=E9cnico=20
do Porto (IPP)
Rua Dr. =
Bernardino de=20
Almeida 431
P-4200-072 PORTO, Portugal =
![]() ![]() |