diff --git a/unix/vncserver b/unix/vncserver index e84a90f..1b32498 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -124,23 +124,14 @@ unless (&IsXvncRunning()) { warn "\nNew '$desktopName' desktop is $host:$displayNumber\n"; warn "\nUsername: $vncUserName\n\n"; +warn "Log file is $desktopLog\n\n"; if (! $skipxstartup) { &CreateXstartupIfNeeded(); } - &CreateUserConfigIfNeeded(); -# Run the X startup script. if (! $skipxstartup) { - warn "Starting applications specified in $xstartupFile\n"; -} -warn "Log file is $desktopLog\n\n"; - -if (! $skipxstartup) { - &DetectAndExportDisplay(); - $ENV{VNCDESKTOP}= $desktopName; - &RunXstartup(); } @@ -663,6 +654,10 @@ sub DetectAndExportDisplay { } sub RunXstartup { + warn "Starting applications specified in $xstartupFile\n"; + &DetectAndExportDisplay(); + $ENV{VNCDESKTOP}= $desktopName; + if ($opt{'-fg'}) { if (! $skipxstartup) { system("$xstartupFile >> " . "edString($desktopLog) . " 2>&1");