fangfufu / Linux-Fake-Background-Webcam

Faking your webcam background under GNU/Linux, now supports background blurring, animated background, colour map effect, hologram effect and on-demand processing.
GNU General Public License v3.0
1.6k stars 161 forks source link

Add an example for user systemd service #182

Closed martbab closed 2 years ago

martbab commented 2 years ago

Hello,

I was configuring your software on my system and was missing some guide on how-to run it as a systemd service. I figured it out eventually and would like to share the resulting setup. When properly configured, fake.py will be automatically runafter user login by Systemd.

systemctl --user status fakecam.service
● fakecam.service - Fake camera
     Loaded: loaded (/home/martbab/.config/systemd/user/fakecam.service; enabled; preset: enabled)
     Active: active (running) since Tue 2022-08-23 13:04:00 CEST; 1h 49min ago
   Main PID: 74667 (python3)
      Tasks: 31 (limit: 18908)
     Memory: 17.2M
        CPU: 3min 932ms
     CGroup: /user.slice/user-1000.slice/user@1000.service/app.slice/fakecam.service
             └─74667 python3 fake.py -c /home/martbab/.config/fakecam/config.ini

Aug 23 13:04:00 neurothrope systemd[894]: Started Fake camera.
Aug 23 13:04:00 neurothrope python3[74667]: INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
fangfufu commented 2 years ago

Cool, I like this. Thanks for contributing. :)