$ENV{VNCDESKTOP}= $desktopName;
if ($opt{'-fg'}) {
- system("$vncUserDir/xstartup >> " . "edString($desktopLog) . " 2>&1");
- if (kill 0, `cat $pidFile`) {
- $opt{'-kill'} = ':'.$displayNumber;
- &Kill();
- }
+ close(STDIN);
+ system("($vncUserDir/xstartup; $0 -kill :$displayNumber) >> " . "edString($desktopLog) . " 2>&1");
} else {
- system("($vncUserDir/xstartup; $0 -kill :$displayNumber) >> " . "edString($desktopLog) . " 2>&1 &");
+ system("$vncUserDir/xstartup >> " . "edString($desktopLog) . " 2>&1 &");
}
exit;
-.TH vncserver 1 "15 Apr 2009" "TigerVNC" "Virtual Network Computing"
+.TH vncserver 1 "13 Mar 2011" "TigerVNC" "Virtual Network Computing"
.SH NAME
vncserver \- start or stop a VNC server
.SH SYNOPSIS
.TP
.B \-fg
-This version of vncserver will always launch Xvnc in such a way that, when the
-user exits the window manager in their VNC session, Xvnc will terminate.
-Specifying this option will additionally make Xvnc run as a foreground process,
-which means that it can be aborted with CTRL-C. This may be necessary when
-launching TigerVNC from within certain grid computing environments.
+Runs Xvnc as a foreground process. This has two effects: (1) The VNC server
+can be aborted with CTRL-C, and (2) the VNC server will exit as soon as the
+user logs out of the window manager in the VNC session. This may be necessary
+when launching TigerVNC from within certain grid computing environments.
.SH FILES
Several VNC-related files are found in the directory $HOME/.vnc: