- Red Hat Enterprise Linux (RHEL)
- 7 (but < 7.5)
When processes needing
dbus are launched remotely (via
LSF, or a similar tool),
dbus processes keep running even after the main process is closed, blocking the remote session and preventing it from terminating properly.
First, update to
- (RHEL 7) dbus-1.10.24-3.el7
- (RHEL 6) dbus-1.2.24-9.el6
For interactive use, make sure to launch dbus-run-session before the shell. For instance, add this to .bashrc:
if test -z "$DBUS_SESSION_BUS_ADDRESS" ; then exec dbus-run-session -- bash echo "D-Bus per-session daemon address is: $DBUS_SESSION_BUS_ADDRESS" fi
so that the resulting process tree shows the bash shell running under dbus-run-session:
$ ps f PID TTY STAT TIME COMMAND 2075 pts/0 Ss 0:00 dbus-run-session -- bash 2095 pts/0 Sl 0:00 \_ dbus-daemon --nofork --print-address 4 --session 2096 pts/0 S 0:00 \_ bash
- For non-interactive use, use "dbus-run-session -- command" directly, which will solve the issue unless the command forks in the background.
- launch a command like gnome-terminal or gnome-text-editor remotely (via
ssh -Xfor instance)
- the remote session stays stuck instead of exiting
dbus-daemonprocesses are left over in the output of "ps ax"
- Red Hat Enterprise Linux
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.