2

Not using display manager and executing startup logic via xinitrc. Problem is some dbus-related env variables are not set.

xinitrc excerpt:

dbus-update-activation-environment --systemd --all # note this errors /usr/lib/policykit-1-gnome/polkit-gnome-authentication-agent-1 & eval $(/usr/bin/gnome-keyring-daemon --start --components=gpg,pkcs11,secrets,ssh) export GNOME_KEYRING_CONTROL GNOME_KEYRING_PID GPG_AGENT_INFO SSH_AUTH_SOCK DBUS_SESSION_BUS_ADDRESS DBUS_SESSION_BUS_PID 

First one returns error

dbus-update-activation-environment: warning: error sending to systemd: org.freedesktop.DBus.Error.InvalidArgs: Invalid environment assignments

How to make sure dbus vars (eg DBUS_SESSION_BUS_ADDRESS) are set?

Note alternatively I could comment out these lines from /usr/bin/startx:

unset DBUS_SESSION_BUS_ADDRESS unset SESSION_MANAGER 

but not sure that's the way to go.

Running debian testing.

1
  • I usually run xinit directly on fedora without problems, so you are probably right that you need to stop startx from removing the dbus variable from the environment. Commented Apr 25, 2018 at 19:23

1 Answer 1

6

I use startx just fine (Debian unstable + experimental). If you look at where the dbus environment variables are set (again), it's in /etc/X11/Xsession.d/20dbus_xdg-runtime. I use my own .xinitrc, and I realized a bunch of problems I had stemmed from not sourcing the scripts in /etc/X11/Xsession.d (as the default xinitrc does). Instead of trying to run dbus-update-activation-environment yourself, I would strongly recommend you source the files in /etc/X11/Xsession.d instead (they add a bunch of other things like modifying your xhost settings).

1
  • Sourcing the system-wide .d dir is important since it contains a lot of useful defaults. Commented Oct 23, 2021 at 7:26

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.