Help!

Starting DBus from gnome-session instead of Xsession

 
  

Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> GTK-GNOME RSS
Next:  Unmount usb stick  
Author Message
Loïc
External


Since: Nov 11, 2004
Posts: 475



PostPosted: Sun May 06, 2007 1:10 pm    Post subject: Starting DBus from gnome-session instead of Xsession
Archived from groups: linux>debian>maint>gtk>gnome (more info?)

Hi,

The session DBus in Debian Xsessions is currently started by
/etc/X11/Xsession.d/75dbus_dbus-launch if the use-session-dbus option
is set.

Newer gnome-session will spawn a session DBus automatically if none has
been started.

If gnome-session launches DBus, DBus will inherit env from
gnome-session which is handy for gnome-keyring for example.

I suspect we wouldn't suffer from the sound issues (the desktop sounds
are not working bugs) would we be moving to launch DBus from
gnome-session, and I think this is what we should aim to do.


I personally think it makes a lot of sense to launch DBus from
gnome-session; what I wonder about is how we're going to switch to this
setup.
Ubuntu plans to fix this via a patch to the dbus Xsession snippet to
avoid starting DBus when running GNOME session; see Ubuntu #62163 and
<http://librarian.launchpad.net/7170382/dbus_1.0.2-1ubuntu34.patch>.
It's not trivial to know whether we're really in a GNOME session
because:
- 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
- sessions can be started via startx and/or various other ways


Note: there's currently an upstream bug that gnome-session does not
wait on DBus enough; see GNOME bug #395488.

--
Loïc Minier


--
To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST.RemoveThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.RemoveThis@lists.debian.org
Back to top
Alan Baghumian
External


Since: Oct 20, 2006
Posts: 17



PostPosted: Sun May 06, 2007 2:00 pm    Post subject: Re: Starting DBus from gnome-session instead of Xsession [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hi,

Does d-i install dbus service as a standard part of the system?

Alan

> Hi,
>
> The session DBus in Debian Xsessions is currently started by
> /etc/X11/Xsession.d/75dbus_dbus-launch if the use-session-dbus option
> is set.
>
> Newer gnome-session will spawn a session DBus automatically if none has
> been started.
>
> If gnome-session launches DBus, DBus will inherit env from
> gnome-session which is handy for gnome-keyring for example.
>
> I suspect we wouldn't suffer from the sound issues (the desktop sounds
> are not working bugs) would we be moving to launch DBus from
> gnome-session, and I think this is what we should aim to do.
>
>
> I personally think it makes a lot of sense to launch DBus from
> gnome-session; what I wonder about is how we're going to switch to this
> setup.
> Ubuntu plans to fix this via a patch to the dbus Xsession snippet to
> avoid starting DBus when running GNOME session; see Ubuntu #62163 and
> <http://librarian.launchpad.net/7170382/dbus_1.0.2-1ubuntu34.patch>.
> It's not trivial to know whether we're really in a GNOME session
> because:
> - 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
> - sessions can be started via startx and/or various other ways
>
>
> Note: there's currently an upstream bug that gnome-session does not
> wait on DBus enough; see GNOME bug #395488.
>
> --
> Lo�c Minier
>
>
> --
> To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST.TakeThisOut@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster.TakeThisOut@lists.debian.org
>
>



--
To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org
Back to top
Alan Baghumian
External


Since: Oct 20, 2006
Posts: 17



PostPosted: Sun May 06, 2007 2:30 pm    Post subject: Re: Starting DBus from gnome-session instead of Xsession [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Oh GOD,

As I understand, if we prevent /etc/X11/Xsession.d/75dbus_dbus-launch to
be executed, gnome-session will start dbus and it's what we need exactly.
But that #395488 bug complicates the situation... the risk of killing
dbus-daemon at all...

Alan

> Hi,
>
> Does d-i install dbus service as a standard part of the system?
>
> Alan
>
>> Hi,
>>
>> The session DBus in Debian Xsessions is currently started by
>> /etc/X11/Xsession.d/75dbus_dbus-launch if the use-session-dbus option
>> is set.
>>
>> Newer gnome-session will spawn a session DBus automatically if none has
>> been started.
>>
>> If gnome-session launches DBus, DBus will inherit env from
>> gnome-session which is handy for gnome-keyring for example.
>>
>> I suspect we wouldn't suffer from the sound issues (the desktop sounds
>> are not working bugs) would we be moving to launch DBus from
>> gnome-session, and I think this is what we should aim to do.
>>
>>
>> I personally think it makes a lot of sense to launch DBus from
>> gnome-session; what I wonder about is how we're going to switch to this
>> setup.
>> Ubuntu plans to fix this via a patch to the dbus Xsession snippet to
>> avoid starting DBus when running GNOME session; see Ubuntu #62163 and
>> <http://librarian.launchpad.net/7170382/dbus_1.0.2-1ubuntu34.patch>.
>> It's not trivial to know whether we're really in a GNOME session
>> because:
>> - 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
>> - sessions can be started via startx and/or various other ways
>>
>>
>> Note: there's currently an upstream bug that gnome-session does not
>> wait on DBus enough; see GNOME bug #395488.
>>
>> --
>> Lo�c Minier
>>
>>
>> --
>> To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST.TakeThisOut@lists.debian.org
>> with a subject of "unsubscribe". Trouble? Contact
>> listmaster.TakeThisOut@lists.debian.org
>>
>>
>
>
>
> --
> To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST.TakeThisOut@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmaster.TakeThisOut@lists.debian.org
>
>



--
To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST.TakeThisOut@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.TakeThisOut@lists.debian.org
Back to top
Loïc
External


Since: Nov 11, 2004
Posts: 475



PostPosted: Mon May 07, 2007 10:20 am    Post subject: Re: Starting DBus from gnome-session instead of Xsession [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

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


--
To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST.DeleteThis@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster.DeleteThis@lists.debian.org
Back to top
Loïc
External


Since: Nov 11, 2004
Posts: 475



PostPosted: Mon May 07, 2007 10:50 am    Post subject: Re: Starting DBus from gnome-session instead of Xsession [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Sun, May 06, 2007, Tim Dijkstra wrote:
> For me it doesn't make sense. DBus aims to be more generic than just
> for gnome. You didn't make really clear why it should be started from
> gnome-session instead of during the X start-up. If you try to sneak in
> extra information into DBus' environment, that could be annoying for
> people who use an occasional gnome program, but do not use
> gnome-session.

gnome-session is the canonical way to properly start a GNOME session,
with a working GNOME stack. If a normal GNOME session needs dbus, then
I find it quite normal that gnome-session spawns it instead of relying
on the distributor to integrate dbus in the startup before
gnome-session.
In fact, you can go even farther and say that each individual
application needing the session dbus should arrange for it being
present, which is the case with recent DBus: but this is already solved
by newer DBus which will spawn a session dbus if any app needs to
access it.

Yes, starting dbus from gnome-session is a broken design, but it will
work in more cases than the current way of starting it, and it will
more consistent across distributions; I think we would benefit from
switching to this startup style.

--
Loïc Minier


--
To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST DeleteThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster DeleteThis @lists.debian.org
Back to top
Sjoerd Simons
External


Since: Nov 10, 2004
Posts: 203



PostPosted: Mon May 07, 2007 11:20 am    Post subject: Re: Starting DBus from gnome-session instead of Xsession [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, May 07, 2007 at 10:41:54AM +0200, Loïc Minier wrote:
> Yes, starting dbus from gnome-session is a broken design, but it will
> work in more cases than the current way of starting it, and it will
> more consistent across distributions; I think we would benefit from
> switching to this startup style.

Your obviously correct in this, we should care about our users Smile. But before
switching to this style i'd like to take some time to find out what exactly
breaks when gnome-session _doesn't_ start dbus. So we can raise our concerns
nicely with upstream and tell them what to fix Smile

The upstream bug reports the gnome-keyring socket env var as one
of the reasons, but currently gnome-keyring supports socket discovering magic
though dbus.. So that should be fine.

The other thing is that the SESSION_MANAGER env var isn't set. And there seems
to be an issue with system sounds through esd (although it's unclear if it's
related).

Sjoerd
--
I THINK THEY SHOULD CONTINUE the policy of not giving a Nobel Prize for
paneling.
-- Jack Handley, The New Mexican, 1988.


--
To UNSUBSCRIBE, email to debian-gtk-gnome-REQUEST RemoveThis @lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster RemoveThis @lists.debian.org
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> GTK-GNOME All times are: Eastern Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum