Re: Starting DBus from gnome-session instead of Xsession
On Sun, May 06, 2007, Josselin Mouette wrote:
> > - from the PoV of gdm, there are a couple of GNOME sessions, and the
> > "Default" session, which will launch x-session-manager which might or
> > might not gnome-session
>
> See the gnomerc snippet which already does this detection:
>
> BASESTARTUP=`basename "$STARTUP" | cut -d\ -f1`
> if [ "$BASESTARTUP" = gnome-session -o \
> \( "$BASESTARTUP" = x-session-manager -a \
> "`readlink /etc/alternatives/x-session-manager`" = \
> /usr/bin/gnome-session \) ]; then
> blabla
> fi
Yes, I know, this is exactly what the patch I pointed at does ... and
it's very fragile. It would also be quite ugly to encode GNOME
awareness in dbus stuff.
I think there might be better ways to be more robust, cleaner, while
still offering more control to the end-user/end-administrator. For
example:
1) we could force all GDM sessions to be based on a .desktop file, pass
this .desktop file to the whole session via an env var or another
convention (~/.gdm-session-$DISPLAY.desktop could be a symlink to
this desktop file); options would be encoded in X- fields of this
file
2) we could pass various information directly via environment, such as
X_SESSION_OPTIONS="nodbus" and X_SESSION_TYPE="gnome" and use this as
a base to decide to parse .gnomerc and to disable dbus (a Xsession.d
script would add "nodbus" to X_SESSION_OPTIONS if X_SESSION_TYPE is
gnome)
I think both of the above options could be more robust than the current
check for the value of "STARTUP", while still giving end-user control
over what the session should or should not do.
> > - sessions can be started via startx and/or various other ways
>
> AFAIK startx also uses Xsession.
Yes, startx does, but by various other ways I meant:
- .xsession or .Xsession (Xsession.d/* are still read, but STARTUP wont
match this)
- overrides files of various dms, or session .desktop files
- custom manual calls to /etc/X11/Xsession
--
Loïc Minier
Reply to: