On Tue, 25 Feb 2003, Grant McDorman wrote:
> Sorry about the delay in responding - rather busy with work, I'm afraid.
Many thanks, things are now solved ... in a slightly surprising way !
Probably it is worth sharing.
> The errors below, and the behaviour you're seeing, suggest to me that you are
> still using 'vncserver' in /etc/dt/config/Xservers. This won't work; use Xvnc
indeed I was using "myvncserver" which was a copy of "vncserver" with some
checks on paths and environment disabled.
> The problem with using 'vncserver' is it wants to start up VNC as already
> logged on; this conflicts with using it in Xservers, where dtlogin wants to
> offer you the login window.
I was aware of that, but replacing ./xstartup with a zero-size file was
enough to make dtlogin work IN CONJUNCTION with -query and -once
The reason I was using a vncserver-like script was that the documentation
seemed to imply that starting the server directly was a mess (and also I
do not read perl enough to capture the necessary info ... which prevented
me using the server at all on my old Alphas without perl !)
> The errors below, and the behaviour you're seeing, suggest to me that you are
> still using 'vncserver' in /etc/dt/config/Xservers. This won't work; use Xvnc
> directly, as I suggested earlier, or a very simple script that consists of :
> #!/bin/sh
> Xvnc -geometry 800x600 -your-other-options-here "$@"
I first tried with a simple script, and finally settled on invoking Xvnc
directly from Xservers. Actually I MUST do that in order to have logout
working correctly.
My first point was ... which options to put in the script ?
I first started vncserver, and did a "ps" to get its runstring, which was
Xvnc -desktop X -auth /.Xauthority -depth 8 -rfbwait 120000 -rfbauth
/.vnc/passwd -rfbport 5901 -geometry 1268x1024
with this I was still having various problems, blank or gray screen. One
was possibli related with an old .Xauthority files, which I deleted. I
also seemed to have the same problem with -query (needing -query to get
the dtlogin window), and the problems with logout not working (and in this
case -once or -terminate did NOT help).
So I tried to strip down the runstring to the minimum :
Xvnc -depth 8 -rfbwait 120000 -geometry 1268x1024 :1
This did a first Very Good Thing. Now the login window comes out with the
right fonts (not the emulated fonts I saw before), and with the dxconsole
window on the bottom (i.e. identical to what I see on my main display).
However I still had the logout problem. Pressing the logout button did not
terminate the session. Pressing it again gave "TT_ERR_NO_MATCH No handler
can be found ..." (this is customary in exiting a CDE session in a VNC
viewer when the server is started by vncserver ... one shall use vncserver
-kill). As I said, playing with -once and -terminate did not help.
I could not use vncserver -kill because my script does not record the pid
in a file. I had to kill Xvnc manually. If I do so, dtlogin restarts it
correctly.
I also noticed that the dtlogin process tree was :
dtlogin -daemon +-- main X server :0
dtlogin <:0>
+-- my script +-- Xvnc server
dtlogin <:1>
i.e. my script sh process did not terminate launching Xvnc. I tried
putting a nohup and an exit, but it did not work.
Finally I put the invocation of Xvnc which is now quite short directly
in Xservers ET VOILA' ! IT WORKS !
The logout button kills the Xvnc server, and dtlogin restarts it.
The only minor problem I have is that the pid is not written in a file,
and also /sbin/init.d/xlogin stop cannot find it and kill it, but I will
find a workaround.
----------------------------------------------------------------------------
Lucio Chiappetti - IASF/CNR - via Bassini 15 - I-20133 Milano (Italy)
----------------------------------------------------------------------------
"There are no news of scientific discoveries done by administration boards,
presidents or directors general"
L.Maiani - CERN & INFN - Corriere della Sera 06/02/2003
----------------------------------------------------------------------------
For more info : http://www.mi.iasf.cnr.it/~lucio/personal.html
----------------------------------------------------------------------------
_______________________________________________
VNC-List mailing list
[EMAIL PROTECTED]
http://www.realvnc.com/mailman/listinfo/vnc-list