[pkg-remote-commits] [x2goserver] 04/15: debian/patches: Add 1002_backport-x2golistshadowsessions.patch. Backport x2golistshadowsessions script, required by Python X2Go for proper desktop sharing support.

Mike Gabriel sunweaver at debian.org
Tue Dec 27 19:59:11 UTC 2016


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

sunweaver pushed a commit to branch master
in repository x2goserver.

commit 46bce19a6e27f12b08be3827e5fa93cf70b4a9a3
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Mon Dec 26 22:37:42 2016 +0100

    debian/patches: Add 1002_backport-x2golistshadowsessions.patch. Backport x2golistshadowsessions script, required by Python X2Go for proper desktop sharing support.
---
 .../1002_backport-x2golistshadowsessions.patch     | 94 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 95 insertions(+)

diff --git a/debian/patches/1002_backport-x2golistshadowsessions.patch b/debian/patches/1002_backport-x2golistshadowsessions.patch
new file mode 100644
index 0000000..c09a7c2
--- /dev/null
+++ b/debian/patches/1002_backport-x2golistshadowsessions.patch
@@ -0,0 +1,94 @@
+Origin: http://code.x2go.org/gitweb?p=x2goserver.git;a=history;f=x2goserver/bin/x2golistshadowsessions;h=78e8ae65707edb90be07e761cc5d41639c4feff1;hb=5d9df9b6a3e2dbf6ae2fe70da65f830920d3d792
+Comment:
+ Backported to X2Go Server 4.0.1.x by Mike Gabriel <mike.gabriel at das-netzwerkteam.de>.
+
+--- /dev/null
++++ b/x2goserver/bin/x2golistshadowsessions
+@@ -0,0 +1,87 @@
++#!/usr/bin/perl
++
++# Copyright (C) 2007-2015 X2Go Project - http://wiki.x2go.org
++#
++# This program is free software; you can redistribute it and/or modify
++# it under the terms of the GNU General Public License as published by
++# the Free Software Foundation; either version 2 of the License, or
++# (at your option) any later version.
++#
++# This program is distributed in the hope that it will be useful,
++# but WITHOUT ANY WARRANTY; without even the implied warranty of
++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++# GNU General Public License for more details.
++#
++# You should have received a copy of the GNU General Public License
++# along with this program; if not, write to the
++# Free Software Foundation, Inc.,
++# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
++#
++# Copyright (C) 2007-2015 Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
++# Copyright (C) 2007-2015 Heinz-Markus Graesing <heinz-m.graesing at obviously-nice.de>
++
++use strict;
++use Sys::Hostname;
++use Sys::Syslog qw( :standard :macros );
++
++use lib `x2gopath lib`;
++use x2godbwrapper; 
++use x2gologlevel;
++
++my $x2go_lib_path = `x2gopath libexec`;
++
++openlog($0,'cons,pid','user');
++setlogmask( LOG_UPTO(x2gologlevel()) );
++
++if ( @ARGV ) {
++	syslog('info', "x2golistshadowsessions has been called with options: @ARGV");
++} else {
++	# hiding normal x2golistshadowsessions calls into debug loglevel
++	syslog('debug', "x2golistshadowsessions has been called with no option");
++}
++
++
++my $serv=shift;
++if( ! $serv)
++{
++	$serv=hostname;
++}
++
++my @outp;
++if($serv eq "--all-servers")
++{
++	@outp=db_listshadowsessions_all();
++}
++else
++{
++	@outp=db_listshadowsessions($serv);
++}
++
++for (my $i=0;$i<@outp;$i++)
++{
++	@outp[$i] =~ s/ //g;
++	@outp[$i] =~ s/\*/ /g;
++	my @sinfo=split('\\|',"@outp[$i]");
++	if (@sinfo[4]eq 'F')
++	{
++		print "@outp[$i]\n";
++	}
++	else
++	{ 
++		if (@sinfo[4]eq 'R')
++		{
++			my $shadow_user = @sinfo[1];
++			$shadow_user =~ s/.*XSHAD(.*)XSHADPP.*/$1/;
++			if(session_is_suspended(@sinfo[1], $shadow_user))
++			{
++				db_changestatus( 'S', @sinfo[1] );
++				@outp[$i] =~ s/\|R\|/\|S\|/;
++				system("x2goumount-session","@sinfo[1]");
++			}
++		}
++		print "@outp[$i]\n";
++	}
++}
++
++# closing syslog 
++closelog;
diff --git a/debian/patches/series b/debian/patches/series
index ec018f7..774541f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 1001_backport-x2goserver-x2goagent.patch
+1002_backport-x2golistshadowsessions.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-remote/x2goserver.git



More information about the pkg-remote-commits mailing list