Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Desktop Environments
  • Search

How should I connect to user dbus session?

Problems with GUI applications? Questions about X, KDE, Gnome, Fluxbox, etc.? Come on in. NOTE: For multimedia, go up one forum
Post Reply
Advanced search
3 posts • Page 1 of 1
Author
Message
ppurka
Advocate
Advocate
Posts: 3256
Joined: Sun Dec 26, 2004 5:05 pm

How should I connect to user dbus session?

  • Quote

Post by ppurka » Fri Apr 06, 2012 4:47 pm

A recent upgrade of dbus has [topic=917584]resulted in the following[/topic] for me.

1. Login to X as user, I used slim with the default session that opens up only a terminal for me.

2. Run the following:

Code: Select all

~> qdbus org.freedesktop.DBus  # This works, running as user.
/
~> su -
Password: 
~> qdbus org.freedesktop.DBus  # This is running as root and it works.
/
~> su <user> -c 'qdbus org.freedesktop.DBus'  # Fails
Could not connect to D-Bus server: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.

~ [1] > su <user> -c 'DISPLAY=:0.0  qdbus org.freedesktop.DBus' # Fails
Could not connect to D-Bus server: org.freedesktop.DBus.Error.Spawn.ExecFailed: /usr/bin/dbus-launch terminated abnormally with the following error: No protocol specified
Autolaunch error: X11 initialization failed.
3. The latter commands used to work. For years. And I used the dbus service like this daily via an acpi script. It stopped working after the upgrade of dbus to 1.4.18. The previous version of dbus where it worked was 1.4.16.

4. A downgrade of dbus to 1.4.16 has not restored the earlier behavior.


So, now my question is this: what is the newfangled way to get commands like the above to work? These things used to "just work" for so many years. :roll:
[topic=797019]emerge --quiet redefined[/topic] | E17 vids: I, II | Now using kde5 | e is unstable :-/
Top
cosmoslx
n00b
n00b
Posts: 1
Joined: Wed Jun 15, 2011 2:38 pm

  • Quote

Post by cosmoslx » Wed Dec 12, 2012 3:26 am

I also have this problem too...
have you figured out the solution yet?
Top
salahx
Guru
Guru
Posts: 571
Joined: Sat Mar 12, 2005 6:39 am

  • Quote

Post by salahx » Thu Dec 13, 2012 5:57 am

I suspect the problem has to do with the way dbus autolaunches, on autolaunch it checks for a existing bus (by checking DBUS_SESSION_BUS_ADDRESS - if that's not set it check ~/.dbus/session-bus). The problem is ~/.dbus/session-bus contains stale data. The solution is not to rely on autolaunch but explicitly create the bus yourself: eval `dbus-launch --sh-syntax`. Do note however, the resulting dbus will NOT be automatically terminated on logout
Top
Post Reply

3 posts • Page 1 of 1

Return to “Desktop Environments”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy