Comment 42 for bug 1280300

Revision history for this message
Александр (alex2659) wrote (last edit ):

To make the picture automatically close when you wake up from sleep, you can use a this procedure to close the application.
1.Create .sh file with:
#!/bin/bash
pkill viewnior

2.Create .service file in /etc/systemd/system with followiing:
[Unit]
Description=Run my script after resume

[Service]
User=<user>
Type=oneshot
Environment=DISPLAY=:0
ExecStart=/path/to/my/script.sh

[Install]
WantedBy=sleep.target

change <user> to your user

3.Run commands from terminal

systemctl daemon-reload

systemctl enable nameofscript.service

enjoy