On Tue, Mar 01, 2011 at 05:13:33AM -0600, DRC wrote: > TurboVNC implements this more simply as a "vncserver -fg" switch, which > means "run in the foreground". It does the same thing you are doing > below, except that it uses the built-in kill() function, which is safer > than trying to invoke another instance of vncserver with -kill: > > if ($opt{'-fg'}) { > system("$vncUserDir/xstartup >> " . "edString($desktopLog) . " > 2>&1"); > if (kill 0, `cat $pidFile`) { > $opt{'-kill'} = ':'.$displayNumber; > &Kill(); > } > } else { > system("$vncUserDir/xstartup >> " . "edString($desktopLog) . " > 2>&1 &"); > } > > As you know, the implication of being able to kill Xvnc after the window > manager exits is that vncserver has to run as a foreground process > rather than returning control to the console.
I had the same problem long ago, I modifed the vncserver script this way: system("($vncStartup ; $0 -kill :$displayNumber )>> " . "edString($desktopLog) . " 2>&1 &") if ($vncStartup); The change is minimal and it does not change the function/parameters of vncserver [except, that Xvnc is killed, after the session/window manager exits]. Regards, Martin Kögler ------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev _______________________________________________ Tigervnc-devel mailing list Tigervnc-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tigervnc-devel