patches/SUNWtgnome-tsoljdslabel-01-dbus-launch.diff
author yippi
Mon, 27 Sep 2010 21:07:51 +0000
changeset 20108 51df67ca9307
parent 13695 f23425726ab5
permissions -rw-r--r--
I had these modules listed as being owned by me, but they are really owned by wangke, correcting.

diff -ruN tsoljdslabel-0.6.3.orig/Xsession.tjds tsoljdslabel-0.6.3.hacked/Xsession.tjds
--- tsoljdslabel-0.6.3.orig/Xsession.tjds	2008-08-22 00:13:28.000000000 +0100
+++ tsoljdslabel-0.6.3.hacked/Xsession.tjds	2008-09-19 21:32:10.153150000 +0100
@@ -21,4 +21,16 @@
 
 command=/usr/dt/bin/Xsession
 
+# Save a copy of the user's SHELL value and restore after dbus-launch command
+shell_saved=$SHELL
+
+# Tell dbus-launch we want the environment value in ksh compatible syntax
+export SHELL=/bin/ksh
+eval `dbus-launch --exit-with-session --sh-syntax`
+
+# unset SHELL and restore user's value
+unset SHELL
+export SHELL=$shell_saved
+
+
 exec $command