[X2go-Commits] x2goserver.git - backport-lenny (branch) updated: 3.1.1.6-19-gfe1ca49

X2Go dev team git-admin at x2go.org
Fri Nov 9 11:37:23 CET 2012


The branch, backport-lenny has been updated
       via  fe1ca4911889c8da22c50184293e1f4635718a21 (commit)
       via  623a4649daca7f1489b3441f44f24f5f58db2cfa (commit)
       via  3328841f3bd32a01c722fa87bc2fa46e69366de4 (commit)
       via  66574504720a2b2b4c3e096ef92945a676515e23 (commit)
       via  66f150790fc68cc50eade2e070876d04adf2e851 (commit)
       via  07524db03a6c42a54941a03be6637b0ded80a448 (commit)
       via  de0ef239a7408fd7299f2ea599da91f975f3ffad (commit)
       via  ec11165bab6086fa649109a0814eba328a47d69a (commit)
       via  3e7f787ba06ffd6a90e48816cd1789b76ada4d64 (commit)
       via  fe8874ec148a015f0bff75407e00aa1b9ee9a99a (commit)
       via  abf5ce667307f34bfb034c4ff19dee74665c37e8 (commit)
       via  e8c4fc15d16b315d4471243f8dbb33d2eda2f900 (commit)
       via  c7d7bc79b50bd7c5691793218f11ec7375f2dcc8 (commit)
       via  3a9f412b1710c1b20a9e9b233c92532611dda001 (commit)
       via  cb4796d026014e9e07ec9ea3e80106bc03697f2f (commit)
       via  5cc4d72358fd7f99aeec74ce346f526315f33999 (commit)
       via  f8015d5c95b5d376bdf02b2fc7096c21ed368ce0 (commit)
       via  8da7d3082b406641fa2d4f363b51300b1c639bfa (commit)
       via  97ae712cc1fbfab753c0a0a1634550e97cc9aac7 (commit)
       via  7dced6158846f4cd2a7f1c9f2f94eef8225ff387 (commit)
       via  504167bac89b55b9f21047676ddde3a5deeceb95 (commit)
       via  973db626cf5d84e7c62bb6dc58c094f86512db1a (commit)
       via  3b891b928323f52e8a539e2f165fc06712e2124f (commit)
       via  a41afc38aa2e342dfb8c592a674ff3a9f52c54d4 (commit)
       via  0b3c71ca7b6e3681a2ade80346621b22ffa7f255 (commit)
       via  98512000e2b0208849d93b97f0e9a216f0c18c28 (commit)
       via  1590476de31766028725fa1272dfcc50b7d1305e (commit)
       via  22ede8d3f939d849856feeaad0e777738fbeea9b (commit)
       via  df4c17c9ef5337a453323b0f933039a4b8cac9a5 (commit)
       via  0c3542c4b6710d97ad11f182e0ec8c0f5198b9e4 (commit)
       via  452498574b305425ec8a2e81b82ea86e4c5f67d4 (commit)
       via  2b68ff4432efb0f7058da0e4c8c3f2dfb446d459 (commit)
       via  df13257d3fe83b4e12f9117f39e82b05276c44a1 (commit)
       via  48ccfe5706cb5192fc0a4a83938db827b5565ee0 (commit)
       via  6b41cef9e10da4dee9f16c36f273c3d723208953 (commit)
       via  96046134086d5c2fc2fdb1345df32cc2af37e773 (commit)
       via  a35b196a82b523f24430b6977c61bc8d702f9d93 (commit)
       via  ead0462ea08a768e361aad48ebc0fb913c5c826d (commit)
       via  d70b136ab99623678f34c12f2175570a856eaa77 (commit)
       via  15f93bffe63a7d9eea3a7cb1fe12d531e92c113f (commit)
      from  0f06cbd2d9ac63f2067fd733495f80e28cfdb9e4 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit fe1ca4911889c8da22c50184293e1f4635718a21
Merge: 0f06cbd 623a464
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Fri Nov 9 11:34:01 2012 +0100

    Merge branch 'build-main' into backport-lenny
    
    Conflicts (resolved by Mike Gabriel):
    	debian/changelog
    	debian/control

-----------------------------------------------------------------------

Summary of changes:
 debian/changelog                                   |   75 +++++++++++++++++---
 debian/control                                     |   28 ++++----
 x2goserver-compat/VERSION.x2goserver-compat        |    2 +-
 .../VERSION.x2goserver-extensions                  |    2 +-
 .../VERSION.x2goserver-fmbindings                  |    2 +-
 x2goserver-printing/VERSION.x2goserver-printing    |    2 +-
 x2goserver-pyhoca/VERSION.x2goserver-pyhoca        |    2 +-
 x2goserver-xsession/VERSION.x2goserver-xsession    |    2 +-
 x2goserver/Makefile                                |    2 +-
 x2goserver/VERSION.x2goserver                      |    2 +-
 x2goserver/bin/x2gogetapps                         |   18 ++++-
 x2goserver/bin/x2gomountdirs                       |   32 ++++++++-
 x2goserver/bin/x2goruncommand                      |   24 ++++++-
 x2goserver/bin/x2gostartagent                      |    6 +-
 x2goserver/bin/x2goumount-session                  |   35 ++++++++-
 x2goserver/lib/x2gogetagent                        |    4 +-
 x2goserver/sbin/x2gocleansessions                  |    1 +
 17 files changed, 196 insertions(+), 43 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index d51f833..78c1e88 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,20 +1,73 @@
-x2goserver (3.1.1.3-0~x2go+bpo+lenny2) unstable; urgency=low
+x2goserver (3.1.1.6-0~x2go+bpo+lenny1) unstable; urgency=low
 
-  * Cherry-picks from upcoming version 3.1.1.4:
-    - Fix x2gosessionlimit script.
-  * /debian/control:
-    + Fix x2goagent dependency.
-
- -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Thu, 19 Jul 2012 16:35:22 +0200
-
-x2goserver (3.1.1.3-0~x2go+bpo+lenny1) unstable; urgency=low
-
-  * Backport current status of x2goserver (unreleased 3.1.1.3) to
+  * Backport current status of x2goserver (unreleased 3.1.1.6) to
     Debian lenny.
   * No DBI method sqlite_busy_timeout available on Debian lenny.
   
  -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Thu, 05 Apr 2012 15:37:39 +0200
 
+x2goserver (3.1.1.6-0~x2go1) unstable; urgency=low
+
+  * Bugfix release (3.1.1.6):
+    - Fix for non-well-tested x2gomountdirs script.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 07 Nov 2012 20:57:54 +0100
+
+x2goserver (3.1.1.5-0~x2go1) unstable; urgency=low
+
+  [ Stéphane Graber ]
+  * New upstream version (3.1.1.5):
+    - Add a very basic SIGCHLD handler to x2gocleansessions. on SIGCHLD
+      let the script wait for cleaning up after its children. (Closes
+      upstream issue #38).
+
+  [ Mike Gabriel ]
+  * New upstream version (3.1.1.5):
+    - Fix x2gogetapps when rendering multi-section .desktop files. (Closes
+      upstream issue #43).
+    - Remove redundant setting of loglevel in x2gogetapps.
+    - Fix ,,Only extend LD_LIBRARY_PATH by Xrandr extension for KDE. Breaks
+      GNOME.'' from last release.
+    - Detect i18n name of Desktop folder via XDG_DESKTOP_DIR environment
+      variable.
+    - Put option of database call in x2gogetagent into parantheses.
+  * /debian/control:
+    + Depend on libfile-basedir-perl.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Wed, 07 Nov 2012 16:36:36 +0100
+
+x2goserver (3.1.1.4-0~x2go1) unstable; urgency=low
+
+  [ Jan Engelhardt ]
+  * New upstream version (3.1.1.4):
+    - Add -pie as linker flag. Fixes non-position-independent-executable
+      (x2gosqlitewrapper.c). The executable is now completely position
+      independent.
+
+  [ Mike Gabriel ]
+  * New upstream version (3.1.1.4):
+    - Fix x2gosessionlimit script.
+    - Wrap padsp around rdesktop calls if pulse is used as audio protocol.
+    - Add option ,,-r sound:local'' to rdesktop calls if pulse is enabled.
+    - Proxy X2Go client-side shares into remote desktop session.
+    - For applications inside of a session, use NX's Xrandr library instead
+      of Xorg's Xrandr library (partially closes #28).
+    - Make sure when launching desktop session through the Xsession mechanism
+      that the LD_LIBRARY_PATH variable stays intact. Closes #29.
+    - Only extend LD_LIBRARY_PATH by Xrandr extension for KDE. Breaks GNOME.
+  * /debian/control:
+    + Maintainer change in package: X2Go Developers <x2go-dev at lists.berlios.de>.
+    + Depend on nx-libs (>=3.5.0.15-0~) which has the Xrandr symlinks folder.
+    + Add rdesktop and pulseaudio-utils to Suggests.
+    + Priority: optional.
+
+  [ Oleksandr Shneyder ]
+  * New upstream version (3.1.1.4):
+    - Remove "-nolisten tcp" option with XDMCP sessions.
+
+ -- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>  Tue, 25 Sep 2012 13:15:11 +0200
+>>>>>>> build-main
+
 x2goserver (3.1.1.3-0~x2go1) unstable; urgency=low
 
   [ Jan Engelhardt ]
diff --git a/debian/control b/debian/control
index 6d75646..6b6d933 100644
--- a/debian/control
+++ b/debian/control
@@ -1,9 +1,10 @@
 Source: x2goserver
 Section: x11
-Priority: extra
-Maintainer: Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>
+Priority: optional 
+Maintainer: X2Go Developers <x2go-dev at lists.berlios.de>
 Uploaders:
- Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
+ Mike Gabriel <mike.gabriel at das-netzwerkteam.de>,
+ Oleksandr Shneyder <oleksandr.shneyder at obviously-nice.de>,
 Build-Depends: 
  debhelper,
  man2html-base | man2html
@@ -17,7 +18,7 @@ Architecture: any
 Depends:
  ${shlibs:Depends},
  ${misc:Depends},
- x2goagent (>= 2:3.5.0.12-0~),
+ x2goagent (>= 2:3.5.0.16-0~),
  lsof,
  openssh-client,
  openssh-server,
@@ -25,6 +26,7 @@ Depends:
  makepasswd,
  libdbd-pg-perl,
  libdbd-sqlite3-perl,
+ libfile-basedir-perl,
  adduser,
  xauth,
  psmisc,
@@ -44,7 +46,9 @@ Suggests:
  x2goserver-compat (= ${source:Version}),
  x2goserver-xsession (= ${source:Version}),
  x2goserver-fmbindings (= ${source:Version}),
- x2goserver-pyhoca (= ${source:Version})
+ x2goserver-pyhoca (= ${source:Version}),
+ rdesktop,
+ pulseaudio-utils
 Breaks:
  x2goserver-one,
  x2goserver-home,
@@ -54,7 +58,7 @@ Replaces:
 Description: X2Go server daemon scripts
  X2Go is a server based computing environment with
     - session resuming
-    - low bandwith support
+    - low bandwidth support
     - LDAP support
     - client side mass storage mounting support
     - audio support
@@ -86,7 +90,7 @@ Suggests:
 Description: X2Go server daemon scripts (printing)
  X2Go is a server based computing environment with
     - session resuming
-    - low bandwith support
+    - low bandwidth support
     - LDAP support
     - client side mass storage mounting support
     - audio support
@@ -113,7 +117,7 @@ Depends:
 Description: X2Go server daemon scripts (backwards compatitbity to old client versions)
  X2Go is a server based computing environment with
     - session resuming
-    - low bandwith support
+    - low bandwidth support
     - LDAP support
     - client side mass storage mounting support
     - audio support
@@ -131,7 +135,7 @@ Depends:
 Description: X2Go server daemon scripts (extensions)
  X2Go is a server based computing environment with
     - session resuming
-    - low bandwith support
+    - low bandwidth support
     - LDAP support
     - client side mass storage mounting support
     - audio support
@@ -154,7 +158,7 @@ Depends:
 Description: X2Go server daemon scripts (Xsession runner)
  X2Go is a server based computing environment with
     - session resuming
-    - low bandwith support
+    - low bandwidth support
     - LDAP support
     - client side mass storage mounting support
     - audio support
@@ -178,7 +182,7 @@ Depends:
 Description: Generic (freedesktop-based) file manager bindings for X2Go
  X2Go is a server based computing environment with
     - session resuming
-    - low bandwith support
+    - low bandwidth support
     - LDAP support
     - client side mass storage mounting support
     - audio support
@@ -203,7 +207,7 @@ Depends:
 Description: X2Go server daemon scripts (add-ons for pyhoca client)
  X2Go is a server based computing environment with
     - session resuming
-    - low bandwith support
+    - low bandwidth support
     - LDAP support
     - client side mass storage mounting support
     - audio support
diff --git a/x2goserver-compat/VERSION.x2goserver-compat b/x2goserver-compat/VERSION.x2goserver-compat
index c7271d2..861a59a 100644
--- a/x2goserver-compat/VERSION.x2goserver-compat
+++ b/x2goserver-compat/VERSION.x2goserver-compat
@@ -1 +1 @@
-3.1.1.3
\ No newline at end of file
+3.1.1.6
\ No newline at end of file
diff --git a/x2goserver-extensions/VERSION.x2goserver-extensions b/x2goserver-extensions/VERSION.x2goserver-extensions
index c7271d2..861a59a 100644
--- a/x2goserver-extensions/VERSION.x2goserver-extensions
+++ b/x2goserver-extensions/VERSION.x2goserver-extensions
@@ -1 +1 @@
-3.1.1.3
\ No newline at end of file
+3.1.1.6
\ No newline at end of file
diff --git a/x2goserver-fmbindings/VERSION.x2goserver-fmbindings b/x2goserver-fmbindings/VERSION.x2goserver-fmbindings
index c7271d2..861a59a 100644
--- a/x2goserver-fmbindings/VERSION.x2goserver-fmbindings
+++ b/x2goserver-fmbindings/VERSION.x2goserver-fmbindings
@@ -1 +1 @@
-3.1.1.3
\ No newline at end of file
+3.1.1.6
\ No newline at end of file
diff --git a/x2goserver-printing/VERSION.x2goserver-printing b/x2goserver-printing/VERSION.x2goserver-printing
index c7271d2..861a59a 100644
--- a/x2goserver-printing/VERSION.x2goserver-printing
+++ b/x2goserver-printing/VERSION.x2goserver-printing
@@ -1 +1 @@
-3.1.1.3
\ No newline at end of file
+3.1.1.6
\ No newline at end of file
diff --git a/x2goserver-pyhoca/VERSION.x2goserver-pyhoca b/x2goserver-pyhoca/VERSION.x2goserver-pyhoca
index c7271d2..861a59a 100644
--- a/x2goserver-pyhoca/VERSION.x2goserver-pyhoca
+++ b/x2goserver-pyhoca/VERSION.x2goserver-pyhoca
@@ -1 +1 @@
-3.1.1.3
\ No newline at end of file
+3.1.1.6
\ No newline at end of file
diff --git a/x2goserver-xsession/VERSION.x2goserver-xsession b/x2goserver-xsession/VERSION.x2goserver-xsession
index c7271d2..861a59a 100644
--- a/x2goserver-xsession/VERSION.x2goserver-xsession
+++ b/x2goserver-xsession/VERSION.x2goserver-xsession
@@ -1 +1 @@
-3.1.1.3
\ No newline at end of file
+3.1.1.6
\ No newline at end of file
diff --git a/x2goserver/Makefile b/x2goserver/Makefile
index 115c929..979283b 100755
--- a/x2goserver/Makefile
+++ b/x2goserver/Makefile
@@ -37,7 +37,7 @@ build: build-arch build-indep
 build-arch: build_setgidwrappers
 
 build_setgidwrappers:
-	gcc -fPIE -o x2gosqlitewrapper x2gosqlitewrapper.c
+	gcc -fPIE -pie -o x2gosqlitewrapper x2gosqlitewrapper.c
 
 build-indep: build_man2html
 
diff --git a/x2goserver/VERSION.x2goserver b/x2goserver/VERSION.x2goserver
index c7271d2..861a59a 100644
--- a/x2goserver/VERSION.x2goserver
+++ b/x2goserver/VERSION.x2goserver
@@ -1 +1 @@
-3.1.1.3
\ No newline at end of file
+3.1.1.6
\ No newline at end of file
diff --git a/x2goserver/bin/x2gogetapps b/x2goserver/bin/x2gogetapps
index 9460cd3..dbcd8c1 100755
--- a/x2goserver/bin/x2gogetapps
+++ b/x2goserver/bin/x2gogetapps
@@ -117,9 +117,24 @@ sub proc_desktop_file
 	if (open(F,"<$file"))
 	{
 		print("<desktop>\n");
+		my $is_desktop_entry = 0;
 		while(!eof(F))
 		{
 			my $line=<F>;
+			if ( $line=~m/^\[Desktop Entry\] */ )
+			{
+				$is_desktop_entry = 1;
+				next;
+			}
+			if ( ! $is_desktop_entry )
+			{
+				next;
+			}
+			if ( $line=~m/^\[.*\] */ )
+			{
+				$is_desktop_entry = 0;
+				next;
+			}
 			if( $line=~m/^Categories/i || $line=~m/^Name/i || $line=~m/^Terminal/i || $line=~m/^Comment/i ||  $line=~m/^Exec/i)
 			{
 				print $line;
@@ -155,9 +170,6 @@ sub proc_desktop_file
 	}
 }
 
-openlog($0,'cons,pid','user');
-setlogmask( LOG_UPTO(x2gologlevel()) );
-
 if ( @ARGV ) {
 	syslog('info', "x2gogetapps has been called with options: @ARGV");
 } else {
diff --git a/x2goserver/bin/x2gomountdirs b/x2goserver/bin/x2gomountdirs
index d4249ad..457a1d3 100755
--- a/x2goserver/bin/x2gomountdirs
+++ b/x2goserver/bin/x2gomountdirs
@@ -22,6 +22,7 @@
 
 use strict;
 use Sys::Syslog qw( :standard :macros );
+use File::BaseDir qw( xdg_config_home );
 
 use lib `echo -n \$(x2gobasepath)/lib/x2go`;
 use x2godbwrapper;
@@ -33,6 +34,27 @@ setlogmask( LOG_UPTO(x2gologlevel()) );
 
 syslog('info', "x2gomountdirs has been called with options: @ARGV");
 
+sub source_environment {
+    my $name = shift;
+
+    open my $fh, "<", $name
+        or die "could not open $name: $!";
+
+    while (<$fh>) {
+        chomp;
+        my $line = $_;
+        if ( $line =~ m/^#.*/ )
+        {
+            next;
+        }
+        my ($k, $v) = split /=/, $line, 2;
+        $v =~ s/^(['"])(.*)\1/$2/; #' fix highlighter
+        $v =~ s/\$([a-zA-Z]\w*)/$ENV{$1}/g;
+        $v =~ s/`(.*?)`/`$1`/ge; #dangerous
+        $ENV{$k} = $v;
+    }
+}
+
 my $tmp_dir = '/tmp';
 
 my $type=shift;
@@ -107,6 +129,8 @@ my $spooldir="$tmp_dir/.x2go-$ENV{'USER'}/spool";
 my $mimeboxdir_lnk="$ENV{'HOME'}/.x2go/C-$session/mimebox";
 my $mimeboxdir="$tmp_dir/.x2go-$ENV{'USER'}/mimebox";
 
+source_environment(xdg_config_home() . "/user-dirs.dirs");
+
 if (! -e $mdir)
 {
 	mkdir($mdir);
@@ -268,7 +292,13 @@ for (my $i=0;$i<@dirs;$i++)
 			if (! $printspool && ! $mimeboxspool && ! $useplasmoid )
 			{
 
-				my $fname="$ENV{'HOME'}/Desktop";
+				my $fname;
+				if ( $ENV{'XDG_DESKTOP_DIR'} )
+				{
+					$fname="$ENV{'XDG_DESKTOP_DIR'}";
+				} else {
+					$fname="$ENV{'HOME'}/Desktop";
+				}
 				my $current_desktop = "NONE";
 				if (($session =~ m/_stDGNOME_dp/) && system("x2gofeature X2GO_GNOMEBINDINGS >/dev/null") == 0)
 				{
diff --git a/x2goserver/bin/x2goruncommand b/x2goserver/bin/x2goruncommand
index 6e62709..d26fa82 100755
--- a/x2goserver/bin/x2goruncommand
+++ b/x2goserver/bin/x2goruncommand
@@ -54,7 +54,9 @@ IMEXIT="false"
 
 NX_XINERAMA_LIBS=/usr/lib/nx/X11/Xinerama
 NX_LIBS=/usr/lib/nx/X11
-test -n "$LD_LIBRARY_PATH" && LD_LIBRARY_PATH=$NX_XINERAMA_LIBS:$NX_LIBS:$LD_LIBRARY_PATH || LD_LIBRARY_PATH="$NX_XINERAMA_LIBS:$NX_LIBS"
+test -n "$LD_LIBRARY_PATH" && \
+  LD_LIBRARY_PATH="$NX_XINERAMA_LIBS:$NX_LIBS:$LD_LIBRARY_PATH" || \
+  LD_LIBRARY_PATH="$NX_XINERAMA_LIBS:$NX_LIBS"
 $X2GO_LIB_PATH/x2gosyslog "$0" "debug" "exporting LD_LIBRARY_PATH=$LD_LIBRARY_PATH"
 export LD_LIBRARY_PATH
 
@@ -179,11 +181,19 @@ if [ "$cmd" == "TERMINAL" ]; then
 fi
 
 EXEC=`which $cmd`
+EXEC_WRAPPER=""
 
 BNAME=`basename "$EXEC"`
 if [ "$BNAME" == "rdesktop" ]
 then
 	IMEXIT="true"
+	if which padsp >/dev/null; then
+		EXEC_WRAPPER="padsp"
+		args=" -r sound:local"
+	fi
+	if [ -d "$HOME/media" ]; then
+		args+=" -r disk:X2GoMedia=$HOME/media"
+	fi
 fi
 
 if [ "$X2GO_SESS_TYPE" == "P" ]
@@ -193,6 +203,14 @@ then
 	X2GO_SESS_TYPE="R"
 fi
 
+if [ "$cmd" == "startkde" ]; then
+	NX_XRANDR_LIBS=/usr/lib/nx/X11/Xrandr
+	LD_LIBRARY_PATH="$NX_XRANDR_LIBS:$LD_LIBRARY_PATH"
+	$X2GO_LIB_PATH/x2gosyslog "$0" "debug" "extending LD_LIBRARY_PATH=$LD_LIBRARY_PATH by Xrandr extension"
+	export LD_LIBRARY_PATH
+fi
+
+
 # run x2goserver-extensions for pre-runcommand
 x2gofeature X2GO_RUN_EXTENSIONS &>/dev/null && x2goserver-run-extensions "$X2GO_SESSION" pre-runcommand || true
 
@@ -205,10 +223,10 @@ if [ "$EXEC" != "" ] && [ -x $EXEC ]; then
 	x2gofeature X2GO_XSESSION &>/dev/null && [ "x$X2GO_SESS_TYPE" = "xD" ] && {
 		STARTUP="$cmd$args"
 		$X2GO_LIB_PATH/x2gosyslog "$0" "notice" "launching session with Xsession-x2go mechanism, using STARTUP=\"$STARTUP\""
-		STARTUP="$STARTUP" /etc/x2go/Xsession
+		STARTUP="/usr/bin/env LD_LIBRARY_PATH=${LD_LIBRARY_PATH} ${STARTUP}" /etc/x2go/Xsession
 	} || {
 		$X2GO_LIB_PATH/x2gosyslog "$0" "debug" "executing command \"$cmd$args\"..."
-		$cmd$args
+		$EXEC_WRAPPER $cmd$args
 	}
 
 	#### some applications can quit immediately, we will wait here as long as x2goagent exists
diff --git a/x2goserver/bin/x2gostartagent b/x2goserver/bin/x2gostartagent
index abf1422..c049566 100755
--- a/x2goserver/bin/x2gostartagent
+++ b/x2goserver/bin/x2gostartagent
@@ -247,8 +247,10 @@ else
 	X2GODPIOPTION_="-dpi $X2GODPI"
 fi
 
+NOLISTOPT=""
 if [ "$X2GOXDMCP" == "" ] ;then
 	XDMCPOPT=""
+	NOLISTOPT="-nolisten tcp"
 else
 	XDMCPOPT="-query $X2GOXDMCP"
 fi
@@ -260,10 +262,10 @@ SESSION_WINDOW_TITLE="X2GO-${SESSION_NAME}"
 
 if  [ "$X2GO_STYPE" == "S" ]; then
 	# set NX_TEMP to /tmp, make sure x2goagent starts when pam_tmpdir.so is in use
-	NX_TEMP=/tmp x2goagent -nolisten tcp $X2GODPIOPTION_ -$SESSION_TYPE -auth "$XAUTHORITY" -shadow $SHADOW_DESKTOP -shadowmode $SHADOW_MODE -geometry ${X2GO_GEOMETRY} -name "${SESSION_WINDOW_TITLE}"  "${NX_AGENT}" 2>"${SESSION_LOG}" &
+	NX_TEMP=/tmp x2goagent $NOLISTOPT $X2GODPIOPTION_ -$SESSION_TYPE -auth "$XAUTHORITY" -shadow $SHADOW_DESKTOP -shadowmode $SHADOW_MODE -geometry ${X2GO_GEOMETRY} -name "${SESSION_WINDOW_TITLE}"  "${NX_AGENT}" 2>"${SESSION_LOG}" &
 else
 	# set NX_TEMP to /tmp, make sure x2goagent starts when pam_tmpdir.so is in use
-	NX_TEMP=/tmp x2goagent -nolisten tcp $X2GODPIOPTION_ $XDMCPOPT -$SESSION_TYPE $NOEXITPARAM -auth "$XAUTHORITY" -geometry ${X2GO_GEOMETRY} -name "${SESSION_WINDOW_TITLE}"  "${NX_AGENT}" 2>"${SESSION_LOG}" &
+	NX_TEMP=/tmp x2goagent $NOLISTOPT $X2GODPIOPTION_ $XDMCPOPT -$SESSION_TYPE $NOEXITPARAM -auth "$XAUTHORITY" -geometry ${X2GO_GEOMETRY} -name "${SESSION_WINDOW_TITLE}"  "${NX_AGENT}" 2>"${SESSION_LOG}" &
 fi
 
 X2GO_AGENT_PID=$!
diff --git a/x2goserver/bin/x2goumount-session b/x2goserver/bin/x2goumount-session
index 22cfefb..df39e49 100755
--- a/x2goserver/bin/x2goumount-session
+++ b/x2goserver/bin/x2goumount-session
@@ -23,6 +23,7 @@
 use strict;
 use Sys::Hostname;
 use Sys::Syslog qw( :standard :macros );
+use File::BaseDir qw( xdg_config_home );
 
 use lib `echo -n \$(x2gobasepath)/lib/x2go`;
 use x2godbwrapper; 
@@ -34,6 +35,29 @@ setlogmask( LOG_UPTO(x2gologlevel()) );
 
 syslog('info', "x2goumount-session has been called with options: @ARGV");
 
+# this function is a code duplication from x2gomountdirs and it will go away with
+# X2Go Server 3.2.0.0 (as the code has been moved into X2Go::Utils already in Vcs).
+sub source_environment {
+    my $name = shift;
+
+    open my $fh, "<", $name
+        or die "could not open $name: $!";
+
+    while (<$fh>) {
+        chomp;
+        my $line = $_;
+        if ( $line =~ m/^#.*/ )
+        {
+            next;
+        }
+        my ($k, $v) = split /=/, $line, 2;
+        $v =~ s/^(['"])(.*)\1/$2/; #' fix highlighter
+        $v =~ s/\$([a-zA-Z]\w*)/$ENV{$1}/g;
+        $v =~ s/`(.*?)`/`$1`/ge; #dangerous
+        $ENV{$k} = $v;
+    }
+}
+
 my $tmp_dir = '/tmp';
 
 my $session=shift;
@@ -45,6 +69,8 @@ my $mdir="$tmp_dir/.x2go-$ENV{'USER'}/media";
 my $spooldir="$tmp_dir/.x2go-$ENV{'USER'}/spool";
 my $mimeboxdir="$tmp_dir/.x2go-$ENV{'USER'}/mimebox";
 
+source_environment(xdg_config_home() . "/user-dirs.dirs");
+
 if ($only_path)
 {
 	$only_path=~s/\/ramdrive\/mnt\///;
@@ -155,7 +181,14 @@ break:
 		$remote=~s/ /_/g;
 		$remote=~s/\\040/_/g;
 		$remote=(split(":","$remote"))[1];
-		$remote="$ENV{'HOME'}/Desktop/$remote";
+		my $desktopdir;
+		if ( $ENV{'XDG_DESKTOP_DIR'} )
+		{
+			$desktopdir="$ENV{'XDG_DESKTOP_DIR'}";
+		} else {
+			$desktopdir="$ENV{'HOME'}/Desktop";
+		}
+		$remote="$desktopdir/$remote";
 
 		my $current_desktop = 'NONE';
 		if (($session =~ m/_stDGNOME_dp/) && system("x2gofeature X2GO_GNOMEBINDINGS >/dev/null") == 0)
diff --git a/x2goserver/lib/x2gogetagent b/x2goserver/lib/x2gogetagent
index 7462550..897d75e 100755
--- a/x2goserver/lib/x2gogetagent
+++ b/x2goserver/lib/x2gogetagent
@@ -31,8 +31,8 @@ openlog($0,'cons,pid','user');
 setlogmask( LOG_UPTO(x2gologlevel()) );
 
 my $sid=shift or die;
-my $agent = db_getagent $sid;
+my $agent = db_getagent($sid);
 print $agent;
 
 # closing syslog 
-closelog;
\ No newline at end of file
+closelog;
diff --git a/x2goserver/sbin/x2gocleansessions b/x2goserver/sbin/x2gocleansessions
index aaed31d..8d52d85 100755
--- a/x2goserver/sbin/x2gocleansessions
+++ b/x2goserver/sbin/x2gocleansessions
@@ -90,6 +90,7 @@ elsif ($pid == 0 )
 	for (glob "/proc/$$/fd/*") { POSIX::close($1) if m{/(\d+)$}; }
 
 	$SIG{TERM}=\&catch_term;
+	$SIG{CHLD} = sub { wait };
 
 	while(sleep 5)
 	{


hooks/post-receive
-- 
x2goserver.git (X2Go Server)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2goserver.git" (X2Go Server).




More information about the x2go-commits mailing list