tigervncserver wrapper does not handle -query option

Bug #2021434 reported by Bjoern Kahl
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tigervnc (Ubuntu)
Fix Released
Low
Unassigned

Bug 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 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

Tags: patch
Revision history for this message
Bjoern Kahl (bjokash) wrote :
description: updated
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Fix for this bug (query option not supported by tigervncserver)" seems to be a patch. If it isn't, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are a member of the ~ubuntu-reviewers, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issues please contact him.]

tags: added: patch
Revision history for this message
Brian Murray (brian-murray) wrote :

The tigervnc package in Ubuntu is actually in sync with the version of the package in Debian. Subsequently, the best path forward here is to get the bug you've found fixed in Debian. The source code for tigervnc can be found at https://salsa.debian.org/debian-remote-team/tigervnc and you may be able to create a pull request there. Alternatively, you could open a bug report in the Debian bug tracker and include your patch. Details for working with the Debian bug tracker can be found at https://www.debian.org/Bugs/Reporting. Thanks!

Changed in tigervnc (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tigervnc - 1.13.1+dfsg-2

---------------
tigervnc (1.13.1+dfsg-2) unstable; urgency=medium

  [ Bjoern Kahl ]
  * Handle the "-query" option of Xtigervnc correctly (LP: #2021434).
  * Don't autokill Xtigervnc when the "-noxstartup" option is given.

 -- Joachim Falk <email address hidden> Sat, 13 Jan 2024 10:29:13 +0100

Changed in tigervnc (Ubuntu):
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.