As I stated in this defect report, I strongly suggest we identify the 
actual semantics being addressed by these changes, and use a property 
that reflects that semantics. What's right for Sun Ray can be right for 
other environments as well - IMO there's never a reason to limit a 
solution to Sun Ray. In all cases it's likely to be something more 
general like "shared server resources" (which would apply to any thin 
client) or high latency rendering (which would e.g. apply to VNC 
client/server environments) or ...

-Bob

Ghee Teo wrote:
> 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 */
>
>
>
>

Reply via email to