You are not logged in.

#1 2014-04-30 18:25:48

Tellendil
Member
Registered: 2014-03-06
Posts: 2

Notification Daemon access in Systemd [XFCE4]

Hi,

I have a script run by systemd, using notify-send to notify me of completion.

The script works if launched from the command line, but if it runs from systemd, it will work but won't notify myself, unless I had before runned this on a tty :

export DISPLAY=:0
export XAUTHORITY=/home/me/.Xauthority
notify-send anything

If this ran before, the script will notify without any problem. Else, it won't.

I can't understand what is wrong here. Any advice ?

Here is the script service file :

[Unit]
Description=Check for packages updates
Requires=NetworkManager-wait-online.service
After=NetworkManager-wait-online.service

[Service]
Nice=19
IOSchedulingClass=2
IOSchedulingPriority=7
User=me
Environment="XAUTHORITY=/home/me/.Xauthority" "DISPLAY=:0"
ExecStart=/usr/bin/aarchup --aur --icon /usr/share/aarchup/archlogo.svg

thanks a lot !

Last edited by Tellendil (2014-05-01 08:23:10)

Offline

Board footer

Powered by FluxBB