Objectives for Oneiric - Brainstorming
Shaun McCance
shaunm at gnome.org
Thu Apr 28 14:51:13 UTC 2011
On Thu, 2011-04-28 at 09:49 -0400, Kyle Nitzsche wrote:
> From a design point of view, I would to suggest the following:
> * yelp selects its default home page from a yelp gconf key (maybe
> /apps/yelp/homepage string)
> * there is code to deduce the current desktop that sets the yelp homepage key
> * that desktop deduction code can be disabled with another gconf key (maybe
> /apps/yelp/auto_deduce_homepage bool)
>
> This way, the default is that yelp deduces the desktop and sets the homepage key
> and then displays the homepage.
>
> But, a customized ubuntu can disable the desktop deduction code (which probably
> won't work in cases with different custom desktops) and can display the help
> content that is appropriate. Without modifying yelp.
>
> This deduction code would either read the single dedicated current shell key
> (which doesn't exist yet) and set the yelp homepage key, or do more complicated
> stuff and set the yelp homepage key. Ideas on how to deduce the desktop next.
GNOME 3 and Yelp 3 have moved entirely to GSettings. I don't know
what the plan for that is with Unity, but I don't want to bring
back a GConf dependency to read a key set by other applications.
How critical is it that you be able to turn off auto-detection and
just set a static page instead? I could have a GSettings key for
that, if necessary.
> == How to deduce the current desktop now? ==
>
> Since a single dedicated key may not exist yet, it may be sufficient to deduce
> which *single* desktop is being used. That is, the real-world use case is
> probably not users switching between desktops. The vast majority of users just
> have and use one. If the user installs multiple desktops, then yelp may not
> automatically display the right help content. This compromise may enable desktop
> deduction in the real-world end-user case.
>
> With this in mind, the current desktop may be deducible from extant keys.
>
> For example, if unity:
> * This key exists:
> /apps/compizconfig-1/profiles/unity/general/screen0/options/active_plugins
> * And it contains: 'unityshell'
>
> If unity-2d:
> * This key directory exists: /desktop/unity-2d
>
> Perhaps if gnome-shell is being used, the first key I mentioned does not contain
> unityshell but instead contains gnomeshell?
Right now, the most reliable method I'm finding is checking for
known services on DBus. This is basically like checking running
processes, but without all the nasty "is this process actually
for this session" headaches. DBus solves that.
Here's what I've got so far:
org.gnome.Panel - Running for GNOME 2 and GNOME 3 fallback. I
don't know how to distinguish between the two, unfortunately.
But then, I don't think it's likely Yelp 3 will be run under
GNOME 2.
org.gnome.Shell - Running for full GNOME 3.
com.canonical.Unity - Running for Unity.
I'd like to see if there's anything reliable I can test for
Unity 2D and for XFCE. I'm curious about KDE too. This can
be used for more than just default document detection. I'd
like to get run-time conditional processing in soon, so we
can actually have application help adapt instructions to
the environment without patching.
--
Shaun
More information about the ubuntu-doc
mailing list