immichFrame / ImmichFrame

GNU General Public License v3.0
317 stars 18 forks source link

systemd service file example. #144

Open LelandSindt opened 4 days ago

LelandSindt commented 4 days ago

Description

Are interested in a PR including the systemd service file I am using to run ImmichFrame?

Use Case

managing frame service via systemd

Details

pi@pictureframe:~ $ cat /etc/systemd/system/immich.service
[Unit]
Description=Immich Frame
After=multi-user.target

[Service]
Environment="DISPLAY=:0.0"
User=pi
Restart=always
ExecStartPre=/usr/bin/sleep 60
ExecStart=/home/pi/Immich_Frame/Immich_Frame

[Install]
WantedBy=multi-user.target

Pre-Submission Checklist

3rob3 commented 3 days ago

Is this another option for running the app at startup? Do you think it should go in the Readme or somewhere else?

LelandSindt commented 3 days ago

It is another way to automatically start/stop/restart the app on Linux systems, yes.

I would suggest a version of the file be committed to source and the readme updated to reference the file.

The ?only? thing I am not thrilled about was the ExecStartPre=/usr/bin/sleep 60 pause... I found that starting without it Immich_Frame would come up before the window manager was fully loaded and it would not go to full screen.

Any thoughts on how I could force the app to full screen?

3rob3 commented 1 day ago

It is another way to automatically start/stop/restart the app on Linux systems, yes.

I would suggest a version of the file be committed to source and the readme updated to reference the file.

The ?only? think I am not thrilled about was the ExecStartPre=/usr/bin/sleep 60 pause... I found that starting without it Immich_Frame would come up before the window manager was fully loaded and it would not go to full screen.

Any thoughts on how I could force the app to full screen?

No, not really (we already force fullscreen on startup). I'm surprised the app starts at all if the window manager is not fully loaded. 60 seconds seems long, what happens with 30?

LelandSindt commented 1 day ago

I might play with the sleep time.. but....

I am having trouble keeping ImmichFrame running. I am using a Raspberry Pi Zero 2 W and it freezes regularly. I think I got it to run a while longer buy increasing swap from the default 200MB to 1GB..

Unfortunately, I don't see anything in the logs after a reboot.

3rob3 commented 1 day ago

Dig thru some of the closed issues. This has been discussed. I don’t remember specifics but it is a memory issue, and I thought the fix was increasing swap and using a very short imagetransitionduration.