PDA

View Full Version : 18.04 dbus-launch / dbus-daemon has wrong listen address.. fails to create listening



gary-idistech
August 19th, 2018, 10:18 AM
Hi, I apologise if this has been answered elsewhere , but I cant seem to see anyone else with the issue at the moment..

i) We have a script that configures a user's desktop environment via gsettings, even if they are logged out.. This has been running for a number of years, and successfully on 16.04 but has now experienced problems with 18.04

ii) Process is straight forward, if the gnome-session is running , we get the DBUS_SESSION_BUS_ADDRESS from the gnome-session environment
# DBUS=$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$PID/environ | cut -d= -f2-)
This works fine..
on 16.04, DBUS_SESSION_BUS_ADDRESS = unix:abstract=/tmp/dbusxxxxxxxxxxxx
on 18.04 DBUS_SESSION_BUS_ADDRESS = unix:path=/run/user/<UID>/bus
The script whcih sets DBUS_SESSION_BUS_ADDRESS for the user, then works ( 16.04 or 18.04 ), and we can run/set gsettings to configure.

iii) If the user hasnt got a session running, we launch a dbus-daemon via the dbus-launch , which then enables us to set the user settings in the same way
( again has worked successfully on 16.04 ).
on 16.04, DBUS_SESSION_BUS_ADDRESS = unix:abstract=/tmp/dbusxxxxxxxxxxxx, and the file is created in /tmp , and we can communicate with it

On 18.04 : DBUS_SESSION_BUS_ADDRESS also returns DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-UMdaWlxqow
Which of course wouldnt be a problem BUT IT HASNT CREATED the file ( IN /tmp.. ).. it hasnt created the file in the /run/user/<uid>/bus location either

Ive checked apparmor, but cant see any issues with that config ( doesnt look like its in enforce mode, and no complaints ).

For DBUS start there is a conf file that seems to get used with 18.04 when started by gnome/start launch...
/usr/bin/dbus-daemon --config-file=/usr/share/defaults/at-spi2/accessibility.conf --nofork --print-address 3
But if you look at this file, or those in /etc/dbus-1 or in /usr/share/dbus-1 , the confi that sets /run/user/<uid>bus cant be found...

is this a new 'feature' a bug or me just missing something..

Any insight greatly appreciated...