Skip to content

Instantly share code, notes, and snippets.

@Red-Eyed
Last active December 18, 2022 14:25
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save Red-Eyed/0fdaae7876254dccf4396f33aa1a8875 to your computer and use it in GitHub Desktop.
Save Red-Eyed/0fdaae7876254dccf4396f33aa1a8875 to your computer and use it in GitHub Desktop.
kill vlc after suspend
[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
sudo cp kill_vlc_on_resume.service /etc/systemd/system/
sudo systemctl enable kill_vlc_on_resume.service --now
@rubo77
Copy link

rubo77 commented Feb 8, 2021

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

@BoboTiG
Copy link

BoboTiG commented Aug 23, 2021

Thanks a lot!

@Red-Eyed
Copy link
Author

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

@leberknecht
Copy link

@rubo77 on linux systems, wget's -o option means logfile location. For output path, its uppercase -O :)

@rubo77
Copy link

rubo77 commented Mar 30, 2022

@leberknecht thanks, I corrected my comment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment