1.7 KiB
1.7 KiB
Slideshow
The below commands will setup fim
as a slideshow on your display.
Important Notes
fim
will crash if there are no photos for it to use as a slideshow- You will likely want to tweak the
fim
command invocation below. These are great settings as a starting point but you'll probably want to make adjustments for your use case. - This setup uses
incron
to restartfim
when photos are deleted from the pictures folder. Without this piecefim
will crash if a picture is removed from the pictures directory prior tofim
rescaning the pictures directory.
Setup
useradd -m -G video -s /usr/sbin/nologin fim
apt install acl
setfacl -m "u:fim:rX" /tank/pictures
setfacl -dm "u:fim:rX" /tank/pictures
apt install fim imagemagick ttf-dejavu
cat > /home/fim/.fimrc <<EOF
_display_status_fmt="%N %?EXIF_DateTimeOriginal?[%:EXIF_DateTimeOriginal:]?";
_info_fmt_str="";
EOF
cat > /usr/local/bin/fim-slideshow.sh <<EOF
#!/bin/bash
/usr/bin/fim -a --cd-and-readdir --slideshow 300 -d /dev/fb0 -T 1 -u -r --no-history --no-commandline /tank/pictures
EOF
chmod a+x /usr/local/bin/fim-slideshow.sh
cat > /etc/systemd/system/fim.service <<EOF
[Unit]
Description=fim slideshow
After=network.target
[Service]
User=fim
PrivateTmp=true
ExecStart=/usr/local/bin/fim-slideshow.sh
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl stop getty@tty1
systemctl disable getty@tty1
systemctl enable --now fim
apt install incron
cat > /etc/incron.d/feh <<EOF
/tank/pictures IN_DELETE systemctl restart fim
EOF
systemctl enable --now incrond
systemctl restart incrond