Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [d-bus]

A message bus system, a simple way for inter-process communication. It also helps coordinate process lifecycle.

62
votes
4answers
48k views

A list of available DBus services

Is there such a thing as list of available DBus services? I've stumbled upon a few (like those provided by NetworkManager, Rhythmbox, Skype, HAL). I wonder if I can find a rather complete list of ...
33
votes
1answer
12k views

X, Xorg and D-Bus: what is the difference?

In the process of learning to do certain things in GUI programming (e.g., reserving space on the screen for an application), I have to learn more about the Window Manager, usually X11 on Linux (I'm ...
31
votes
2answers
12k views

It is OK to change /etc/machine-id?

I cloned a disk (SSD) and put the cloned disk into another machine. Now both systems have the same value in /etc/machine-id. Is it any problem to simply edit /etc/machine-id to change the value? Can I ...
20
votes
5answers
64k views

dbus: [system] Failed to activate service 'org.freedesktop.login1': timed out

I keep getting the following error messages in the syslog of one of my servers: # tail /var/log/syslog Oct 29 13:48:40 myserver dbus[19617]: [system] Failed to activate service 'org.freedesktop....
20
votes
3answers
2k views

Documentation: Architecture of Linux Session

I'm looking for a good overview documentation describing the the stack of daemons and services involved in a modern Linux session. Although having read various documentation about dbus, and systemd, ...
19
votes
1answer
5k views

Reuse D-Bus sessions across login sessions

I access a machine through multiple login sessions. The sessions' lifetimes may or may not overlap. In my case, these login sessions are currently always over SSH, but I would prefer to handle local ...
17
votes
5answers
8k views

Run a dbus program in crontab , how to know about the SESSION id?

I need to run some program within crontab , but how can the program know about dbus session id ? it's only available for programs launched by session managers.
16
votes
1answer
2k views

Why do I need dbus?

I recently removed dbus from my system (along with consolekit and polkit). I didn't notice any change (I was running it as system daemon and per-user from .xinitrc). However, many people claim that ...
15
votes
4answers
13k views

How to list all object paths under a dbus service?

This is a follow-up question to A list of available DBus services. The following python code will list all available DBus services. import dbus for service in dbus.SystemBus().list_names(): ...
13
votes
1answer
7k views

D-Bus authentication and authorization

I'm trying to set up remote access to D-Bus, and I don't understand how authentication and authorization are (not) working. I have a D-Bus server listening on an abstract socket. $ echo $...
10
votes
2answers
10k views

Gnome programs (eog/gnome-terminal) have a slow start and produce a DBus.Error.NoReply Warning

For some time, eog and gnome-terminal are starting very slowly on my (X)Ubuntu 13.10. I think other Gnome tools are affected too, but I don't use any others. Now I get a org.freedesktop.DBus.Error....
10
votes
1answer
8k views

Cannot enable user service. “Failed to get D-Bus connection: Connection refused” Support

I get this error when running any systemd command as a user: admin@Xroklaus:~ $ systemctl --user list-units Failed to get D-Bus connection: Connection refused Without the user parameter, the command ...
9
votes
1answer
3k views

CLI interace to KDE's notifier

I think KDE's notifier is pretty sweet. I was thinking... how useful might it be if my system logs were also sent there, so they would pop so I could see them. I think the first step of this is to ...
9
votes
1answer
8k views

User systemd PulseAudio service

Not much else to this question: I would like to know what I need to create a PulseAudio systemd service to be run with systemd --user. I've tried a few different things, including various user ...
9
votes
1answer
2k views

How do I prevent ssh remote login from breaking dbus?

I'm running openSUSE 11.3 on my workstation at work under KDE, I don't have root access to it. The default shell has been set to tcsh. When I am logged in at my workstation and log in remotely from my ...
8
votes
6answers
21k views

Why can't I run Gnome apps over remote SSH session?

Logging into a remote host using ssh -X me@host, I successfully run gnome-terminal -e "tail -F /var/log/file" &. When I log off and then try the same thing the next day, I get this: Failed to ...
8
votes
1answer
15k views

dbus-launch terminated abnormally with the following error: No protocol specified

After a recent upgrade in my Arch Linux x64 system, I keep getting this warning message after installing or removing packages with pacman. (gconftool-2:5207): GConf-WARNING **: Client failed to ...
8
votes
1answer
4k views

Determine DBUS_SESSION_BUS_ADDRESS from outside the X session

I've got mate-screensaver installed on a machine running Linux Mint 16. On that machine, I can open up a terminal and query the state of the screensaver: dan@box1 ~ $ echo $DISPLAY :0.0 dan@box1 ~ $ ...
8
votes
3answers
9k views

Trouble with dbus and systemd/user

I have systemd set up so that using systemctl start user@me will start my user services as I expect, but my dbus one just won't go (which I need for PulseAudio). Is there some way I can check dbus or ...
8
votes
0answers
677 views

gnome-keyring usage without an x session

My use case is that I have a headless server that software development is performed on. I ussually enable X11 forwarding for the SSH connections to it, but I can't for distant locations with slow ...
7
votes
2answers
2k views

Find out the owner of a DBus service name

I can't find a way to find what program implements the org.freedesktop.Notifications service. Is it possible to ask DBus to tell me what program provides it? The reason for asking this question is ...
7
votes
3answers
2k views

Is it possible to raise a window using a keyboard shortcut in Gnome3?

I have recently shifted from KDE4 to Gnome3. In KDE you can create application specific keyboard shortcuts to raise windows. I typically create one each for firefox, thunderbird, my terminal etc. That ...
7
votes
1answer
2k views

How do I tell systemd-logind that the session is not idle, without using a desktop environment or session manager?

I want to use logind for power management. After 30 minutes of inactivity, I would like the computer to suspend. Problem is, right now, it suspends after 30 minutes, even when I am active with mouse ...
6
votes
2answers
4k views

How to allow non-root systemd service to use dbus for BLE operation

I’ve been prototyping a BLE peripheral running as root on a small raspberry like board. Now I’m hardening things and partitioning the BLE app to a non-root user. So I've changed my systemd service ...
6
votes
2answers
833 views

How to decrypt LUKS-encrypted device on per user basis upon login?

I've created the following luks@.service service for systemd: [Unit] Description=Cryptography Setup for '%I' After=cryptsetup-pre.target After=dev-mapper-%i.device Before=cryptsetup.target Before=...
6
votes
1answer
6k views

How dbus calculates machine id?

How DBus calculates machine id? (/etc/machine-id, /var/lib/dbus/machine-id). Which way is more correct to determine it?
6
votes
1answer
2k views

Detect if screensaver is active

I want to detect whether the screensaver is active. On Ubuntu 14.04 and Fedora 21, I tried the following command: $ dbus-send --print-reply=literal --dest=org.freedesktop.ScreenSaver /org/...
6
votes
3answers
478 views

Power management hook for running *X11* scripts on wake

Earlier I asked a similar question, but that one was about running system-level scripts. I have a script that runs a series of xinput commands in order to enable two-finger scrolling on my touchpad. ...
5
votes
1answer
2k views

Access to user's session D-bus from their cron commands

What is needed to give cron commands access to the session bus (if it is running)? It used to work for me, on Debian Stretch (testing) since switching systemd until relatively recently (might have ...
5
votes
1answer
7k views

Understanding /var/log/messages entries

192.168.25.1 = router 192.168.10.1 = gateway/modem 192.168.25.144 = this pc (which is 'linuxpc' running fedora 17) What happened during these log entry events below? Specifically what do the last ...
5
votes
2answers
2k views

Run `dbus-send` in a remote system

I'm trying to run dbus-send in a remote system but somehow I'm not able to run it. But the same dbus-send, if I run it in the local system, is working fine. COMMAND: ssh remote@xx.xx.xx.xxx "dbus-...
5
votes
1answer
780 views

Will kdbus replace D-Bus?

According to this LWN article kdbus is supposed to replace D-Bus. Can this be confirmed somehow? I wonder if after all this will be an easy task as I would imagine that both have a distinct API? To ...
5
votes
1answer
2k views

How to find out which dbus “services” are safe to remove?

A look into /usr/share/dbus-1/services showed me an shockingly/impressively long list of "services". 1) What are those? Are they in general essential or bloat? 2) How to find out which are indeed ...
5
votes
1answer
2k views

Mount CIFS shares as non-root on RHEL7 w/o desktop

We have a Windows (AD) domain which a RHEL/CentOS 7 server has joined (SSSD / realmd). The users log into the server via SSH with their AD credentials. Now the users should be able to mount some of ...
5
votes
1answer
2k views

Why doesn't wicd install its daemon?

Yet again, I've found myself banging my head against the wall after having issues with wicd (the most consistenly buggy piece of widely-used software I've ever used). This time, after installing ...
5
votes
1answer
895 views

Unable to access systemd --user due to DBus access permissions

I'm trying to setup a service account using systemd units to manage the actual service + supporting code. However, it looks like the systemd user daemon isn't working properly. $ systemctl --user ...
5
votes
0answers
360 views

Running script before suspending while using dbus

I have a file: /etc/pm/sleep.d/85rmNvidiaModule. In it I have: #!/bin/bash case $1 in suspend) echo "Oh, this time we are doing a suspend to RAM. Cool!" sudo modprobe -r nvidia-...
4
votes
4answers
459 views

Where might the dbus development (.h) files be for RHEL5?

A quick search from yum for dbus fails to turn up the devel related package that should provide dbus.h et al. Anybody have experience locating the relevant package? Should I just resort to getting ...
4
votes
1answer
2k views

Universal way to logout from terminal via dbus

I'm new with dbus, and saw different ways to log out from terminal depending on desktop env. But I'm curious is there any way to log out from any desktop env using dbus messages? On GNOME: dbus-send ...
4
votes
1answer
172 views

How do I run a systemd oneshot service whenever my system gets a new IPv6 address?

I would like to run a systemd oneshot service whenever my system gets a new IPv6 address assigned to it from the network router (this would be on boot, and periodically throughout its uptime). ...
4
votes
2answers
3k views

How to create a daemon which would be listening to dbus and fire script on message

I want to create a daemon, which would fire up a shell script in the background every time I unlock the screen on my ubuntu. I managed to create such script according to answer to related question: ...
4
votes
3answers
4k views

How do I shut down a system through a ConsoleKit DBus message as user?

I found the following command line to shut down a Debian/GNU Linux system dbus-send \ --system \ --dest=org.freedesktop.ConsoleKit \ --type=method_call \ --print-reply \ --reply-timeout=...
4
votes
2answers
1k views

Get environment variables of running session

Yes, I know that this question is a bit confusing, I just mean "the variables which are acessible from session's command line". I am writing an application which runs automatically by upstart on ...
4
votes
1answer
649 views

How to modify a dbus service's “Exec” line without losing the changes in case of upgrade

I'm facing a ugly problem with my system. my login manager (LightDM) is starting gnome-keyring-daemon at login successfully and unlocking my keyring as it should (EDIT: Everything via PAM). The thing ...
4
votes
1answer
1k views

How to change GSettings without X11 running?

I have an installation script that customises the target machine by running about two-dozen gsettings set commands. Trouble is, that only works if you run the command as the right user. If you run it ...
4
votes
2answers
737 views

Connect with D-Bus in a network namespace

I am using network namespaces such that I can capture network traffic of a single process. The namespace is connected through the "host" via a veth pair and has network connectivity through NAT. So ...
4
votes
2answers
1k views

How can I run a KDE plasma script from command line without GUI?

I want to run a plasma JavaScript file from command line, but the only solution I found so far involves a graphical script editor and requires a user interaction to run the script: qdbus org.kde....
4
votes
1answer
1k views

How to talk to geoclue through its dbus interface?

I'm trying to better understand what geoclue does, and how to gain information from it. From my understanding, it can be accessed through it's dbus interface to find geographic information about the ...
4
votes
1answer
7k views

How to start dbus with a fixed address?

The issue concerns the same thing which is described here and here, but I don't see a clear solution there. I mean I have the same error: Failed to connect to socket /tmp/dbus-CwQMg2RxWx: Connection ...
4
votes
1answer
919 views

KTorrent: Moving data in a shell script

I'm trying to make a script for my magic folder that will move files to a seeding directory without KTorrent losing track of where the data is, similar to the "Move Data" context menu action in the ...