Discussion:
Xvnc & xstartup
Lee Allen
23 years ago
Permalink
When Xvnc is run in -inetd mode, is there some reason it does not execute
xstartup or .xinitrc ?

I realize it can be configured to use XDMCP, I'm just wondering why this
simpler mechanism is not utilized.

Lee Allen
Leadtec Systems, a division of CGS
Beerse, Corné
23 years ago
Permalink
-----Original Message-----
When Xvnc is run in -inetd mode, is there some reason it does
not execute xstartup or .xinitrc ?
Yes, -inetd is to be used from inetd (or xinetd or tcpserve or stuf like
that) Hence it get started without a real user.

Actually, Xvnc never starts xstartup or .xinitrc. It's your startup script
that starts both Xvnc and xstartup or .xiinitrc. vncserver is that script
for most of you, have a look and try to read what happens.
I realize it can be configured to use XDMCP, I'm just
wondering why this simpler mechanism is not utilized.
It is used as described above. THe reason is the order in which things
happen: is it first login and then windows startup, then the .xinitrc and
xstartup scripts can be used. Is it first windows startup and then login,
it's xdmcp that starts the login.

On most linux machines, you can replay this by putting the machine in
runlevel 3. Then, at the prompt type `startx` or `xstart` and see the
windows come to you. If you don't start the windows but start vncserver,
don't be surprised it gives you display :0.

Just did the next on my (RH 7.3) linux machine:
reboot to runlevel 3:
edit /etc/inittab and changed the default runlevel from 5 to 3
then reboot

At the text-console, login as a normal user
vncserver :0
This gives me the vncserver with display :0 at a unix machine
then to have X windows at the console:
startx -- :1
Ending with the reverse world: display:0 is in vnc, display:1 is at the
display...



CBee
Lee Allen
23 years ago
Permalink
I know vncserver can start applications. I must use Xvnc in -inetd mode, to
support multiple users and non-persistent sessions.

I was just thinking, since inetd starts Xvnc with a user name, it would be
nice if it could start the apps specified in .vnc/xstartup or xinitrc, and
not require XDMCP. In my case, the login step required by XDMCP is
unnecessary ... but unavoidable.

-Lee Allen
...
Beerse, Corné
23 years ago
Permalink
-----Original Message-----
I know vncserver can start applications. I must use Xvnc in
-inetd mode, to
support multiple users and non-persistent sessions.
I was just thinking, since inetd starts Xvnc with a user
name, it would be
nice if it could start the apps specified in .vnc/xstartup or
xinitrc, and
not require XDMCP. In my case, the login step required by XDMCP is
unnecessary ... but unavoidable.
If security is not an issue, it is no problem to have inetd start Xvnc
including some apps. There are several routes to do so. My idea:

Setup a user ('specialuser') and its vncserver setup, including dedicated
~/.vnc/xstartup scripts and vnc-password. Then create an inetd 'commandline'
as follows:

special-vnc stream tcp nowait specialuser /usr/local/bin/vncserver vncserver
-inetd

(the above is 1 line). You might add options like '-once' or geometry or
depth specifications. However, you can also create a special vncserver
script (it's perl, so you must be able to create one) Best NOT to specify
the -inetd in the scipt but have that specified from the commandline and
pass trough to Xvnc, for easy testing.

Note: inetd will start a new session for every connection, so if the sessins
do not end automatically, you should specify -once to clear lost sessions.

As for the XDMCP options: They are not required if you use inetd, it's just

CBee
M***@reuters.com
23 years ago
Permalink
Post by Beerse, Corné
As for the XDMCP options: They are not required if you use inetd, it's just
To break the suspense,
I can reveal that the butler slipped cyanide into the cucumber sandwiches

But maybe there are alternative endings. ;-}



-------------------------------------------------------------- --
Visit our Internet site at http://www.reuters.com

Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Reuters Ltd.

Loading...