[X2Go-Dev] Bug#799: x2golistdesktops - ss options

Orion Poplawski orion at cora.nwra.com
Thu Sep 22 05:43:51 CEST 2016


So, it appears to be well known that 'ss -lxu' has been broken on some 
systems and returns nothing.  This is currently true on EL 7.2 though 
appears fixed in 7.3 beta.

However, why is -u being passed to ss in the first place?  We're doing:

my $lines=system_capture_stdout_output("ss", "-lxu");
my @lines=split("\n", "$lines");
my @outp = grep ( /(@| )\/tmp\/.X11-unix\/X.*/, @lines);
for(my $i=0;$i<@outp;$i++)
{
...

so we're filtering the output of ss for lines that look like unix 
sockets (/tmp/.X11-unix/X*), so -lx is appropriate.  But why use '-u' to 
show UDP sockets?  No X server that I know of listens on UDP and we 
certainly would filter it out anyway.

diff --git a/x2goserver/bin/x2golistdesktops 
b/x2goserver/bin/x2golistdesktops
index 386ed17..1cbc7ef 100755
--- a/x2goserver/bin/x2golistdesktops
+++ b/x2goserver/bin/x2golistdesktops
@@ -66,7 +66,7 @@ my $uname=$ENV{'USER'};
  # -> so we need to tweak the PATH env var a little here...
  my $old_PATH=$ENV{'PATH'};
  $ENV{'PATH'}="$ENV{'PATH'}:/usr/sbin:/sbin";
-my $lines=system_capture_stdout_output("ss", "-lxu");
+my $lines=system_capture_stdout_output("ss", "-lx");
  $ENV{'PATH'}=$old_PATH;
  undef $old_PATH;

See also https://bugzilla.redhat.com/show_bug.cgi?id=1371690

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  orion at cora.nwra.com
Boulder, CO 80301              http://www.cora.nwra.com


More information about the x2go-dev mailing list