You are not logged in.
There is a python script running as daemon and reacting on commands. One of commands calls gpg which then shows a password propmpt popup dialog window. When the script is started from a terminal, popup window appears OK. But when the script is started by ( user ) systemd - popup doesn't appear. I tried various combinations of StdOut configuration in the systemd ini file - but haven't found the correct one. When I specify "StandardOutput=tty", script start fails with error:
Failed at step STDOUT spawning /usr/bin/python: Permission deniedThe systemd service file is as follows:
[Unit]
Description=My script
[Service]
Type=simple
#StandardOutput=tty
#TTYPath=/dev/console
#TTYReset=yes
#TTYVTDisallocate=yes
#Type=forking
ExecStart=/home/user/myscript.py --start
ExecStop=/home/user/myscript.py --stop
RestartSec=2
TimeoutStartSec=2
TimeoutStopSec=2
[Install]
WantedBy=multi-user.targetWhat configuration should be used for displaying popup windows by service processes?
Last edited by nbd (2015-06-01 21:29:59)
bing different
Offline
If the password prompt dialog window is graphical, you need to pass the DISPLAY environment variable to the 'systemd --user' daemon:
see https://wiki.archlinux.org/index.php/Sy … _variables
or add this line in the '[Service]' section of the service file:
Environment=DISPLAY=:0
Offline
Thanks, berbae, it worked!
bing different
Offline