2006-11-28 Brian Cameron <[email protected]> gnome-2-16 VERMILLION_55
authoryippi
Wed, 29 Nov 2006 16:14:38 +0000
branchgnome-2-16
changeset 18978 a8d8df2f86e9
parent 18977 ae655657c935
child 18979 3256dbdd1232
2006-11-28 Brian Cameron <[email protected]> * gdm.spec, patches/gdm-01-branding-defaults-solaris.diff, gdm-02-branding-general.diff, gdm-11-defaultdesc.diff: Better name for default.desktop (start Xclient script) and turn off console-kit support since it doesn't work on Solaris yet. Move CDE.desktop.in back to the gdm-01 patch since it is Solaris specific. Fix gnome.desktop.in Comment to say "Java Desktop System" instead of "OpenSolaris" (the last patch just changed the Name not Comment). Call xterm with full path in /etc/X11/gdm/Xsession since user path may override the GDM default path and may not contain /usr/openwin/bin). Also use full-path for ctrun.
ChangeLog
gdm.spec
patches/gdm-01-branding-defaults-solaris.diff
patches/gdm-02-branding-general.diff
patches/gdm-12-fixsessionname.diff
--- a/ChangeLog	Wed Nov 29 15:19:05 2006 +0000
+++ b/ChangeLog	Wed Nov 29 16:14:38 2006 +0000
@@ -1,3 +1,14 @@
+2006-11-29  Brian Cameron  <[email protected]>
+
+	* gdm.spec, gdm-01-branding-defaults-solaris.diff,
+	  gdm-02-branding-general.diff, gdm-12-fixsessionname.diff:
+	  New patch (12) to fix GDM so it displays the correct
+	  session name defined in the /usr/share/xsession/*.desktop
+	  file if the command has arguments.  Previously it was
+	  showing up as "gnome.desktop".  Modify the GDM branding
+	  patches so that we refer to the gnome.desktop session
+	  as "Java Desktop System" rather than "OpenSolaris".
+
 2006-11-29  Damien Carbery <[email protected]>
 
 	* firefox.spec: Port in %install changes from trunk to fix build error
--- a/gdm.spec	Wed Nov 29 15:19:05 2006 +0000
+++ b/gdm.spec	Wed Nov 29 16:14:38 2006 +0000
@@ -47,6 +47,7 @@
 Patch10:      gdm-10-fixfocus.diff
 #date:2006-11-15 owner:calumb bugster:6489289 bugzilla:375634 type:bug
 Patch11:      gdm-11-gdmsetup-launch-menu-tooltip.diff
+Patch12:      gdm-12-fixsessionname.diff
 URL:          www.gnome.org
 BuildRoot:    %{_tmppath}/%{name}-%{version}-build
 Docdir:       %{_defaultdocdir}
@@ -120,6 +121,7 @@
 %patch9 -p1
 %patch10 -p1
 %patch11 -p1
+%patch12 -p1
 
 %build
 %ifos linux
@@ -251,6 +253,11 @@
 %config /etc/security/*
 
 %changelog
+* Tue Nov 28 2006 - [email protected]
+- Patch so that session names shows up properly instead of gnome.desktop.  
+  Fix so that "Java Desktop System" is used consistantly as branding name
+  for GNOME.
+
 * Wed Nov 15 2006 - [email protected]
 - Modify tooltip to match latest UI spec.
 
--- a/patches/gdm-01-branding-defaults-solaris.diff	Wed Nov 29 15:19:05 2006 +0000
+++ b/patches/gdm-01-branding-defaults-solaris.diff	Wed Nov 29 16:14:38 2006 +0000
@@ -108,52 +108,38 @@
  	g_unsetenv ("MAIL");
 -	argv = ve_split (script);
 +
-+	ctrun = g_strdup_printf ("/bin/sh -c \"ctrun -l child -i none %s\"",
++	ctrun = g_strdup_printf ("/bin/sh -c \"/usr/bin/ctrun -l child -i none %s\"",
 +		script);
 +	argv = ve_split (ctrun);
 +
  	VE_IGNORE_EINTR (execv (argv[0], argv));
  	syslog (LOG_ERR, _("%s: Failed starting: %s"), "gdm_slave_exec_script",
  		script);
---- ../gdm-2.14.6/config/gnome.desktop.in	2006-05-22 12:06:01.383674000 +0200
-+++ gdm-2.14.6/config/gnome.desktop.in	2006-05-22 12:12:16.798993000 +0200
-@@ -1,8 +1,8 @@
- [Desktop Entry]
- Encoding=UTF-8
--_Name=GNOME
--_Comment=This session logs you into GNOME
--Exec=gnome-session
--TryExec=gnome-session
-+_Name=OpenSolaris GNOME Desktop
-+_Comment=This session logs you into the OpenSolaris GNOME Desktop
-+Exec=ctrun -l child -i none /usr/dt/config/Xinitrc.jds
-+TryExec=ctrun -l child -i none /usr/dt/config/Xinitrc.jds
- # no icon yet, only the top three are currently used
- Icon=
-diff -ru ../gdm-2.14.6/configure.ac gdm-2.14.6/configure.ac
---- gdm-2.16.1/config/CDE.desktop.in-orig	2006-10-24 16:41:48.952910000 -0500
-+++ gdm-2.16.1/config/CDE.desktop.in	2006-10-24 16:42:09.409580000 -0500
-@@ -2,7 +2,7 @@
- Encoding=UTF-8
- _Name=CDE
- _Comment=This session logs you into CDE
--Exec=/usr/dt/bin/Xsession
-+Exec=ctrun -l child -i none /usr/dt/bin/Xsession
- # no icon yet, only the top three are currently used
- Icon=
- Type=Application
---- gdm-2.16.1/config/Xsession.in-orig	2006-10-24 17:39:23.656920000 -0500
-+++ gdm-2.16.1/config/Xsession.in	2006-10-24 17:39:47.475014000 -0500
+--- gdm-2.17.2/config/Xsession.in-orig	2006-11-28 12:53:58.837105000 -0600
++++ gdm-2.17.2/config/Xsession.in	2006-11-28 12:56:19.612177000 -0600
 @@ -84,7 +84,7 @@ if [ x"$command" = xfailsafe ] ; then
    else
      echo "$0: Starting the failsafe xterm session."
    fi
 -  exec xterm -geometry 80x24+0+0
-+  exec ctrun -l child -i none xterm -geometry 80x24+0+0
++  exec /usr/bin/ctrun -l child -i none /usr/openwin/bin/xterm -geometry 80x24+0+0
  fi
  
  # Note: ~/.xsession-errors is now done in the daemon so that it
-@@ -225,14 +225,6 @@ if [ "x$command" = "xdefault" ] ; then
+@@ -219,20 +219,16 @@ if [ "x$command" = "xdefault" ] ; then
+   elif [ -x /etc/X11/Xclients ]; then
+     command="/etc/X11/Xclients"
+   else
+-    echo "$0: Cannot find Xclients"
+-    # FIXME: kind of an evil failsafe
+-    command="xsm"
++    if [ -n "$zenity" ] ; then
++        disptext=`gettextfunc "System has no Xclients file, so starting a failsafe xterm session.  Windows will have focus only if the mouse pointer is above them.  To get out of this mode type 'exit' in the window."`
++      "$zenity" --info --text "$disptext"
++    else
++      echo "$0: Cannot find Xclients"
++    fi
++    exec /usr/bin/ctrun -l child -i none /usr/openwin/bin/xterm -geometry 80x24+0+0
    fi
  fi
  
@@ -168,12 +154,12 @@
  echo "$0: Setup done, will execute: $command"
  
  eval exec $command
-@@ -244,4 +236,4 @@ if [ -n "$zenity" ] ; then
+@@ -244,4 +240,4 @@ if [ -n "$zenity" ] ; then
  	"$zenity" --info --text "$disptext"
  fi
  
 -exec xterm -geometry 80x24+0+0
-+exec ctrun -l child -i none xterm -geometry 80x24+0+0
++exec /usr/bin/ctrun -l child -i none /usr/openwin/bin/xterm -geometry 80x24+0+0
 --- gdm-2.14.8/gui/modules/AccessDwellMouseEvents.in-orig	2006-06-07 16:58:51.873778000 -0500
 +++ gdm-2.14.8/gui/modules/AccessDwellMouseEvents.in	2006-06-07 16:59:51.598215000 -0500
 @@ -15,7 +15,7 @@
@@ -181,7 +167,7 @@
  # 
  # e.g.
 -# TBLR I 10000    @AT_BINDIR@/gok --login --access-method=dwellselection
-+# TBLR I 10000    /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=dwellselection"
++# TBLR I 10000    /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=dwellselection"
  #
  # Means the user crosses into the top border, out the bottom border, into the left
  # border, and then out the right border (in that order).  The initial_direction
@@ -190,7 +176,7 @@
  # e.g.
  #
 -# <Add>           @AT_BINDIR@/gnome-mag
-+# <Add>           /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gnome-mag"
++# <Add>           /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gnome-mag"
  
  # GNOME On-Screen Keyboard - support several different options for different
  # user needs.  Note these gestures all start by moving the mouse into the top
@@ -200,23 +186,23 @@
 -TLBR I 10000    @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch1 --select-action=switch1
 -TRBL I 10000    @AT_BINDIR@/gok --login --access-method=inversescanning --scan-action=switch1 --select-action=switch2
 -TBRL I 10000    @AT_BINDIR@/gok --login  --access-method=automaticscanning --scan-action=switch3 --select-action=switch3
-+TBLR I 10000    /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=dwellselection"
-+TLBR I 10000    /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch1 --select-action=switch1"
-+TRBL I 10000    /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=inversescanning --scan-action=switch1 --select-action=switch2"
-+TBRL I 10000    /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login  --access-method=automaticscanning --scan-action=switch3 --select-action=switch3"
++TBLR I 10000    /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=dwellselection"
++TLBR I 10000    /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch1 --select-action=switch1"
++TRBL I 10000    /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=inversescanning --scan-action=switch1 --select-action=switch2"
++TBRL I 10000    /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login  --access-method=automaticscanning --scan-action=switch3 --select-action=switch3"
  
  # Gnopernicus.  Note these gestures all start by moving the mouse into the
  # bottom window border.
  #
  # Speech
 -BTRL I 10000    @AT_BINDIR@/srcore --login --enable-speech
-+BTRL I 10000    /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/srcore --login --enable-speech"
++BTRL I 10000    /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/srcore --login --enable-speech"
  # Magnifier
 -BTLR I 10000    @AT_BINDIR@/srcore --login --enable-magnifier --disable-speech --disable-braille
-+BTLR I 10000    /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/srcore --login --enable-magnifier --disable-speech --disable-braille"
++BTLR I 10000    /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/srcore --login --enable-magnifier --disable-speech --disable-braille"
  # Speech and Magnifier
 -BRTL I 10000    @AT_BINDIR@/srcore --login
-+BRTL I 10000    /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/srcore --login"
++BRTL I 10000    /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/srcore --login"
  
 --- gdm-2.14.8/gui/modules/AccessKeyMouseEvents.in-orig	2006-06-07 17:00:02.882131000 -0500
 +++ gdm-2.14.8/gui/modules/AccessKeyMouseEvents.in	2006-06-07 17:01:09.581323000 -0500
@@ -225,7 +211,7 @@
  # e.g.
  #
 -# <Control>k  5 1000 10000  @AT_BINDIR@/gok --login --access-method=directselection
-+# <Control>k  5 1000 10000  /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
++# <Control>k  5 1000 10000  /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
  #
  # Means press Contol-k 5 times, holding each keypress down for at least 1000ms
  # each time and with no greater interval than 10000ms between each event in the
@@ -235,8 +221,8 @@
  # e.g.
 -# Shift_L  5 1000 10000  @AT_BINDIR@/gok --login --access-method=directselection
 -# Shift_R  5 1000 10000  @AT_BINDIR@/gok --login --access-method=directselection
-+# Shift_L  5 1000 10000  /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
-+# Shift_R  5 1000 10000  /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
++# Shift_L  5 1000 10000  /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
++# Shift_R  5 1000 10000  /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
  #
  # Will start gok if you press either shift key 5 times holding it down for more
  # then 1 second each time.
@@ -245,7 +231,7 @@
  # e.g.
  #
 -# <Mouse2>  4 3000 6000  @AT_BINDIR@/gnopernicus
-+# <Mouse2>  4 3000 6000  /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gnopernicus"
++# <Mouse2>  4 3000 6000  /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gnopernicus"
  #
  # Note that mouse numbers are 1-based so <Mouse1> is the left mouse button,
  # <Mouse3> is the right mouse button and <Mouse2> is the middle mouse button.
@@ -254,7 +240,7 @@
  # e.g.
  #
 -# <Add>  @AT_BINDIR@/gnome-mag
-+# <Add>  /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gnome-mag"
++# <Add>  /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gnome-mag"
  #
  # Note that pressing any other keys 
  
@@ -262,29 +248,39 @@
  
  # hold right or left mouse button 3 times for 3 seconds each time
 -<Mouse1> 3 3000 10000 @AT_BINDIR@/gok --login --access-method=directselection
-+<Mouse1> 3 3000 10000 /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
++<Mouse1> 3 3000 10000 /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
  # we add the right mouse button as it may be the left mouse button
  # for a left handed user
 -<Mouse3> 3 3000 10000 @AT_BINDIR@/gok --login --access-method=directselection
-+<Mouse3> 3 3000 10000 /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
++<Mouse3> 3 3000 10000 /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=directselection"
  
 -<Switch1> 1 5000 0 @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch1 --select-action=switch1
 -<Switch2> 3 50 3000 @AT_BINDIR@/gok --login --access-method=inversescanning --scan-action=switch1 --select-action=switch2
 -<Switch3> 3 1000 10000 @AT_BINDIR@/gok --login  --access-method=automaticscanning --scan-action=switch3 --select-action=switch3
-+<Switch1> 1 5000 0 /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch1 --select-action=switch1"
-+<Switch2> 3 50 3000 /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=inversescanning --scan-action=switch1 --select-action=switch2"
-+<Switch3> 3 1000 10000 /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/gok --login  --access-method=automaticscanning --scan-action=switch3 --select-action=switch3"
++<Switch1> 1 5000 0 /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch1 --select-action=switch1"
++<Switch2> 3 50 3000 /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login --access-method=inversescanning --scan-action=switch1 --select-action=switch2"
++<Switch3> 3 1000 10000 /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/gok --login  --access-method=automaticscanning --scan-action=switch3 --select-action=switch3"
  
  # press ctrl-s for 1 second to launch gnopernicus speech
  # gnopernicus, speech mode
 -<Control>s  1 1000 10000  @AT_BINDIR@/srcore --login --enable-speech
-+<Control>s  1 1000 10000  /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/srcore --login --enable-speech"
++<Control>s  1 1000 10000  /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/srcore --login --enable-speech"
  # press ctrl-m for 1 second to launch gnopernicus magnifier
 -<Control>m  1 1000 10000  @AT_BINDIR@/srcore --login --enable-magnifier --disable-speech --disable-braille
-+<Control>m  1 1000 10000  /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/srcore --login --enable-magnifier --disable-speech --disable-braille"
++<Control>m  1 1000 10000  /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/srcore --login --enable-magnifier --disable-speech --disable-braille"
  # press ctrl-g for 1 second to launch both gnopernicus speech and magnifier
 -<Control>g  1 1000 10000  @AT_BINDIR@/srcore --login
-+<Control>g  1 1000 10000  /bin/sh -c "ctrun -l child -i none @AT_BINDIR@/srcore --login"
++<Control>g  1 1000 10000  /bin/sh -c "/usr/bin/ctrun -l child -i none @AT_BINDIR@/srcore --login"
  
--exec xterm -geometry 80x24+0+0
-+exec ctrun -l child -i none xterm -geometry 80x24+0+0
+--- gdm-2.17.2/config/CDE.desktop.in-orig	2006-11-28 15:03:58.549974000 -0600
++++ gdm-2.17.2/config/CDE.desktop.in	2006-11-28 15:04:09.548507000 -0600
+@@ -2,7 +2,8 @@
+ Encoding=UTF-8
+ _Name=CDE
+ _Comment=This session logs you into CDE
+-Exec=/usr/dt/bin/Xsession
++Exec=/usr/bin/ctrun -l child -i none /usr/dt/bin/Xsession
++TryExec=/usr/bin/ctrun -l child -i none /usr/dt/bin/Xsession
+ # no icon yet, only the top three are currently used
+ Icon=
+ Type=Application
--- a/patches/gdm-02-branding-general.diff	Wed Nov 29 15:19:05 2006 +0000
+++ b/patches/gdm-02-branding-general.diff	Wed Nov 29 16:14:38 2006 +0000
@@ -57,3 +57,19 @@
      }
      
      if (current_session == NULL)
+--- ../gdm-2.14.6/config/gnome.desktop.in	2006-05-22 12:06:01.383674000 +0200
++++ gdm-2.14.6/config/gnome.desktop.in	2006-05-22 12:12:16.798993000 +0200
+@@ -1,8 +1,8 @@
+ [Desktop Entry]
+ Encoding=UTF-8
+-_Name=GNOME
+-_Comment=This session logs you into GNOME
+-Exec=gnome-session
+-TryExec=gnome-session
++_Name=Java Desktop System
++_Comment=This session logs you into the Java Desktop System
++Exec=/usr/bin/ctrun -l child -i none /usr/dt/config/Xinitrc.jds
++TryExec=/usr/bin/ctrun -l child -i none /usr/dt/config/Xinitrc.jds
+ # no icon yet, only the top three are currently used
+ Icon=
+diff -ru ../gdm-2.14.6/configure.ac gdm-2.14.6/configure.ac
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/gdm-12-fixsessionname.diff	Wed Nov 29 16:14:38 2006 +0000
@@ -0,0 +1,25 @@
+--- gdm2/gui/gdmsession.c-orig	2006-11-28 10:35:25.817771000 -0600
++++ gdm2/gui/gdmsession.c	2006-11-28 10:40:49.555916000 -0600
+@@ -204,7 +204,13 @@ gdm_session_list_init ()
+ 
+ 		    tryexec = ve_config_get_string (cfg, "Desktop Entry/TryExec");
+ 		    if ( ! ve_string_empty (tryexec)) {
+-			    char *full = g_find_program_in_path (tryexec);
++			    char **tryexecvec = g_strsplit (tryexec, " ", -1);
++			    char *full = NULL;
++
++			    /* Do not pass any arguments to g_find_program_in_path */
++			    if (tryexecvec != NULL)
++				full = g_find_program_in_path (tryexecvec[0]);
++
+ 			    if (full == NULL) {
+ 				    session = g_new0 (GdmSession, 1);
+ 				    session->name      = g_strdup (dent->d_name);
+@@ -216,6 +222,7 @@ gdm_session_list_init ()
+ 				    dent = readdir (sessdir);
+ 				    continue;
+ 			    }
++			    g_strfreev (tryexecvec);
+ 			    g_free (full);
+ 		    }
+ 		    g_free (tryexec);