Page 1 of 1
Run three commands at startup
Posted: Sat Jan 18, 2014 8:19 pm
by tiny_man
Hi
I need to rune these commands at startup in following orders
Code: Select all
uv4l --driver raspicam --auto-video_nr --framerate 15
sudo chrt -a -r -p 99 `pgrep uv4l`
cvlc v4l2:///dev/video0 --v4l2-width 1024 --v4l2-height 576-v4l2-chroma h264 --sout '#rtp{sdp=rtsp://:8554/}'
How do I do it?
Re: Run three commands at startup
Posted: Sat Jan 18, 2014 8:46 pm
by redhawk
Put the commands in /etc/rc.local they should run just before the login screen.
Richard S.
Re: Run three commands at startup
Posted: Mon Jan 20, 2014 4:21 pm
by tiny_man
I tried but it says it cant run vlc from sudo mode!
but the first line is OK.
more ideas?
Re: Run three commands at startup
Posted: Mon Jan 20, 2014 5:47 pm
by redhawk
A quick look at the VideoLAN forum would suggest that VLC doesn't like running under root - lol.
You could probably get around this by running it under the pi account i.e.
su pi -c "cvlc v4l2:///dev/video0 --v4l2-width 1024 --v4l2-height 576-v4l2-chroma h264 --sout '#rtp{sdp=rtsp://:8554/}' "
Richard S.
Re: Run three commands at startup
Posted: Mon Jan 20, 2014 6:11 pm
by Joe Schmoe
Or you could do it the sensible way as I detail in posts in the many similar threads on this subject.
Search this forum for posts by me - you'll find it.
Note: The basic underlying take-home on this is that the /etc/init* and /etc/rc.local stuff was never intended for running "user" tasks - that is, things that users dream up and implement. It was designed for system configuration tasks.