GDM login to a JHBuild session



I'm currently working on establishing a standard jhbuild configuration
for the online-desktop. One of the things I'd like to accomplish with
that is the ability to log directly into a jhbuild of GNOME from GDM.

My first attempt was to create an entry in /etc/X11/sessions like:

===
[Desktop Entry]
Encoding=UTF-8
Name=JHBuild
Comment=Custom Per-User Build
Exec=/usr/local/bin/jhbuild-session
Icon=
Type=Application
===

Where /usr/local/bin/jhbuild-session looked like:

===
if [ -x $HOME/bin/jhbuild ] ; then
   exec $HOME/bin/jhbuild/run dbus-launch gnome-session
fi

# Report error
===

But this doesn't really work because the system Xsession script has
already launched D-BUS using the system built copy and system session
configuration. So the .services files in $prefix/share/dbus-1/services
won't be found. The relevant portions of the system Xsession script on
Fedora looks like:

       # GDM provies either a command line as the first argument or
       # provides 'failsafe', 'default' or 'custom'.  KDM will do the
       # same at some point
       if [ "$1" != "default" -a "$1" != "custom" ]; then
           exec -l $SHELL -c "$SSH_AGENT $DBUS_LAUNCH $1"
       fi

I assume that other distributions do something similar. So, the
question is: how should a session .desktop file disable the running of
DBUS_LAUNCH in the system session initialization?

My proposal would be to extend the session .desktop file (is this a
standard defined somewhere? It appears to be shared with kdm in some
fashion) to allow setting environment variables. So, we'd add a line:

 X-GNOME-Environment: DISABLE_DBUS_LAUNCH=true; [...]

Then we could push patches to distributes that would check that
environment variable before invoking the session inside D-BUS.

Any better ideas?

- Owen



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