If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
root@DietPi:~# systemctl status mplayer_script.sh -l
● mplayer_script.sh.service
Loaded: not-found (Reason: No such file or directory)
Active: inactive (dead)
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
● myscript.service - myscript
Loaded: loaded (/etc/systemd/system/myscript.service; enabled)
Active: active (exited) since Thu 2016-11-03 05:02:49 GMT; 10min ago
Process: 1186 ExecStart=/bin/bash -c /root/mplayer_script.sh (code=exited, status=0/SUCCESS)
Main PID: 1186 (code=exited, status=0/SUCCESS)
CGroup: /system.slice/myscript.service
Nov 03 05:02:47 DietPi systemd[1]: Starting myscript...
Nov 03 05:02:49 DietPi bash[1186]: Cannot find HOME directory.
Nov 03 05:02:49 DietPi bash[1186]: MPlayer2 2.0-728-g2c378c7-4 (C) 2000-2012 MPlayer Team
Nov 03 05:02:49 DietPi bash[1186]: Terminal type `unknown' is not defined.
Nov 03 05:02:49 DietPi bash[1186]: Playing big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4.
Nov 03 05:02:49 DietPi bash[1186]: Cannot open file 'big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4': No such file or directory
Nov 03 05:02:49 DietPi bash[1186]: Failed to open big_buck_bunny_1080p_H264_AAC_25fps_7200K.MP4.
Nov 03 05:02:49 DietPi bash[1186]: Dead key input on file descriptor 0
Nov 03 05:02:49 DietPi bash[1186]: Exiting... (End of file)
Nov 03 05:02:49 DietPi systemd[1]: Started myscript.
So it does run the script, but when its run it can't see root directory or any contents. Is it because myscript.service is being run outside of root access?
Sipador wrote:
Nov 03 05:02:49 DietPi bash[1186]: Cannot find HOME directory.
So it does run the script, but when its run it can't see root directory or any contents. Is it because myscript.service is being run outside of root access?
Can you paste the contents of your script? I'll take a look.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.
Sorry for the late reply, went through exams and my image was corrupted so I went back and remade it.
Some of the names have changed but much the same as before.
On the plus side when I rebooted the audio was playing but the video didn't show, so that's positive step forward .
Mplayer should work on fbdev, so not sure why there is no video. Does the video work when you run from the cmdline? Might also be SystemD, try adding StandardOutput=tty under the [Service] section of the service.
Failing that, lets try X11, change your script so that xinit is called, before mplayer, eg:
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal or become a DietPi patron.