VNC connection lost when initiating telnet session quits

Dr Robert Young rcyoung "at" aliconsultants.com
Fri Apr 29 19:27:01 2005


Tried the following after telnet into server system & doing
su -root

# $SHELL
# /usr/local/bin/vncserver

New 'ultra10:1 ()' desktop is ultra10:1

Starting applications specified in //.vnc/xstartup
Log file is //.vnc/ultra10:1.log

# ps -a
    PID TTY      TIME CMD
   1141 pts/1    0:00 vncconfi
   1120 pts/1    0:00 sh
   1052          0:00 <defunct>
   1126 pts/1    0:00 sh
   1142 pts/1    0:00 xterm
   1145 pts/1    0:00 twm
   1135 pts/1    0:00 Xvnc
   1149 pts/1    0:00 ps
   1011          0:00 <defunct>
#exit

Everything is still running at this point, and I am still in as root

# ps -a
    PID TTY      TIME CMD
   1141 pts/1    0:00 vncconfi
   1120 pts/1    0:00 sh
   1052          0:00 <defunct>
   1150 pts/1    0:00 ps
   1142 pts/1    0:00 xterm
   1145 pts/1    0:00 twm
   1135 pts/1    0:00 Xvnc
   1011          0:00 <defunct>
# exit
$

Back as original telnet 'login' user

$ ps -A
    PID TTY      TIME CMD
      0 ?        0:00 sched
      1 ?        0:00 init
      2 ?        0:00 pageout
      3 ?        2:50 fsflush
    266 ?        0:00 sac
    228 ?        0:00 utmpd
    119 ?        0:00 in.route
    125 ?        0:00 rpcbind
    127 ?        0:00 keyserv
    163 ?        0:00 lockd
    164 ?        0:00 inetd
    165 ?        0:00 statd
    171 ?        0:00 automoun
    207 ?        0:00 lpsched
    180 ?        0:00 syslogd
    202 ?        0:00 nscd
   1141 pts/1    0:00 vncconfi
    220 ?        0:00 powerd
    186 ?        0:00 cron
    268 console  0:00 ttymon
    235 ?        0:00 vold
    282 ?        0:00 mibiisa
    272 ?        0:00 ttymon
    281 ?        0:01 Xsun
    285 ?        0:00 fbconsol
    253 ?        0:00 snmpdx
   1092 ?        0:00 in.telne
    260 ?        0:00 dmispd
    262 ?        0:00 snmpXdmi
    297 ?        0:00 dtgreet
    283 ?        0:00 dtlogin
    271 ?        0:00 dtlogin
   1151 pts/1    0:00 ps
    298 ?        0:00 sendmail
   1052          0:00 <defunct>
    330 ?        0:00 rpc.ttdb
   1142 pts/1    0:00 xterm
   1045 ?        0:01 dtwm
   1010 ?        0:00 ttsessio
   1145 pts/1    0:00 twm
   1143 pts/2    0:00 sh
   1051 ?        0:00 ttsessio
   1135 pts/1    0:00 Xvnc
   1011          0:00 <defunct>
   1094 pts/1    0:00 sh
   1004 ?        0:01 dtwm

Server is up and running with no problems. VNC client attaches and you 
see vncconfig and an xterm (std config).


Exit out of initial telnet session entirely, and while grey desktop &  
'X' cursor remains, xterm and any other apps  'disapper'.

Logging back in w/ telent you see the following

Last login: Fri Apr 29 14:00:34 from 208.246.88.151
Sun Microsystems Inc.   SunOS 5.7       Generic October 1998
$ ps -A
    PID TTY      TIME CMD
      0 ?        0:00 sched
      1 ?        0:00 init
      2 ?        0:00 pageout
      3 ?        2:50 fsflush
    266 ?        0:00 sac
    228 ?        0:00 utmpd
    119 ?        0:00 in.route
    125 ?        0:00 rpcbind
    127 ?        0:00 keyserv
    163 ?        0:00 lockd
    164 ?        0:00 inetd
    165 ?        0:00 statd
    171 ?        0:00 automoun
    207 ?        0:00 lpsched
    180 ?        0:00 syslogd
    202 ?        0:00 nscd
    220 ?        0:00 powerd
    186 ?        0:00 cron
    268 console  0:00 ttymon
    235 ?        0:00 vold
    282 ?        0:00 mibiisa
    272 ?        0:00 ttymon
    281 ?        0:01 Xsun
    285 ?        0:00 fbconsol
    253 ?        0:00 snmpdx
   1154 pts/1    0:00 sh
    260 ?        0:00 dmispd
    262 ?        0:00 snmpXdmi
    297 ?        0:00 dtgreet
    283 ?        0:00 dtlogin
    271 ?        0:00 dtlogin
    298 ?        0:00 sendmail
   1052          0:00 <defunct>
    330 ?        0:00 rpc.ttdb
   1045 ?        0:01 dtwm
   1010 ?        0:00 ttsessio
   1152 ?        0:00 in.telne
   1051 ?        0:00 ttsessio
   1135 ?        0:01 Xvnc
   1011          0:00 <defunct>
   1160 pts/1    0:00 ps
   1004 ?        0:01 dtwm
$

As suspected, the Xvnc server is there, but vxcconfig and the xterm 
which had both been started in the Xvnc server session are missing.

The question is why?

I do not need ssh for this system as it is already behind a full 
firewall, and my "viewing" of it is also contained completely behind 
the firewall ( mostly, it is for testing and sits in a back room 
unattended). I am mimicing a setup at a remote site, and when viewing 
the remote location ( for real 'work') I will be going through a VPN.


On Apr 29, 2005, at 1:09 PM, Sean Kamath wrote:

>
> I have a vague recollection of process leader problems with telnet (I
> too use SSH, as it is the only reasonable way to go these days. ;-)).
>
> Try this:
>
> <prompt> $SHELL
> <prompt> vncserver
> <prompt> exit
> <prompt> ps -ef | grep Xvnc
> <prompt> ptree <Xvnc-pid>
>
> Make sure that Xvnc has all the appropriate processes running. ;-)
>
> Sean
>
> [In a message on Fri, 29 Apr 2005 08:54:54 EDT,
>   John Aldrich wrote:]
>> That's strange... On my linux box, I can log out of all SSH sessions 
>> (I
>> don't "do" telnet for security reasons!) and my server stays up and 
>> running.
>> It almost sounds like the X session is checking to make sure the user 
>> who
>> started the session is still logged in and is using their defaults, 
>> but when
>> the user logs out, it doesn't know what window manager to use.
>> 	John
>>
>> -----Original Message-----
>> From: Dr Robert Young [mailto:rcyoung "at" aliconsultants.com]
>> Sent: Friday, April 29, 2005 8:24 AM
>> To: vnc-list "at" realvnc.com
>> Subject: VNC connection lost when initiating telnet session quits
>>
>>
>> Let's say I start the vncserver from an initial telnet session.
>>
>> Using the  VNC server for Solaris 7, the same session "stays" open 
>> when
>> I start/stop the VNC client.  So far it behaves as expected.
>>
>> However, if I exit the telnet session which started the server,  all
>> the desktop apps "disappear" and I have a grey backdrop. If I then
>> "kill" the server, the client says the server connection has been
>> terminated.
>>
>> I have tried "nohup vncserver &" with the same results, and started 
>> the
>> window manager /xterm in xstartup using nohup ---& as well with the
>> same results. .
>>
>> Any ideas? I have a nagging feeling I have seen something like this
>> before 10-15 yrs ago, but memory fails.
>> _______________________________________________
>> VNC-List mailing list
>> VNC-List "at" realvnc.com
>> To remove yourself from the list visit:
>> http://www.realvnc.com/mailman/listinfo/vnc-list
>> _______________________________________________
>> VNC-List mailing list
>> VNC-List "at" realvnc.com
>> To remove yourself from the list visit:
>> http://www.realvnc.com/mailman/listinfo/vnc-list
>>
>
> Sean