Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: no bus socket in /run/user/1000/ directory (Read 655 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

no bus socket in /run/user/1000/ directory

I want to add some cronjobs in my system. For notify-send to work, I need to add the below command in my crontab file:
Code: [Select]
export DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus; [path/to/script]
But there is no bus socket in the /run/user/1000/ directory:
Code: [Select]
$ ls -a /run/user/1000
.  ..  dbus-1  dconf  doc  gnupg  keyring  pulse  pipewire-0  pipewire-0.lock

Code: [Select]
$ pacman -Q | grep dbus
dbus 1.14.6-2
dbus-glib 0.112-2
dbus-python 1.2.18-3
dbus-runit 20220314-1
libdbusmenu-glib 16.04.0-5
libdbusmenu-gtk3 16.04.0-5
xdg-dbus-proxy 0.1.4-1

$ sv status dbus
run: dbus: (pid 846) 1806s; run: log: (pid 844) 1806s


How can I solve this issue?

Re: no bus socket in /run/user/1000/ directory

Reply #1
I think it might throw the sockets in /tmp somewhere. Not sure which one is the correct one though.

Re: no bus socket in /run/user/1000/ directory

Reply #2
Yes it does. But it is not permanent and after every reboot I should change the address manually.

Re: no bus socket in /run/user/1000/ directory

Reply #3
Based on this topic, and with some trial and error I was able to fix the problem. Turns out I don't need the dbus address in the crontab. The only format that works for me is like this:
Code: [Select]
* * * * * export DISPLAY=:0; . $HOME/.Xauthority; notify-send "message"