Quick DBUS Fix

Recently I again started to have some DBUS issues. Like GIMP opening a new instance everytime instead of just opening next file as a tab. After some investigation it seems that because DBUS got broken – example output from terminal for Caja file manager from Mate.

W520 % caja 

(caja:82154): dconf-WARNING **: 12:56:27.600: failed to commit changes to dconf:
Cannot spawn a message bus without a machine-id:
Unable to load /var/local/lib/dbus/machine-id or /etc/machine-id:
Failed to open file β€œ/var/local/lib/dbus/machine-id”: No such file or directory

(caja:82154): dconf-WARNING **: 12:56:27.600: failed to commit changes to dconf:
Cannot spawn a message bus without a machine-id:
Unable to load /var/local/lib/dbus/machine-id or /etc/machine-id:
Failed to open file β€œ/var/local/lib/dbus/machine-id”: No such file or directory

(caja:82154): dconf-WARNING **: 12:56:27.741: failed to commit changes to dconf:
Cannot spawn a message bus without a machine-id:
Unable to load /var/local/lib/dbus/machine-id or /etc/machine-id:
Failed to open file β€œ/var/local/lib/dbus/machine-id”: No such file or directory

(caja:82154): dconf-WARNING **: 12:56:27.741: failed to commit changes to dconf:
Cannot spawn a message bus without a machine-id:
Unable to load /var/local/lib/dbus/machine-id or /etc/machine-id:
Failed to open file β€œ/var/local/lib/dbus/machine-id”: No such file or directory

So I went to check if DBUS is actually running … or that machine-id is present.

w520 % service dbus status
dbus is running as pid 65388.

w520 % ls -l /var/lib/dbus/machine-id
-rw-r--r-- 1 root wheel 33 2023-08-09 11:43 /var/lib/dbus/machine-id

w520 % cat /var/lib/dbus/machine-id
283c584cbd447903eef501ca64d35fb9


Yep. Everything is in there. So I went back to caja(1) output … spot the difference below.

/var/lib/dbus/machine-id
/var/local/lib/dbus/machine-id

[FACEPALM]

For some reason authors of DBUS decided that /var/lib/dbus/machine-id is not good anymore and that from now on – they will use new /var/local/lib/dbus/machine-id place. “This is such a crock of shit.” as Lt. Col. Frank Slade would say.

Lets fix it with some oldschool ln(1) symlink.

w520 % doas mkdir -p /var/local/lib/dbus
w520 % doas ln -s /var/lib/dbus/machine-id /var/local/lib/dbus/machine-id

Lets check it works.

w520 % caja
w520 % 

No errors … and also finally all new images open in the same GIMP instance again.

dbus-fix

How not to love these Linuxisms on the daily FreeBSD desktop …

freebsd-porters-hanbook

EOF

2 thoughts on “Quick DBUS Fix

  1. Pingback: Links 20/08/2023: Ethernet Switch Based on Milk-V (Based on Free Chip Design) | Techrights

  2. Pingback: Valuable News – 2023/08/21 | πšŸπšŽπš›πš–πšŠπšπšŽπš—

Leave a comment