[X2Go-Commits] [x2goserver] 01/01: Handle execution of ss command from Perl script x2golistdesktops in a way that not only works on Debian, but also on Fedora et al. (Fixes: #727).

git-admin at x2go.org git-admin at x2go.org
Thu Jan 8 23:28:21 CET 2015


This is an automated email from the git hooks/post-receive script.

x2go pushed a commit to branch master
in repository x2goserver.

commit f3f12d1819358956e7d2d6f89f1b4b204cce3e80
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Thu Jan 8 23:26:22 2015 +0100

    Handle execution of ss command from Perl script x2golistdesktops in a way that not only works on Debian, but also on Fedora et al. (Fixes: #727).
---
 debian/changelog                |    2 ++
 x2goserver/bin/x2golistdesktops |    8 ++++++++
 2 files changed, 10 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 1e80d95..f4b223b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -205,6 +205,8 @@ x2goserver (4.0.1.19-0x2go1) UNRELEASED; urgency=medium
       mountpoints erroneously registered sshfs mountpoints if sshfs command
       times out. Furthermore, print errors to STDERR (not STDOUT). (Fixes:
       #405).
+    - Handle execution of ss command from Perl script x2golistdesktops in a way
+      that not only works on Debian, but also on Fedora et al. (Fixes: #727).
   * debian/control:
     + Add D (x2goserver): libfile-which-perl.
     + Add C (x2goserver: x2godesktopsharing (<< 3.1.1.2).
diff --git a/x2goserver/bin/x2golistdesktops b/x2goserver/bin/x2golistdesktops
index 7bbb8f9..386ed17 100755
--- a/x2goserver/bin/x2golistdesktops
+++ b/x2goserver/bin/x2golistdesktops
@@ -61,7 +61,15 @@ my $rdisp=join("I", at rdisplays);
 $rdisp="I${rdisp}I";
 
 my $uname=$ENV{'USER'};
+
+# on Debian the ss command is in /usr/bin, on Fedora, it is in /usr/sbin...
+# -> 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");
+$ENV{'PATH'}=$old_PATH;
+undef $old_PATH;
+
 my @lines=split("\n", "$lines");
 
 my @outp = grep ( /(@| )\/tmp\/.X11-unix\/X.*/, @lines);

--
Alioth's /srv/git/_hooks_/post-receive-email on /srv/git/code.x2go.org/x2goserver.git


More information about the x2go-commits mailing list