This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
On Emacs 27.2 I am trying to get notifications to work on my KDE desktop. Please note that notifications work just fine on my XFCE desktop.
I can reproduce the issue easily:
ELISP> (notifications-notify)
Which produces the following error message:
Error: (dbus-error "No connection to bus" session)
I have tried to run dbus-launch
before starting emacs but I get the same behavior.
I have tried to (setq alert-default-style 'libnotify)
but this also does not do anything.
Any ideas on what the problem is?
EDIT:
I have partially solved the problem, though the problem is not with Emacs so this is no longer the best place for support. Anyways ...
If I run:
$ export DBUS_SESSION_BUS_ADDRESS
$ emacs
Then (notifications-notify)
works as intended!
However I cannot figure out how to export this variable for the entire KDE session. I tried to put export DBUS_SESSION_BUS_ADDRESS
after the exec startplasma-x11
line in my ~/.xinitrc
but that did not work.
EDIT2:
I got it to work by launching kde with startx with the following in my ~/.xinitrc
.
exec dbus-launch --exit-with-session startplasma-x11
Subreddit
Post Details
- Posted
- 2 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/emacs/comme...