[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:23 CET 2015
This is an automated email from the git hooks/post-receive script.
x2go pushed a commit to branch release/4.0.1.x
in repository x2goserver.
commit fc13fb3d6f48d698921912c878886ef50098a54a
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).
Conflicts (resolved by Mike Gabriel):
x2goserver/bin/x2golistdesktops
---
debian/changelog | 2 ++
x2goserver/bin/x2golistdesktops | 8 ++++++++
2 files changed, 10 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index bf219da..12a0415 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -60,6 +60,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 8401070..8fcfc47 100755
--- a/x2goserver/bin/x2golistdesktops
+++ b/x2goserver/bin/x2golistdesktops
@@ -60,7 +60,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=`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