Finally I solved problem myself.
I will leave instructions what I did.
The problem consists of two parts:
- Dbus cannot be accessed from within windows manager
- Notification daemon cannot get messages from dbus
1st problem solution:
Real problem was, that my windows manager was run from lxdm, which for some reason does not merges config files from /etc/X11/xinit/xinitrc.d
except for lxde session (in LXDE dbus works, in awesome wm doesn't). In this folder exists file named 30-dbus
with following content:
#!/bin/bash
# launches a session dbus instance
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ] && type dbus-launch >/dev/null; then
eval $(dbus-launch --sh-syntax --exit-with-session)
fi
This part of the code defines $DBUS_SESSION_BUS_ADDRESS
variable which defines a dbus port to use for various applications. echo $DBUS_SESSION_BUS_ADDRESS
can be used as simple sanity check to see if dbus session exists (it should return dbus session file).
Config files from this folder can be merged with simple shell script on session start(code taken from .xinitrc
):
#!/bin/bash
if [ -d /etc/X11/xinit/xinitrc.d ]; then
for f in /etc/X11/xinit/xinitrc.d/*; do
[ -x "$f" ] && . "$f"
done
unset f
fi
2nd problem solution:
While dbus running and is available to other programs it still needs more access for notifications to work properly, so I needed to run polkit agent, because Awesome WM does not have one. I had chosen lxpolkit
, because I already had almost full lxde environment. In my case, just added to my ~/.config/awesome/rc.lua
file:
awful.util.spawn_with_shell("dex /etc/xdg/autostart/lxpolkit.desktop")
, for some reason without this line it refused to start by default with lxdm.
I think gnome polkit agent should work fine too.
As far as I can tell, you are right in attributing the system tray icon to notification-daemon
. If you are not happy with the icon, try another notification daemon. Notifications work on the basis of client/server. Any notification client can communicate with any compatible server.
I myself am using dunst
and I am very happy with that. It does not have any system tray notification.
There are several notification daemons, notification-daemon
being only one of them. In Debian, you can list them with following command:
$ apt-cache search notification | grep daemon | grep notification
dunst - minimalistic notification daemon
inosync - notification-based directory synchronization daemon
notification-daemon - daemon for displaying passive pop-up notifications
notify-osd - daemon that displays passive pop-up notifications
xfce4-notifyd - simple, visually-appealing notification daemon for Xfce
I can recommend dunst
. It is a minimalistic, yet highly configurable
notification daemon.
Best Answer
The scripts in
/etc/init.d
control system-wide startup scripts, while you want to start a service for your individual login session. There are ways to do this for all login sessions for all users, but they depend on how your system is set up. Likewise, there are ways to do this for your individual login session, but it depends on what type of session you are using. (E.g., GNOME, XFCE, KDE, fvwm, whatever.)What you probably want to do is configure your session manager, desktop environment, or window manager to start
/usr/lib/notify-osd/notify-osd
at startup. For example, I use fvwm via xsession, so I have in my~/.xsession
the following: