Common configuration schema for GNOME applications



Hi,

The GConf technology has great potential to make GNOME easier to
configure for end-users and to make life easier for administrators
who have "one place" to customize GNOME for users in large companies.

I'd like to propose that the GNOME project tries to define and adopt 
a well-defined configuration schema for GNOME applications:

- users get consistency and a single dialog can configure the same setting
  in multiple applications
- developers don't have to define some parts of their application schema,
  they can just use the common schema
- administrators get a well-documented configuration, so they can
  write tools to import/export/backup/restore specific important settings
  for and from GConf and other configuration sources

I've written a document, mostly consisting of a table of proposed
common settings. I'd like to get input and feedback from GNOME
hackers so that in a couple of weeks, I can:

- publish the schema in GConf's XML format
- provide sample code to read/write groups of related settings

There is some discussion going on about whether GConf or Bonobo-config
API will be the standard for GNOME applications; I am confident that
we can work this out so that the choice will be up to individual
developers and applications can read/write the same configuration
information from either API.

Here's the schema as text for ease of follow-up, attached as html.
I'll summarize the input every few days so that people can see
the current state of the proposal.

--
GNOME Core Configuration Schema

Colm Smyth - colm smyth sun com

Introduction

Many GNOME applications (particularly the core ones) are already using GConf
for storing application settings. The GConf documentation makes it very easy
to get up to speed with the API (which is as easy as the old gnome-config
API). However, the GConf docs do not offer much advice about where to to
store different configuration settings; it's really been up to each
maintainer to tackle questions like:

   * what settings should be configurable in my application?

   * where should I store my application-specific settings? (where = what
     key "directory")

   * are there any common settings that my application could share with
     other GNOME applications?

This document is a work-in-progress description of a common configuration
schema for GNOME. It aims to identify the configuration keys of settings
that will be common to more than one GNOME application.

Why is a core schema useful?

There are at least a few reasons why we should aim to have a well-documented
common configuration schema:

   * easy for hackers - contributors to the GNOME project have less work to
     do coming up with a schema for their specific application or library;
     they also don't have to be concerned with documenting the common
     settings or providing a configuration dialog for them (because a common
     Control Center GUI should be able to edit at least the common settings)

   * easy for users (and administrators) - by editing a single configuration
     dialog, a user or system administrator can update settings that are
     used by multiple GNOME applications

   * even easier for administrators - by establishing a mapping with
     existing information schemas from LDAP inetOrgPerson schema (rfc2798)
     and the vCard schema (rfc2426)), we can help folks who know those
     schemas and a mapping may be of use to administrators who want to
     import or synchronize some directory information for example between an
     LDAP directory and GNOME's GConf

Core Schema

The table below summarizes and groups the configuration settings that should
be used where possible by the GNOME desktop and all of its applications.

For each category, a base key or "directory" is given, followed by a number
of individual settings. Where a group of keys belong in a "directory or
"sub-directory", the key ends with a "/". Where a sub-directory is a
variable rather than a single fixed value, it is represented as
'<key-purpose="key-name", ...>'. For example,the "/user/telephony" directory
has an arbitrary number of sub-directories for different groups of
phone/fax/etc numbers; one group might be called "default" another called
"work"; an example telephony setting in each group might be:

   * /user/telephony/default/phone = "555-3231" and

   * /user/telephony/work/fax = "999-1714"

        Group                  Key                                     Description

 User; /user/name/   login                  User system name

                                            e.g. /user/name/login = "jdoe"

                                            Note that the value of the login setting is by default used for
                                            the Internet client /client-protocols settings; this is further
                                            described in the section "Login name"

                     displayName            preferred written form of a person's name

                                            e.g. /user/name/displayName = "John Doe"

                                            LDAP:inetOrgPerson.displayName

                                            vCard.DisplayName

                     givenName              preferred abbreviated form of a person's name

                                            e.g. /user/name/givenName = "John"

                                            LDAP:inetOrgPerson.GivenName

                     nickName               colloqial name used for groupware such as IRC

                                            e.g.

                                            /user/name/nickName = "sampleGuy"

 Locale;             preferredLocales       name of a set of related language settings and cultural
                                            conventions ( rfc1766, and extensions supported by
 /user/international                        setlocale(3C), along with any aliases found in
                                            /usr/lib/X11/locale/locale.aliases or
                                            /usr/share/locale/locale.aliase

                     preferredLanguages

                     preferredEncodings

 Organization;       name                   Companies or organizations with which the user is affiliated

 /user/organization/                        e.g. /user/organization/default/name="Sample Org Ltd.",
                                            /user/organization/savethewales/web-site="www.whalesave.com"
 <orgname="default">

                     web-site               Main web-site of the organization

                                            e.g. /user/organization/default/web-site="www.sampleorg.com"

                     address                directory for a collection of settings describing the street or
                                            postal address (see 'schema elements' below)

 Telephony;          <name=                 directory for a collection of settings describing the street or
 /user/telephony/                           postal address (see 'schema elements' below)
                     "fax", "phone",
 <type="default",    "pager", "cellphone">/ number,description,notes
 "work", "home",
 ...>                                       e.g. /user/telephony/default/phone="555-3123"

 Mail; /user/mail/   imap4-address          IMAP4 mail address for the user

                     signature-url          URL (possibly file:) for the mail signature file to be appended
                                            to outgoing mail messages

                     reply-to-mail-address  the mail address to which replies to outgoing mails should be
                                            sent (by default, the same as imap4-address)

 Internet Protocols; http/proxy/            Each http proxy has a group of settings:
 /client-protocols/
                     <server-name=             * host = hostname on which proxy runs

                     "default">                * port = tcp/ip port of proxy

                                               * domain-use = a comma-separated list of domain suffixes for
                                                 which the proxy will be used (empty = all)

                                               * domain-nouse = a comma separated list of domain suffixes
                                                 for which the proxy will not be used

                                            e.g.
                                            /client-protocols/http/proxy/default/domain-nouse=.sampleorg.com

                     ftp/anonymous-password This is the password used by graphical internet clients such as
                                            browsers when one is required for anonymous ftp; the default
                                            value is the settings "/user/mail/imap4-address"

                     imap/server/           Each IMAP4 server has a group of settings:

                     <server-name=             * user (see 'Login Names' below)

                     "default",...>/           * host = hostname or IP address

                                               * port = port number

                                               * compose = one of { "text","html" }

                                               * prefer = one of { "text", "html" }

                                               * use-ssl = { "yes" | "no" | "try") }

                                               * mailbox = directory containing mailboxes; standard
                                                 mailboxes are "inbox" and "sent"

                                            e.g. /user/imap/server/default/mailbox/inbox="Inbox",
                                            /user/imap/server/junkmail/host="www.warmmail.com"

                     smtp/server/           Similar to IMAP4 settings:

                     <server-name=          user, host, port (default is 25), use-ssl

                     "default", ...>/

                     nntp/server/           Similar to IMAP4 settings:

                     <server-name=          user, host, port (default is 25), compose, prefer

                     "default", ...>/

                     ldap/server/           host, port, user-root-dn

                     <server-name=          e.g. /user/client-protocols/ldap/server/default/port=389

                     "default", ...>/

 Display; /display/  zoom                   number indicating default percentage-magnification

                                            e.g. /display/zoom=150

 Places; /places/    file/                  "Places" are bookmarks on steroids; more is said about them in
                                            the "Places" section below.
                     <group-name=
                                            This is not intended to be a replacement for browser bookmarks
                     "standard", "recent">/ but an additional mechanism for extending the bookmarks concept
                                            to other applications.

                                            <place-name="home", "temporary", "documents", "system",
                                            "session", "tasks", "projects", "current-project", ...>/

                                            Each recorded place has the following keys/settings

                                               * display-name

                                               * place-url

                                               * display-description

                                            e.g. keys in /places/file/standard/home/ :

                                            display-name="My Home", place-url="/home/jdoe",
                                            display-description= "John Doe's Home Directory"

                     http/, ftp/            a set of standard places accessible via http, perhaps including
                                            the user's personal web-site, project web-site, etc.
                     <group-name=
                                            e.g. /places/http/project/gnome/
                     "standard,
                                            display-name="GNOME", url="http://www.gnome.org";,
                     "personal", "project", display-description="GNOME home"
                     "workgroup",
                     "company">

Places

Some applications store information about special places, that is files,
directories or in general URLs that the user wants to return to. Browsers
have had the capability to save bookmarks or browsing history since the
beginning. Many document-based applications have a 'recent files' list. Some
applications use environment variables to identify special directories;
$HOME and $TMPDIR are common examples, but it would useful to widen the set
of "standard" directories into categories that user's find useful -
"documents", "tasks", "projects" and so on.

To make things easy for application maintainers, one of the ways to make
"places" available to applications is through the file open/save/etc
dialogs. The "standard" group is intended to stored a set of named
directories that allow the user to quickly jump to a favourite directory
when opening or saving a file.

Many applications want to treat different types of containers for files
differently. Most applications can only open files on the local file-system,
so "file" URLs are important. We can also separate "http" and "ftp" places.
For applications that can work with any type of location, we can also
support groups of URLs undifferentiated by type.

Areas for further work

This entire document is a work-in-progress. The more applications use the
common settings, the more value the end-user gets out of setting each one. I
think it would be useful to spend some time identifying some useful standard
locations for the /places configuration group.

Login Name

   * imap/user (also imap/server/<servername="default">/user)

   * ftp/user (also ftp/server/<servername="default">/user)

   * smtp/user

For all of the internet protocols a user name may be specified for any
server or for each service-type (e.g. http), but the default is the value of
"/user/name/login".

Attachment: gnome-global-schema.html
Description: gnome-global-schema.html



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]