Package: x2godesktopsharing Version: 3.1.1.1-0~131~ubuntu12 Hi, my server had a ‘weird’ file in /tmp/.X11-unix/ for which xwininfo would never return, locking up x2golistdesktops. The solution is to provide a timeout for the shell call to xwininfo. This can be accomplished either using the shell command ‘timeout’ or the Perl IPC::Run module (as described in the first response to http://stackoverflow.com/questions/16918005/time-out-when-using-system-cmd-i...). For my purpose, I’ve used the shell timeout command. Patch below. -Greg --- /usr/bin/x2golistdesktops 2014-04-03 10:14:22.000000000 -0500 +++ x2golistdesktops 2014-07-09 16:43:54.000000000 -0500 @@ -43,7 +43,7 @@ $serv=hostname; } -my $rsess=`x2golistsessions x2goserver |grep _stR`; +my $rsess=`timeout 1s x2golistsessions x2goserver |grep _stR`; my @rsess=split("\n","$rsess"); my @rdisplays; for (my $i=0;$i<@rsess;$i++) @@ -67,7 +67,7 @@ $checkdisp="${checkdisp}I"; if (!( $rdisp =~ m/$checkdisp/ )) { - my $inf=`xwininfo -root -display $display 2> /dev/null`; + my $inf=`timeout 1s xwininfo -root -display $display 2> /dev/null`; if ( $inf=~ m/geometry/) { print "$uname\@$display\n"; @@ -88,4 +88,4 @@ } # closing syslog -closelog; \ No newline at end of file +closelog; w
Control: tag -1 patch On Mi 09 Jul 2014 23:57:09 CEST, Gregory R. Warnes wrote:
Hi, my server had a ?weird? file in /tmp/.X11-unix/ for which xwininfo would never return, locking up x2golistdesktops.
The solution is to provide a timeout for the shell call to xwininfo. This can be accomplished either using the shell command ?timeout? or the Perl IPC::Run module (as described in the first response to http://stackoverflow.com/questions/16918005/time-out-when-using-system-cmd-i...).
For my purpose, I?ve used the shell timeout command. Patch below.
-Greg
--- /usr/bin/x2golistdesktops 2014-04-03 10:14:22.000000000 -0500 +++ x2golistdesktops 2014-07-09 16:43:54.000000000 -0500 @@ -43,7 +43,7 @@ $serv=hostname; }
-my $rsess=`x2golistsessions x2goserver |grep _stR`; +my $rsess=`timeout 1s x2golistsessions x2goserver |grep _stR`; my @rsess=split("\n","$rsess"); my @rdisplays; for (my $i=0;$i<@rsess;$i++) @@ -67,7 +67,7 @@ $checkdisp="${checkdisp}I"; if (!( $rdisp =~ m/$checkdisp/ )) {
my $inf=`xwininfo -root -display $display 2> /dev/null`;
@@ -88,4 +88,4 @@ }my $inf=`timeout 1s xwininfo -root -display $display 2> /dev/null`; if ( $inf=~ m/geometry/) { print "$uname\@$display\n";
closing syslog
-closelog; \ No newline at end of file +closelog; w
The glorious question here is, actually: Why does xwininfo hang in the first place? Mike -- DAS-NETZWERKTEAM mike gabriel, herweg 7, 24357 fleckeby fon: +49 (1520) 1976 148 GnuPG Key ID 0x25771B31 mail: mike.gabriel@das-netzwerkteam.de, http://das-netzwerkteam.de freeBusy: https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xf...
Processing control commands:
tag -1 patch Bug #543 [x2godesktopsharing] x2golistdesktops locks up if xwininfo does Added tag(s) patch.
-- 543: http://bugs.x2go.org/cgi-bin/bugreport.cgi?bug=543 X2Go Bug Tracking System Contact owner@bugs.x2go.org with problems