2023-05-28 22:17:43 |
Bjoern Kahl |
description |
The wrapper script "tigervncserver" does not handle the "-query" option of Xtigervnc correctly.
when called as "tigervncserver :2 -name desktopname -query localhost -noxstartup" it correctly passes "-query" on to Xtigervnc, but fails to pass corresponding "localhost" argument to the Xtigervnc sever, resulting in failed server start. Furthermore, the argument to "-query" is confused as session parameter or other parameter meaningful to the wrapper script.
Root case seems the parameter "-query" is completely missing from the list of expected parameters.
The following change would fix the problem:
diff -u -r tigervnc-1.12.0+dfsg/debian/helpers/usr/share/perl5/TigerVNC/Config.pm /usr/share/perl5/TigerVNC/Config.pm
--- tigervnc-1.12.0+dfsg/debian/helpers/usr/share/perl5/TigerVNC/Config.pm 2022-01-26 20:01:10.000000000 +0100
+++ /usr/share/perl5/TigerVNC/Config.pm 2023-05-28 21:26:52.917826596 +0200
@@ -494,6 +494,7 @@
# Backward compatible configuration file option for fp
[ 2, 'fontPath=s' => 'fontPath' ],
# Options only for tigervncserver
+ [14, 'query=s' => 'query' ],
[14, 'geometry=s' => sub {
if (@_ == 2) {
my $geometry = $_[1] // "undef";
@@ -565,6 +566,7 @@
[ 4, 'noxstartup' => sub {
if (@_ == 2) {
&{$override}('vncStartup', undef);
+ &{$override}('autokill', 0);
} elsif (defined $options->{'src'}->{'vncStartup'}) {
return !defined $options->{'vncStartup'};
} else {
First change adds the missing option and fixes the failing server startup.
Second change fixes the related bug, that specifying the "-noxstartup" option results in killing a server moments after it has completed startup, due to no session process remaining.
I am not sure what is the preferred way to propose a fix. Please advise if I should open a pull request somewhere or what else is the correct way.
Distribution version:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
Package:
Package: tigervnc-standalone-server
Version: 1.12.0+dfsg-4
State: installed |
The wrapper script "tigervncserver" does not handle the "-query" option of Xtigervnc correctly.
When called as "tigervncserver :2 -name desktopname -query localhost -noxstartup" it correctly passes "-query" on to Xtigervnc, but fails to pass the corresponding "localhost" argument to the Xtigervnc sever, resulting in failed server start. Furthermore, the argument to "-query" is confused as session parameter or other parameter meaningful to the wrapper script.
Root cause seems, that the parameter "-query" is completely missing from the list of expected parameters.
The following change would fix the problem:
diff -u -r tigervnc-1.12.0+dfsg/debian/helpers/usr/share/perl5/TigerVNC/Config.pm /usr/share/perl5/TigerVNC/Config.pm
--- tigervnc-1.12.0+dfsg/debian/helpers/usr/share/perl5/TigerVNC/Config.pm 2022-01-26 20:01:10.000000000 +0100
+++ /usr/share/perl5/TigerVNC/Config.pm 2023-05-28 21:26:52.917826596 +0200
@@ -494,6 +494,7 @@
# Backward compatible configuration file option for fp
[ 2, 'fontPath=s' => 'fontPath' ],
# Options only for tigervncserver
+ [14, 'query=s' => 'query' ],
[14, 'geometry=s' => sub {
if (@_ == 2) {
my $geometry = $_[1] // "undef";
@@ -565,6 +566,7 @@
[ 4, 'noxstartup' => sub {
if (@_ == 2) {
&{$override}('vncStartup', undef);
+ &{$override}('autokill', 0);
} elsif (defined $options->{'src'}->{'vncStartup'}) {
return !defined $options->{'vncStartup'};
} else {
First change adds the missing option and fixes the failing server startup.
Second change fixes the related bug, that specifying the "-noxstartup" option results in killing a server moments after it has completed startup, due to no session process remaining.
I am not sure what is the preferred way to propose a fix. Please advise if I should open a pull request somewhere or what else is the correct way.
Distribution version:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
Package:
Package: tigervnc-standalone-server
Version: 1.12.0+dfsg-4
State: installed |
|