mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-24 17:14:01 +01:00
vncserver: more debug output for xstartup
- Use "set -x" in generated xstartup. - Announce running xstartup in logs.
This commit is contained in:
parent
21d2ae5018
commit
7d6244fe1c
@ -198,6 +198,7 @@ generate_xstartup() {
|
|||||||
|
|
||||||
cat <<-SCRIPT > "$xstartup_script"
|
cat <<-SCRIPT > "$xstartup_script"
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -x
|
||||||
$de_cmd
|
$de_cmd
|
||||||
SCRIPT
|
SCRIPT
|
||||||
chmod +x "$xstartup_script"
|
chmod +x "$xstartup_script"
|
||||||
|
@ -669,9 +669,10 @@ sub RunXstartup {
|
|||||||
DetectAndExportDisplay();
|
DetectAndExportDisplay();
|
||||||
$ENV{VNCDESKTOP}= $desktopName;
|
$ENV{VNCDESKTOP}= $desktopName;
|
||||||
|
|
||||||
|
my $xstartupCmd = "{ echo 'Running $xstartupFile'; $xstartupFile; }";
|
||||||
if ($opt{'-fg'}) {
|
if ($opt{'-fg'}) {
|
||||||
if (! $skipxstartup) {
|
if (! $skipxstartup) {
|
||||||
system("$xstartupFile >> " . quotedString($desktopLog) . " 2>&1");
|
system("$xstartupCmd >> " . quotedString($desktopLog) . " 2>&1");
|
||||||
}
|
}
|
||||||
if (IsXvncRunning()) {
|
if (IsXvncRunning()) {
|
||||||
$opt{'-kill'} = ':'.$displayNumber;
|
$opt{'-kill'} = ':'.$displayNumber;
|
||||||
@ -680,12 +681,12 @@ sub RunXstartup {
|
|||||||
} else {
|
} else {
|
||||||
if ($opt{'-autokill'}) {
|
if ($opt{'-autokill'}) {
|
||||||
if (! $skipxstartup) {
|
if (! $skipxstartup) {
|
||||||
system("($xstartupFile; $0 -kill :$displayNumber) >> "
|
system("($xstartupCmd; $0 -kill :$displayNumber) >> "
|
||||||
. quotedString($desktopLog) . " 2>&1 &");
|
. quotedString($desktopLog) . " 2>&1 &");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (! $skipxstartup) {
|
if (! $skipxstartup) {
|
||||||
system("$xstartupFile >> " . quotedString($desktopLog)
|
system("$xstartupCmd >> " . quotedString($desktopLog)
|
||||||
. " 2>&1 &");
|
. " 2>&1 &");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user