dunst-project / dunst

Lightweight and customizable notification daemon
https://dunst-project.org
Other
4.42k stars 338 forks source link

Notifications not reflecting dunstrc configs #1264

Closed rainer2208 closed 5 months ago

rainer2208 commented 5 months ago

Issue description

I have installed and configured dunst over a year ago and it has always worked like a charm.

Suddenly, maybe two weeks ago, the adjustments i made to the dunstrc file didn't reflect anymore.

For a try i have copied the default dunstrc contents and changed the font size to 20, but the font size doesn't change, neither do the position or any background color, which are all black now, for critical and uncritical notifications.

The dunstrc file is in ./config/dunst .

The output of pkill dunst; dunst is :

CRITICAL: [dbus_cb_name_lost:1175] Cannot acquire 'org.freedesktop.Notifications': Name is acquired by 'notify-osd' with PID '57736'.

Installation info

Minimal dunstrc ```ini # Dunstrc here font = Monospace 20 ` [urgency_low] # IMPORTANT: colors have to be defined in quotation marks. # Otherwise the "#" and following would be interpreted as a comment. background = "#222222" foreground = "#888888" timeout = 10 [urgency_normal] background = "#285577" foreground = "#ffffff" timeout = 10 override_pause_level = 30 [urgency_critical] background = "#900000" foreground = "#ffffff" frame_color = "#ff0000" timeout = 0 override_pause_level = 60 ````
zappolowski commented 5 months ago

CRITICAL: [dbus_cb_name_lost:1175] Cannot acquire 'org.freedesktop.Notifications': Name is acquired by 'notify-osd' with PID '57736'.

That error indicates that some other notification daemon is runnung (notify-osd to be precise), which in turn prevents dunst from running. As dunst is not running pkill dunst does not work. You should try to find, why notify-osd is started.

A hint: if no notification daemon is running, DBus automatically starts one when it receives the first notification. If there a multiple daemons installed, it could happen that it's not the one you like. In this case you should run it explicitly.

rainer2208 commented 5 months ago

Hi, thanks for the reply and the suggestions.

In my understandin, (kindly correct me if i'm wrong), the error

CRITICAL: [dbus_cb_name_lost:1175] Cannot acquire 'org.freedesktop.Notifications': Name is acquired by 'notify-osd' with PID '57736'.

is not responsible for displaying the notification in the wrong color or the wrong font size, or is it?

both

notify-send -u critical "Critical notification!" "this is the body of the notification"

and

dunstify -u critical "hello" "hello"

do send notifications, but the colors for simple and critical notification, and font size are not those defined in dunstrc, and even though the settings worked in the past.

zappolowski commented 5 months ago

Hi, thanks for the reply and the suggestions.

In my understandin, (kindly correct me if i'm wrong), the error

CRITICAL: [dbus_cb_name_lost:1175] Cannot acquire 'org.freedesktop.Notifications': Name is acquired by 'notify-osd' with PID '57736'.

is not responsible for displaying the notification in the wrong color or the wrong font size, or is it?

The error is responsible for your issues as it states that dunst can't start and thus your configuration can't take effect.

both

notify-send -u critical "Critical notification!" "this is the body of the notification"

and

dunstify -u critical "hello" "hello"

do send notifications, but the colors for simple and critical notification, and font size are not those defined in dunstrc, and even though the settings worked in the past.

Both send notification to notify-osd (as this one is occupying org.freedesktop.Notifications) instead of dunst. You could try to use pkill notify-osd; dunst instead and try again. But this will just work until the next login of your user (or until you stop/kill that dunst instance). You should really try to disable notify-osd (or force starting dunst) ... how to do this, depends on your environment.

Maybe try to find out, why notify-osd was installed (grep notify-osd /var/log/pacman.log to find out when it was installed and env LC_ALL=C pacman -Qi notify-osd | grep Requiered why it was installed).

fwsmit commented 5 months ago

Moving this to discussions, as it's not an issue with dunst, but rather the environment. Feel free to discuss further there