On 03/03/2019 14:46, Dave Hill wrote: > on power up, and I thought that I would use 'systemd'.
This is really a Linux question not Python so you might like to try the Mint forums too. They are usually pretty responsive. > [Service] > Type=idle > > User=pi > ExecStart=/bin/bash /home/pi/Code/testVideo.sh > > Restart=no > RestartSec=0 > where 'testVideo.sh' > > ## Dave Hill, 28/02/2019 > > # 2 = HDMI, 1 = headphones, 0 = Auto > amixer cset numid=3 1 > > python3 /home/pi/Code/TestVideo#6.py CLIP0026.MP4 20 DEBUG To be honest I'm surprised that works. I'd expected bash to interpret the # as a comment delimiter! But I tried it and it seems ok, you live and learn... > Is there a way in which I can have automatic restart but also have a way > of exiting? That's the Linux bit... :-) -- Alan G Author of the Learn to Program web site http://www.alan-g.me.uk/ http://www.amazon.com/author/alan_gauld Follow my photo-blog on Flickr at: http://www.flickr.com/photos/alangauldphotos _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor