First Last Prev Next    No search results available      Search page      Enter new bug
Bug#: 77504
Alias:
Product:
Component:
Status: RESOLVED
Resolution: FIXED
Assigned To: Gentoo KDE team <kde@gentoo.org>
Hardware:
OS:
Version:
Priority:
Severity:
Reporter: Ikke <eikke@eikke.com>
Add CC:
CC:
Remove selected CCs
URL:
Summary:
Status Whiteboard:
Keywords:

Filename Description Type Creator Created Size Actions
30dbus-launch.sh /etc/X11/xinit/xinitrc.d/30dbus-launch.sh text/plain Ed Catmur 2005-02-16 08:36 0000 122 bytes Details
Create a New Attachment (proposed patch, testcase, etc.) View All

Bug 77504 depends on: Show dependency tree
Bug 77504 blocks: 88043
Votes: 0    Show votes for this bug    Vote for this bug

Additional Comments: (this is where you put emerge --info)


Not eligible to see or edit group visibility for this bug.






View Bug Activity   |   Format For Printing   |   XML   |   Clone This Bug


Description:   Opened: 2005-01-11 04:16 0000
This patch changes GDM's Xsession in a way a DBUS session daemon is started
when a session is started, and stopped when the session is closed.

At this moment not so many programs use the DBUS session daemon, but they're
coming.

------- Comment #1 From Joe McCann (RETIRED) 2005-01-11 15:20:34 0000 -------
At this point it probably isn't a good idea to start the session daemon just
because the user has dbus installed. It is something that we will need to look
into for the future though, as you said more apps will be getting dbus support.
Now that portage has the newuse feature, we could maybe add a dbus flag which
would add this option.

------- Comment #2 From Ikke 2005-01-12 02:52:21 0000 -------
Actually that's what I was thinking off: create the "dbus" USE flag (I'm
working on DBUS-izing some applictions these days), and just apply the patch if
GDM is emerged with this flag set.
Of course it should dep on sys-apps/dbus too then ;-)

------- Comment #3 From foser (RETIRED) 2005-01-12 04:56:43 0000 -------
I'm not in favor of adding/using a dbus flag for trivialities like this, users
will want it if it's used unconditionally. If you don't have dbus it won't get
started & if you do have it, then gnome will likely use it at some point, but
right now there is nothing in the tree that uses a session daemon so thats why
I didn't add it.

------- Comment #4 From Kai Zimmermann (RETIRED) 2005-01-20 10:19:14 0000 -------
When starting dbus-launch it crashes because of missing the directories
/usr/lib/dbus-1.0/service and /usr/lib/dbus-1.0/services.

Maybe the dbus ebuild should take care of this?

kai

------- Comment #5 From Ikke 2005-01-20 10:25:36 0000 -------
I guess that's something wrong at your side. I got a session bus running here
all time, with some apps running on it, using latest ~x86 dbus ebuilds. System
bus (with hal on it) works great too.
I did notice the Tomboy (I guess it was that one, cant check now caus I copied
them over) service description files are installed in some faulty location (ie
not the same one as written inside session.conf).

------- Comment #6 From gad.kadosh@gmail.com 2005-02-04 04:52:25 0000 -------
I can confirm that Ikke's patch works great. Is it not better to have a
/etc/X11/Xsession.d directory with sessions scripts that are sourced by
/etc/X11/gdm/Xsession (or whatever). That way the dbus ebuild can put its
script in that folder so dbus starts for every new session?

------- Comment #7 From Genady Okrain 2005-02-16 03:42:56 0000 -------
What about kde users?

------- Comment #8 From Ed Catmur 2005-02-16 08:35:16 0000 -------
Re comment 6: there already exists a directory for this purpose,
/etc/X11/xinit/xinitrc.d/

I am currently using:

$ cat /etc/X11/xinit/xinitrc.d/30dbus-launch.sh
#!/bin/sh

eval `dbus-launch --sh-syntax --exit-with-session`
export DBUS_SESSION_BUS_ADDRESS
export DBUS_SESSION_BUS_PID

This seems to be the accepted convention; if merged with USE=xprint xorg-x11
puts /etc/X11/xinit/xinitrc.d/92xprint-xpserverlist.sh in that directory.

------- Comment #9 From Ed Catmur 2005-02-16 08:36:17 0000 -------
Created an attachment (id=51349) [details]
/etc/X11/xinit/xinitrc.d/30dbus-launch.sh

Much simpler than patching GDM.

This can be installed by the dbus ebuild directly.

------- Comment #10 From gad.kadosh@gmail.com 2005-02-16 09:06:23 0000 -------
I don't seem to have a /etc/X11/xinit/xinitrc.d/ directory on my system, though
I'm using xorg-6.8.0-r4 and GDM. are you sure about what you are talking about?

------- Comment #11 From Ikke 2005-02-16 09:08:10 0000 -------
@Ed: nice catch.
@Gad: I got a dir like that, with some xprint file in it. Maybe you haven't got the xprint USE flag, and isn't the directory created by the ebuild?

------- Comment #12 From gad.kadosh@gmail.com 2005-02-16 09:25:03 0000 -------
indeed the xprint USE flag is not on my system, I will try to create the dir
manually to see if it works...

Ikke: it works for you?
I knew of this method in other distros but thought gentoo does not work with it
because I didn't have that dir...

------- Comment #13 From gad.kadosh@gmail.com 2005-02-16 09:32:45 0000 -------
I just tried that... I created the dir and put the script in it - but dbus is
not started.

------- Comment #14 From Ed Catmur 2005-02-16 09:38:20 0000 -------
You may need to make it executable. I'll look to see where they're sourced
from.

------- Comment #15 From Ed Catmur 2005-02-16 09:41:00 0000 -------
Yes; gdm sources them thus:

/etc/X11/gdm/Xsession:
# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for i in /etc/X11/xinit/xinitrc.d/* ; do
        if [ -x "$i" ]; then
      . "$i"
        fi
    done
fi

------- Comment #16 From gad.kadosh@gmail.com 2005-02-16 09:51:25 0000 -------
Yes I was hasty. execute made it work - that's the best fix for it IMO. now it
should be added to the dbus ebuild...

------- Comment #17 From foser (RETIRED) 2005-03-06 14:02:28 0000 -------
added a session script to 0.23.2-r1 , please cheack & test.

------- Comment #18 From foser (RETIRED) 2005-03-07 04:47:48 0000 -------
according to spyderous xinitrc.d is a RH-ism we don't really support, so we
really shouldn't be using it.

------- Comment #19 From Ed Catmur 2005-03-07 04:59:27 0000 -------
Is there an alternative? I note that xorg-x11+xprint installs 92... to both
/etc/X11/xinit/xinitrc.d and /etc/X11/Xsession.d - should dbus do the same?

wrt comment 17, shouldn't the session script export the variables?

------- Comment #20 From foser (RETIRED) 2005-03-07 05:34:45 0000 -------
There is no alternative to our knowledge.

the --sh-syntax should already do the exporting, it seemed redundant to me.

------- Comment #21 From Ikke 2005-03-07 06:08:41 0000 -------
--sh-syntax doesnt do the exporting itself, it only printf()'s the variables
you should export in a SH-compliant way (theres also the --csh-syntax flag). So
depending on the place where you call it, eval()'ing it can be necessary.

------- Comment #22 From gad.kadosh@gmail.com 2005-03-07 10:23:05 0000 -------
does this solution work with GDM only or all others login managers? does it
affect startx too?

------- Comment #23 From Scott McKenzie 2005-03-28 23:01:32 0000 -------
This script does not kill my session daemon when I log out of GNOME.  Does it
do that for anyone else?

------- Comment #24 From Scott McKenzie 2005-04-02 13:48:15 0000 -------
Adding myself to CC list.

------- Comment #25 From Andreas Simon 2005-05-12 02:37:47 0000 -------
Answer to comment #22:
No this script doesn't work with kdm or xdm because their various Xsession scripts doesn't source the scripts in /etc/X11/xinit/xinitrc.d/ , i.e. they miss the code snipplet from comment #15.

------- Comment #26 From collin wang 2006-03-21 19:11:26 0000 -------
(In reply to comment #8)
> Re comment 6: there already exists a directory for this purpose,
> /etc/X11/xinit/xinitrc.d/
> 
> I am currently using:
> 
> $ cat /etc/X11/xinit/xinitrc.d/30dbus-launch.sh
> #!/bin/sh
> 
> eval `dbus-launch --sh-syntax --exit-with-session`
> export DBUS_SESSION_BUS_ADDRESS
> export DBUS_SESSION_BUS_PID
> 
> This seems to be the accepted convention; if merged with USE=xprint xorg-x11
> puts /etc/X11/xinit/xinitrc.d/92xprint-xpserverlist.sh in that directory.
> 

I don't have the same file, but i do have the 30-dbus file. So integrating the
two, i get: 

[code]

BeTaBoXjFS xinitrc.d # cat 30-dbus
#!/bin/bash

# launches a session dbus instance

dbuslaunch="`which dbus-launch 2>/dev/null`"

if [ -n "$dbuslaunch" ] && [ -x "$dbuslaunch" ] && [ -z
"$DBUS_SESSION_BUS_ADDRESS" ]; then

  eval `$dbuslaunch --sh-syntax --exit-with-session`

# added from http://bugs.gentoo.org/show_bug.cgi?id=77504

        export DBUS_SESSION_BUS_ADDRESS
        export DBUS_SESSION_BUS_PID
#

fi

[/code]

Hope it helps!

------- Comment #27 From Gilles Dartiguelongue 2006-06-12 23:51:22 0000 -------
what is the status of this bug ?
I have the script installed (running ~x86) and the session bus is launched and
stopped the right way.

------- Comment #28 From Doug Goldstein 2006-06-17 08:04:28 0000 -------
We include this script now. Gnome works fine for a while... other WMs work fine
if they process the xinitrc.d dir... I think only KDE is busted..

<genstef> ln -s /etc/X11/xinit/xinitrc.d/30-dbus /usr/kde/3.5/env/dbus.sh
<genstef> basically that is needed
<Flameeyes> genstef, i'm not sure if that is correct
<genstef> use hal && dosym /etc/X11/xinit/xinitrc.d/30-dbus
${KDEDIR}/env/dbus.sh
<genstef> why not?
* zzam has quit ("KVIrc 3.2.3 Anomalies http://www.kvirc.net/")
<Cardoe> Flameeyes: the correct thing is for KDE to process xinit stuff
<Flameeyes> Cardoe, exactly my point
<sekretarz> Cardoe: if you can check it i'd be apriciate
<Cardoe> however for now... Gentoo needs to do the hack
<Flameeyes> Cardoe, i suppose it's quite simpler to change the other thing
<Flameeyes> startkde script is the one to fix
* mabi (n=mabi@p54B878FA.dip.t-dialin.net) has joined #gentoo-dev
<Flameeyes> i think i can do that easily, but i'm not sure if carlo has put the
patches for the tarballs in CVS, so he might be the only one able to prepare
them correctly

That's the revelant part of the discussion.

Re-assigning to KDE herd since it's waiting on them now.

------- Comment #29 From Diego E. 'Flameeyes' Pettenò 2006-06-17 08:10:36 0000 -------
I have a patch that should work, waiting for genstef to test (I can't right
now), and then I'll commit it.

------- Comment #30 From Donnie Berkholz 2006-06-20 22:39:01 0000 -------
*** Bug 132782 has been marked as a duplicate of this bug. ***

------- Comment #31 From Saleem Abdulrasool (RETIRED) 2006-06-28 00:34:14 0000 -------
*** Bug 138101 has been marked as a duplicate of this bug. ***

------- Comment #32 From Doug Goldstein 2006-06-30 07:14:29 0000 -------
Flameyes and genstef have fixed this issue.

------- Comment #33 From MaratIK 2006-09-13 03:33:31 0000 -------
it is not work for launching gnome from startx (not using gdm)

solution:
add this code to /etc/X11/xinit/xinitrc

# run all system xinitrc shell scripts.
if [ -d /etc/X11/xinit/xinitrc.d ]; then
    for i in /etc/X11/xinit/xinitrc.d/* ; do
        if [ -x "$i" ]; then
      . "$i"
        fi
    done
fi

------- Comment #34 From Doug Goldstein 2006-09-13 16:10:49 0000 -------
It should be started by the Gnome Session script.

------- Comment #35 From Donnie Berkholz 2006-09-13 19:32:54 0000 -------
Someone's working with me on a more generalized solution now (see -dev list
xinit thread), it'll probably be a while before we can get where it needs to
be.

First Last Prev Next    No search results available      Search page      Enter new bug