Set DBUS UUID from Linux random boot ID
Submitted by Grahame Bowland
Assigned to D-Bus Maintainers
Description
Created attachment 29167 patch to provide dbus UUID from /proc on linux
Linux provides a file, /proc/sys/kernel/random/boot_id, which provides a 32 character hex random UUID which remains constant after the machine has booted. I'm running some software using DBUS on machines with NFS mounted filesystems, and want to avoid having to make widespread system changes to allow the UUID to be unique on each machine.
We have an application using D-BUS that runs over remote X back to a thin-terminal display. The user will generally launch it from an Xterm, and it will pick up an autolaunched dbus session daemon.
Unfortunately as the UUIDs on the servers are in common, the autolaunch code picks up the dbus session bus that has been started on a completely different machine (via X atom).
Attached patch uses the Linux provided boot UUID instead of relying on a file. It might need tidying up but hopefully it's useful and can be merged. It falls back to reading the UUID file if it can't use /proc.
Cheers
Patch 29167, "patch to provide dbus UUID from /proc on linux":
dbus-uuid.patch
Version: 1.2.x