dbus-run-session command not found

In this troubleshooting guide we learn how to fix dbus-run-session command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

dbus-run-session: command not found

or when using sudo you get the following error message

sudo: dbus-run-session: command not found

Solutions to dbus-run-session: command not found

How To Fix dbus-run-session: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu dbus-run-session is provided by dbus package.

dbus is:

D-Bus is a message bus, used for sending messages between applications. Conceptually, it fits somewhere in between raw sockets and CORBA in terms of complexity.

D-Bus supports broadcast messages, asynchronous messages (thus decreasing latency), authentication, and more. It is designed to be low-overhead; messages are sent using a binary protocol, not using XML. D-Bus also supports a method call mapping for its messages, but it is not required; this makes using the system quite simple.

It comes with several bindings, including GLib, Python, Qt and Java.

This package contains the D-Bus daemon and related utilities.

The client-side library can be found in the libdbus-1-3 package, as it is no longer contained in this package.

To fix this problem, we can install more using the command below.

sudo apt-get -y install dbus

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install dbus.

sudo apt -y install dbus

Or if you have aptitude installed you can use the following command.

sudo aptitude install dbus

Summary

In this tutorial we learn how to fix dbus-run-session command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.