Last active
December 18, 2022 14:25
-
-
Save Red-Eyed/0fdaae7876254dccf4396f33aa1a8875 to your computer and use it in GitHub Desktop.
kill vlc after suspend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Kills VLC on resume in order to fix logging spam | |
[Service] | |
Type=oneshot | |
ExecStart=-/usr/bin/killall vlc | |
TimeoutSec=0 | |
StandardOutput=syslog | |
After=suspend.target | |
[Install] | |
WantedBy=multi-user.target sleep.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo cp kill_vlc_on_resume.service /etc/systemd/system/ | |
sudo systemctl enable kill_vlc_on_resume.service --now |
Thanks a lot!
This question came original up here: https://unix.stackexchange.com/a/627519/20661
Wouldn't it be more wise to just empty
/var/log/syslog
on resume instead of killing VLC?
I created another gist: https://gist.github.com/rubo77/2fe1fef2ff7f5bdd60a88a835f0c5573#file-1-truncate_syslog_after_resume-service
No, it wouldn't, because we don't want to miss all the logs because of buggy VLC
@rubo77 on linux systems, wget
's -o
option means logfile location
. For output path
, its uppercase -O
:)
@leberknecht thanks, I corrected my comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This question came original up here: https://unix.stackexchange.com/a/627519/20661
Wouldn't it be more wise to just empty
/var/log/syslog
on resume instead of killing VLC?I created another gist: https://gist.github.com/rubo77/2fe1fef2ff7f5bdd60a88a835f0c5573#file-1-truncate_syslog_after_resume-service