Objectives for Oneiric - Brainstorming

Kyle Nitzsche kyle.nitzsche at canonical.com
Thu Apr 28 13:49:54 UTC 2011


On 04/28/2011 03:18 AM, Matthew East wrote:
> On 28 April 2011 00:42, Kyle Nitzsche<kyle.nitzsche at canonical.com>  wrote:
>> On 04/27/2011 01:46 PM, Shaun McCance wrote:
>>> On Wed, 2011-04-27 at 10:38 +0100, Matthew East wrote:
>>>> • Move 11.04 docs to ubuntu-docs package
>>>>   - the docs now in gnome-user-docs are customised so heavily that it
>>>> is appropriate for them to be in a separate package, with yelp patched
>>>> to open them by default.
>>>>   - this would allow us to ship gnome-user-docs as a vanilla upstream
>>>> release for those using gnome-shell.
>>> Thanks, this would be appreciated. Even if the Ubuntu help started
>>> as a fork of gnome-user-docs, it really is a separate document and
>>> it ought to have its own document ID.
>>>
>>> I would still like to have upstream Yelp be able to determine which
>>> document to load based on what desktops it's running under. If Yelp
>>> is just patched downstream, it will still show the Unity help by
>>> default even when running under GNOME Shell.
>>>
>> Hi folks,
>>
>> I'd like to recommend that yelp consult gconf key to determine its home
>> page/content. That makes it so easy to customize.
> I'm not sure that helps with the particular problem of showing a
> different page depending on which desktop (Unity, Unity-2d,
> gnome-shell, xfce, etc) the user has logged in with. Could a gconf key
> exist that changes depending on this? Even if it could, would it be
> the right thing to do?
>

Good point. If there isn't already one (and I haven't found one yet), I think 
there should be such a key. This would enable easily pointing yelp at the 
desired default help content, which greatly facilitates customization. My goal 
is to enable customization without having to patch/fork yelp. Patching means 
giving up on new versions (or doing manual work to pick up latest changes).

Note that at login time in GDM, the user selects their desired desktop in a 
combo box, and if that info is not stored in a dedicated gconf key, maybe it 
should be. (I note that .dmrc has a Session field but that, for me, says 
"gnome", not "unity", but I am using unity, so this is not quite right.)

Since this reliable, dedicated gconf key does not yet seem to exist, the 
question remains how to deduce the current desktop and how to tell yelp about it 
in a way the keeps things flexible/customizable.

== Design ==

 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.


== 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?

Cheers,
Kyle










More information about the ubuntu-doc mailing list