diff --git a/clock.desktop b/clock.desktop new file mode 100644 index 0000000..6522734 --- /dev/null +++ b/clock.desktop @@ -0,0 +1,4 @@ +[Desktop Entry] +Type=Application +Name=Clock +Exec=sudo systemctl start video-player2.service \ No newline at end of file diff --git a/install.sh b/install.sh index de2f763..a5ec1fc 100644 --- a/install.sh +++ b/install.sh @@ -29,8 +29,11 @@ sudo cp video-player.service /etc/systemd/system/video-player.service sudo cp video-player2.service /etc/systemd/system/video-player2.service sudo systemctl daemon-reload sudo systemctl enable video-player.service -sudo systemctl enable video-player2.service +sudo systemctl disable video-player2.service sudo systemctl restart video-player.service sudo systemctl restart video-player2.service +mkdir .config/autostart +cp clock.desktop .config/autostart/clock.desktop + popd \ No newline at end of file diff --git a/video-player2.service b/video-player2.service index 5253b34..5f8f6da 100644 --- a/video-player2.service +++ b/video-player2.service @@ -1,6 +1,5 @@ [Unit] Description=Video Player -After=multi-user.target [Service] WorkingDirectory=/home/steady/video-player @@ -8,7 +7,4 @@ ExecStart=ffplay -fs -loop 2147483647 /home/steady/video-player/public/videos/vi Environment=DISPLAY=:0 User=1000 Group=1000 -Restart=always - -[Install] -WantedBy=multi-user.target \ No newline at end of file +Restart=always \ No newline at end of file