[SOLVED] Failed to execute child process “dbus-launch” (No such file or directory) while x-forwarding

After a long time, I have decided to change my desktop environment to XFCE.

While making changes on the tty terminal, I got an error that stated: Failed to execute child process “dbus-launch” (No such file or directory) while x-forwarding.

Because of that, I was not allowed to get the graphic interface, and this error is common when you are accessing the GUI screen using WSL2 with Kex.

In this article, you will see how to fix the above error by installing dbus-x11 on your Debian or Ubuntu-based machine.

A dbus acronym stands for Desktop Bus, which is interprocess communication that is used to pass information from one application to another process on Linux and Unix-based systems.

By passing a single apt command, you can resolve this issue in a swift manner:

$ sudo apt install dbus-x11

After a successful installation of dbus-x11, you can try to invoke the command that caused the previous error, and you will find that the error no longer exists on the machine.

That’s all to resolve on a Debian-based machine: “failed to execute child process “dbus-launch” (No such file or directory) while x-forwarding”.

0 0 votes
Article Rating
Subscribe
Notify of
guest
5 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Abd
Abd
2 years ago

Super! it worked for me

Jake Redfield
Reply to  Abd
2 years ago

Thank you, I appreciate the compliment!

Maaz
Maaz
2 years ago

Command not found

Ryan P.
Ryan P.
1 year ago

Worked well for me! I had to run the command “sudo dpkg –configure -a” to correct my dkpg installation before running the command above, but if you need to do that, the system tells you the exact command to run anyways, so it probably didn’t even need to be mentioned in the guide anyways.