[X2go-Commits] x2gothinclient.git - master (branch) updated: 1.0.1.8-54-g87352c5

X2Go dev team git-admin at x2go.org
Tue Oct 16 17:11:09 CEST 2012


The branch, master has been updated
       via  87352c5c8733a92bdb805a1165c3fb884c451ae7 (commit)
       via  4c78f240d20ba26beeca4202548fc838bd8e343a (commit)
       via  d1e11d3bf7f7656e74615da0b97507b1cd3eb82b (commit)
      from  b9d34cae9f3029e43b5c0dcc170a308c149e61b8 (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 87352c5c8733a92bdb805a1165c3fb884c451ae7
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Oct 16 16:02:14 2012 +0200

    Rename x2goclient user to ,,x2gothinclient'' user (system user account). Make sure that the system user account gets created during x2gothinclient_create and during installation of the x2gothinclient package (closes upstream issue #47).

commit 4c78f240d20ba26beeca4202548fc838bd8e343a
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Oct 16 15:10:40 2012 +0200

    fix typo

commit d1e11d3bf7f7656e74615da0b97507b1cd3eb82b
Author: Mike Gabriel <mike.gabriel at das-netzwerkteam.de>
Date:   Tue Oct 16 15:08:20 2012 +0200

    Fix multi-head detection failures where xrandr write output to stderr (closes upstream issue #48).

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

Summary of changes:
 debian/changelog                                   |    6 +++++
 debian/control                                     |    1 +
 x2gocdmanager/x2gocdmanager                        |    7 +++---
 x2gothinclient/sbin/x2gothinclientd                |   12 +++++-----
 .../sbin/x2gothinclient_create                     |   14 ++++++------
 .../share/etc/x2gothinclient_init                  |   24 ++++++++++----------
 .../share/etc/x2gothinclient_start                 |   16 +------------
 x2gousbmount/x2gousbmount                          |   13 ++++++-----
 8 files changed, 44 insertions(+), 49 deletions(-)

The diff of changes is:
diff --git a/debian/changelog b/debian/changelog
index 8733e1d..3785667 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -41,6 +41,12 @@ x2gothinclient (1.0.99.1-0~x2go1) UNRELEASED; urgency=low
     - Provide a README.hostname file in doc folder of x2gothinclientmanagement.
     - For TCE stations with multiple heads, align heads next to each other
       in order of appearance in xrandr.
+    - Fix multi-head detection failures where xrandr writes output to stderr
+      (closes upstream issue #48).
+    - Rename x2goclient user to ,,x2gothinclient'' user (system user account).
+      Make sure that the system user account gets created during
+      x2gothinclient_create and during installation of the x2gothinclient
+      package (closes upstream issue #47).
   * /debian/control:
     + Maintainer change in package: X2Go Developers <x2go-dev at lists.berlios.de>.
     + Priority: optional.
diff --git a/debian/control b/debian/control
index 1c7f1c5..dcc129f 100644
--- a/debian/control
+++ b/debian/control
@@ -47,6 +47,7 @@ Package: x2gothinclient
 Architecture: all
 Depends:
  ${misc:Depends},
+ adduser,
  psmisc,
  x2goclient (>= 3.99.3.0-0~),
  xauth,
diff --git a/x2gocdmanager/x2gocdmanager b/x2gocdmanager/x2gocdmanager
index e07a599..d2b563a 100755
--- a/x2gocdmanager/x2gocdmanager
+++ b/x2gocdmanager/x2gocdmanager
@@ -21,6 +21,7 @@
 
 use Fcntl;
 use strict;
+use File::Path::Expand;
 
 sub catch_term
 {
@@ -125,7 +126,7 @@ elsif ($pid == 0 )
 				my @name=split("/","@mounted[$i]");
 				my $name="CDROM- at name[2]";
 
-				open (D,">/home/x2goclient/export/$name.unexport");
+				open (D,">",expand_filename("~x2gothinclient/export/$name.unexport"));
 				print D "unexport=/media/$name\n";
 				close(D);
 				system("umount -ff /media/$name");
@@ -146,9 +147,9 @@ elsif ($pid == 0 )
 				my $name="CDROM- at name[2]";
 				mkdir("/media");
 				mkdir("/media/$name");
-				if(system("mount @cdarray[$i] /media/$name -o uid=x2goclient")==0)
+				if(system("mount @cdarray[$i] /media/$name -o uid=x2gothinclient")==0)
 				{
-					open (D,">/home/x2goclient/export/$name");
+					open (D,">",expand_filename("~x2gothinclient/export/$name"));
 					print D "export=/media/$name\n";
 					close(D);
 					push (@mounted, at cdarray[$i]);
diff --git a/x2gothinclient/sbin/x2gothinclientd b/x2gothinclient/sbin/x2gothinclientd
index cc92713..d23084e 100755
--- a/x2gothinclient/sbin/x2gothinclientd
+++ b/x2gothinclient/sbin/x2gothinclientd
@@ -64,10 +64,10 @@ sub check_client
 }
 
 # make sure the .halt file is not present when we start this script
-system("rm -f /home/x2goclient/.halt");
+system("rm -f ~x2gothinclient/.halt");
 
 # pre-load the thinclient initialization script
-system("su x2goclient -c \". /etc/x2go/x2gothinclient_init\"");
+system("su x2gothinclient -c \". /etc/x2go/x2gothinclient_init\"");
 
 # fork to background, check if forked state is ok...
 my $pid = fork();
@@ -93,7 +93,7 @@ elsif ($pid == 0 )
 	while(sleep 1)
 	{
 		# test if shutdown button on X2Go Client was clicked
-		if ( -e "/home/x2goclient/.halt")
+		if ( -e "~x2gothinclient/.halt")
 		{
 			# when used with plymouth, make sure we stay on the correct terminal
 			system("killall Xorg");
@@ -110,7 +110,7 @@ elsif ($pid == 0 )
 			# align displays next to each other in order of appearance in xrandr
 			my $this_display;
 			my $next_display;
-			foreach (`DISPLAY=:0 LANG=C xrandr | grep ' connected ' | cut -d ' ' -f1`)
+			foreach (`DISPLAY=:0 LANG=C xrandr 2>/dev/null | grep ' connected ' | cut -d ' ' -f1`)
 			{
 				$next_display = $_;
 				$next_display =~ s/\n//;
@@ -125,7 +125,7 @@ elsif ($pid == 0 )
 		# test if pulseaudio is running, if not launch it...
 		if ( !check_pulse() )
 		{
-			system("su - x2goclient -c \"DISPLAY=:0 pulseaudio -D -n \\
+			system("su - x2gothinclient -c \"DISPLAY=:0 pulseaudio -D -n \\
 			-L 'module-native-protocol-tcp port=4713' \\
 			-L 'module-esound-protocol-tcp port=16001' \\
 			-L 'module-udev-detect' --exit-idle-time=65535\"");
@@ -137,7 +137,7 @@ elsif ($pid == 0 )
 		{
 			local *IN, *OUT, *ERR;
 			$x2goclient_pid = eval {
-				open3( \*IN, \*OUT, \*ERR, "su - x2goclient -c 'DISPLAY=:0 bash -c \"/etc/x2go/x2gothinclient_start &\"'");
+				open3( \*IN, \*OUT, \*ERR, "su - x2gothinclient -c 'DISPLAY=:0 bash -c \"/etc/x2go/x2gothinclient_start &\"'");
 			};
 			## give X2Go Client some time to start
 			sleep(3);
diff --git a/x2gothinclientmanagement/sbin/x2gothinclient_create b/x2gothinclientmanagement/sbin/x2gothinclient_create
index 7414f3a..bd17f25 100755
--- a/x2gothinclientmanagement/sbin/x2gothinclient_create
+++ b/x2gothinclientmanagement/sbin/x2gothinclient_create
@@ -175,14 +175,14 @@ export X2GO_HANDLE_DAEMONS=false
 [ \$? -eq 0 ] && sed -e 's/BOOT=local/BOOT=nfs/' -i /etc/initramfs-tools/initramfs.conf
 
 [ \$? -eq 0 ] && rm -f /etc/udev/rules.d/*-persistent-*.rules
-[ \$? -eq 0 ] && useradd x2goclient
-[ \$? -eq 0 ] && adduser x2goclient audio
-[ \$? -eq 0 ] && adduser x2goclient pulse
+[ \$? -eq 0 ] && if getent passwd x2gothinclient 1>/dev/null; adduser --system --no-create-home --disabled-password --disabled-login --shell /bin/bash --group --home /var/lib/x2gothinclient x2gothinclient; fi
+[ \$? -eq 0 ] && adduser x2gothinclient audio
+[ \$? -eq 0 ] && adduser x2gothinclient pulse
 [ \$? -eq 0 ] && adduser pulse audio
-[ \$? -eq 0 ] && adduser x2goclient cdrom
-[ \$? -eq 0 ] && adduser x2goclient plugdev
-[ \$? -eq 0 ] && groupadd scard
-[ \$? -eq 0 ] && adduser x2goclient scard
+[ \$? -eq 0 ] && adduser x2gothinclient cdrom
+[ \$? -eq 0 ] && adduser x2gothinclient plugdev
+[ \$? -eq 0 ] && if ! getent group scard; then groupadd scard; fi
+[ \$? -eq 0 ] && adduser x2gothinclient scard
 [ \$? -eq 0 ] && update-initramfs -u -v
 [ \$? -eq 0 ] && passwd -l root
 
diff --git a/x2gothinclientmanagement/share/etc/x2gothinclient_init b/x2gothinclientmanagement/share/etc/x2gothinclient_init
index 5b65a98..6e17a6e 100755
--- a/x2gothinclientmanagement/share/etc/x2gothinclient_init
+++ b/x2gothinclientmanagement/share/etc/x2gothinclient_init
@@ -20,15 +20,15 @@
 # Free Software Foundation, Inc.,
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
-mkdir -p /home/x2goclient
-mkdir -p /home/x2goclient/.x2goclient
-test -e /etc/x2go/x2gothinclient_sessions && cp /etc/x2go/x2gothinclient_sessions /home/x2goclient/.x2goclient/sessions
-test -e /etc/x2go/freerdp/known_hosts && mkdir /home/x2goclient/.freerdp && cp /etc/x2go/freerdp/known_hosts /home/x2goclient/.freerdp/known_hosts
-mkdir -p /home/x2goclient/.kde
-mkdir -p /home/x2goclient/.kde/socket-`cat /etc/hostname`
-mkdir -p /home/x2goclient/export
-mkdir -p  /home/x2goclient/logins
-mkdir -p /home/x2goclient/.ssh
-mkdir -p /home/x2goclient/.x2go
-chown x2goclient:x2goclient /home/x2goclient -Rf
-chmod go-rwx /home/x2goclient -Rf
+mkdir -p ~x2gothinclient
+mkdir -p ~x2gothinclient/.x2goclient
+test -e /etc/x2go/x2gothinclient_sessions && cp /etc/x2go/x2gothinclient_sessions ~x2gothinclient/.x2goclient/sessions
+test -e /etc/x2go/freerdp/known_hosts && mkdir ~x2gothinclient/.freerdp && cp /etc/x2go/freerdp/known_hosts ~x2gothinclient/.freerdp/known_hosts
+mkdir -p ~x2gothinclient/.kde
+mkdir -p ~x2gothinclient/.kde/socket-`cat /etc/hostname`
+mkdir -p ~x2gothinclient/export
+mkdir -p  ~x2gothinclient/logins
+mkdir -p ~x2gothinclient/.ssh
+mkdir -p ~x2gothinclient/.x2go
+chown x2gothinclient:x2gothinclient ~x2gothinclient -Rf
+chmod go-rwx ~x2gothinclient -Rf
diff --git a/x2gothinclientmanagement/share/etc/x2gothinclient_start b/x2gothinclientmanagement/share/etc/x2gothinclient_start
index b603c00..5d61c90 100755
--- a/x2gothinclientmanagement/share/etc/x2gothinclient_start
+++ b/x2gothinclientmanagement/share/etc/x2gothinclient_start
@@ -29,23 +29,9 @@
                     --geometry=fullscreen \
                     --thinclient \
                     --haltbt \
-                    --read-exports-from=/home/x2goclient/export \
+                    --read-exports-from=~x2gothinclient/export \
                     --background=/etc/x2go/x2goclient-background.svg \
                     --no-session-edit \
                     --session=X2Go.Example \
                     --add-to-known-hosts &
 
-# for use with LDAP on Skolelinux network
-#/usr/bin/x2goclient --pgp-card \
-#                    --ldap="tjener.intern:389:dc=skolelinux,dc=no" \
-#                    --no-menu \
-#                    --maximize \
-#                    --link=lan \
-#                    --thinclient \
-#                    --haltbt \
-#                    --kbd-layout=de \
-#                    --kbd-type=pc105/de \
-#                    --set-kbd=1 \
-#                    --geometry=fullscreen \
-#                    --read-exports-from=/home/x2goclient/export \
-#                    --add-to-known-hosts &
diff --git a/x2gousbmount/x2gousbmount b/x2gousbmount/x2gousbmount
index a90da7f..0c9c756 100755
--- a/x2gousbmount/x2gousbmount
+++ b/x2gousbmount/x2gousbmount
@@ -19,6 +19,7 @@
 # 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
 
 use strict;
+use File::Path::Expand;
 
 open (F,">>/var/log/usb");
 
@@ -51,11 +52,11 @@ if ( $action eq "add")
 	mkdir("/media/$name/$ldev");
 
 	# mount the USB device
-	if(system("mount $dev /media/$name/$ldev -o uid=x2goclient,sync,uni_xlate")==0)
+	if(system("mount $dev /media/$name/$ldev -o uid=x2gothinclient,sync,uni_xlate")==0)
 	{
 		# if mounted, inform x2goclient about it...
 		system("touch /var/run/$ldev.mounted");
-		open (D,">/home/x2goclient/export/$name.$ldev");
+		open (D,">",expand_filename("~x2gothinclient/export/$name.$ldev"));
 		print D "export=/media/$name/$ldev\n";
 		close (D);
 	}
@@ -74,8 +75,8 @@ if ( $action eq "add")
 			{
 				# inform x2goclient about this...
 				system("touch /var/run/$ldev.encrypted");
-				system("chown -R x2goclient /media/$name/$ldev/dsa.key");
-				open (D,">/home/x2goclient/logins/$name.$ldev");
+				system("chown -R x2gothinclient /media/$name/$ldev/dsa.key");
+				open (D,">",expand_filename("~/x2gothinclient/logins/$name.$ldev"));
 				print D "login=/media/$name/$ldev\n";
 				close (D);
 			}
@@ -104,7 +105,7 @@ elsif ( $action eq "remove" )
 		# inform x2goclient that the device has been removed
 		system ("umount -ff /media/$name/$ldev");
 		unlink ("/var/run/$ldev.mounted");
-		open ( D,">/home/x2goclient/export/$name.$ldev.unexport");
+		open ( D,">",expand_filename("~x2gothinclient/export/$name.$ldev.unexport"));
 		print D "unexport=/media/$name/$ldev\n";
 		close (D);
 	}
@@ -113,7 +114,7 @@ elsif ( $action eq "remove" )
 		# inform x2goclient that the device has been removed
 		# release the encrypted device mapping
 		unlink ("/var/run/$ldev.encrypted");
-		open ( D,">/home/x2goclient/logins/$name.$ldev.unexport");
+		open ( D,">",expand_filename("~/x2gothinclient/logins/$name.$ldev.unexport"));
 		print D "logout=/media/$name/$ldev\n";
 		system("umount /media/$name/$ldev");
 		system("/sbin/cryptsetup luksClose keystick");		


hooks/post-receive
-- 
x2gothinclient.git (X2Go Thin Client Environment)

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 "x2gothinclient.git" (X2Go Thin Client Environment).




More information about the x2go-commits mailing list