Ghee: > A lot of valid points. > May be we should move the discussion into the bug itself, > http://defect.opensolaris.org/bz/show_bug.cgi?id=11467 > since some comments have been made there.
That seems reasonable. But still, we should, I think, at the very least start a discussion with the upstream freedesktop community and find out if we can work towards a more general solution that can be accepted upstream. Since you are working on this bug, could you start that discussion? Brian > Brian Cameron wrote: >> >> Ghee: >> >> To me, this seems a partial, or short-term, solution. However, you >> do not say that it is, so I have some questions. >> >> Currently, SRSS software works on many different distributions (such >> as Red Hat, Ubuntu, Novell, etc.) and unless we get these sorts of >> changes upstream, then people using SRSS on non-OpenSolaris distros will >> still have problems with these undesired autostart programs still >> being available by default. >> >> So I wonder, what technique should be used to ensure that SRSS works >> properly on all distros? If the solution is that the SRSS install >> process should disable these autostart files (perhaps by setting >> Hidden=true in them, by removing them, or moving them aside), then >> it would seem to make the most sense to use this technique on >> OpenSolaris as well, rather than treating OpenSolaris as a special >> case. So, is this a temporary solution until SRSS adds something to >> their install process to manage this? >> >> Or, if we are hoping to get this sort of change upstream, then I wonder >> why this is coded in a Sun Ray specific manner. It would seem more >> likely to get upstream if we had some general mechanism that could be >> used for a wider array of purposes. For example, perhaps the desktop >> file should have a key that enables or disables the desktop file based >> on whether an environment variable or X-property is set. >> >> Have we discussed this extension with the upstream Free Desktop >> community to see if some sort of general mechanism could be added >> to the desktop specification to manage this sort of thing in a way >> that could go upstream and make Sun Ray work better across all distros? >> I would think that the xdg at lists.freedesktop.org mailing list would be >> the right place to discuss this. >> >> I would think we should have some upstream discussion before adding >> such patches to our build, unless this is intended to be a short-term >> fix until the SRSS software adds any needed code to their install >> scripts. >> >> Brian >> >> >>> This is a fix to provide some level of support for not automatically >>> starting some applications which are deemed unnecessary when user is >>> login on a Sun Ray DTU as described in >>> http://defect.opensolaris.org/bz/show_bug.cgi?id=11467 >>> >>> The fix here in gnome-session is to check for the presence and value >>> of the key >>> >>> X-SUNRAY-Disable=true >>> >>> and gnome-session checks for the presence of the X-property, >>> _SUN_SUNRAY_HOME >>> to indicate that is a DTU and hence not to start up the application >>> associated with the desktop file. >>> >>> ----- >>> Index: base-specs/gnome-session.spec >>> =================================================================== >>> --- base-specs/gnome-session.spec (revision 19421) >>> +++ base-specs/gnome-session.spec (working copy) >>> @@ -71,6 +71,8 @@ >>> Patch18: gnome-session-18-fastreboot.diff >>> #owner:gheet date:2009-09-10 type:bug doo:11230 >>> Patch19: gnome-session-19-remove-dup.diff >>> +#owner:gheet date:2009-09-10 type:branding doo:11467 >>> +Patch20: gnome-session-20-sunray-profile.diff >>> >>> >>> URL: http://www.gnome.org >>> @@ -126,6 +128,7 @@ >>> %patch17 -p1 >>> #%patch18 -p1 >>> %patch19 -p1 >>> +%patch20 -p1 >>> >>> %build >>> %ifos linux >>> >>> >>> $ cat patches/gnome-session-20-sunray-profile.diff >>> diff -urN -x'*nfs*' >>> gnome-session-2.27.92/gnome-session/gsm-autostart-app.c >>> ../SUNWgnome-session-2.27.92.hacked/gnome-session-2.27.92/gnome-session/gsm-autostart-app.c >>> >>> >>> --- gnome-session-2.27.92/gnome-session/gsm-autostart-app.c >>> 2009-07-01 13:45:30.000000000 +0100 >>> +++ >>> ../SUNWgnome-session-2.27.92.hacked/gnome-session-2.27.92/gnome-session/gsm-autostart-app.c >>> >>> 2009-09-21 14:41:00.117490099 +0100 >>> @@ -28,6 +28,7 @@ >>> >>> #include <glib.h> >>> #include <gio/gio.h> >>> +#include <gdk/gdkx.h> >>> >>> #include <gconf/gconf-client.h> >>> >>> @@ -99,6 +100,38 @@ >>> } >>> >>> static gboolean >>> +is_sunray_client (void) >>> +{ >>> + Atom sunray_client_id; >>> + >>> + sunray_client_id = XInternAtom (GDK_DISPLAY (), >>> + "_SUN_SUNRAY_HOME", True); >>> + >>> + if (sunray_client_id == None) { >>> + return FALSE; >>> + } >>> + else return TRUE; >>> +} >>> + >>> + >>> +static gboolean >>> +is_disabled_for_sunray_client (GsmApp *app) >>> +{ >>> + GsmAutostartAppPrivate *priv; >>> + >>> + priv = GSM_AUTOSTART_APP (app)->priv; >>> + >>> + if (egg_desktop_file_has_key (priv->desktop_file, >>> + "X-SUNRAY-Disable", NULL) && >>> + egg_desktop_file_get_boolean (priv->desktop_file, >>> + "X-SUNRAY-Disable", NULL) && >>> + is_sunray_client ()) >>> + return TRUE; >>> + else >>> + return FALSE; >>> +} >>> + >>> +static gboolean >>> is_disabled (GsmApp *app) >>> { >>> GsmAutostartAppPrivate *priv; >>> @@ -130,6 +163,10 @@ >>> return TRUE; >>> } >>> >>> + /* Add additional check for Sun Ray DTU */ >>> + if (is_disabled_for_sunray_client (app)) >>> + return TRUE; >>> + >>> /* Do not check AutostartCondition - this method is only to >>> determine >>> if the app is unconditionally disabled */ >>> >>> >>> >>> >> >
