Jump to content

Running command lines from start-up on Raspberry pi

Go to solution Solved by linuxfan66,

I am using a Raspberry Pi B with the newest version of Raspbian installed. I need to find a way to play a few .mp3 s in sequence from start up. Currently, using omxplayer and just entering into shell: omxplayer /home/pi/Desktop/fourthofjulybySufjanStevens.mp3


What I need to do is, upon start up (using local.rt or whatever else works) To play a bunch of mp3s. As in, when one stops, a new one begins. Preferably randomized each time and on a loop after the last one finishes. I am not very good with shellcode and have almost never used Linux. 

 

 

Sorry for the bad English, thanks

Link to comment
Share on other sites

Link to post
Share on other sites

I am using a Raspberry Pi B with the newest version of Raspbian installed. I need to find a way to play a few .mp3 s in sequence from start up. Currently, using omxplayer and just entering into shell: omxplayer /home/pi/Desktop/fourthofjulybySufjanStevens.mp3

What I need to do is, upon start up (using local.rt or whatever else works) To play a bunch of mp3s. As in, when one stops, a new one begins. Preferably randomized each time and on a loop after the last one finishes. I am not very good with shellcode and have almost never used Linux. 

 

 

Sorry for the bad English, thanks

im going to be honest...learn shellcode first. seriously bash code isnt that bad to learn quickly. code you cant understand turns into a major headache quickly.

Everything you need to know about AMD cpus in one simple post.  Christian Member 

Wii u, ps3(2 usb fat),ps4

Iphone 6 64gb and surface RT

Hp DL380 G5 with one E5345 and bunch of hot swappable hdds in raid 5 from when i got it. intend to run xen server on it

Apple Power Macintosh G5 2.0 DP (PCI-X) with notebook hdd i had lying around 4GB of ram

TOSHIBA Satellite P850 with Core i7-3610QM,8gb of ram,default 750hdd has dual screens via a external display as main and laptop display as second running windows 10

MacBookPro11,3:I7-4870HQ, 512gb ssd,16gb of memory

Link to comment
Share on other sites

Link to post
Share on other sites

im going to be honest...learn shellcode first. seriously bash code isnt that bad to learn quickly. code you cant understand turns into a major headache quickly.

I know, I really should, but I'm learning python atm. I totally should've started with shellcode. But, can you please help me.

Link to comment
Share on other sites

Link to post
Share on other sites

I know, I really should, but I'm learning python atm. I totally should've started with shellcode. But, can you please help me.

well for that to work. you need to supply whoever can make such code a location with the files. media player you were planning to use. the context its being used for would be helpful. i will say mplayer set to go random in a folder should also work. ill have a look you can set mplayer to play a folder. having them all in one folder with that setup will be far simpler and easy to setup. which i do know how to setup.

EDIT: im looking on omxplayer works as well

EDIT: i did some reading and python was recomended...

EDIT: further notes checks

Everything you need to know about AMD cpus in one simple post.  Christian Member 

Wii u, ps3(2 usb fat),ps4

Iphone 6 64gb and surface RT

Hp DL380 G5 with one E5345 and bunch of hot swappable hdds in raid 5 from when i got it. intend to run xen server on it

Apple Power Macintosh G5 2.0 DP (PCI-X) with notebook hdd i had lying around 4GB of ram

TOSHIBA Satellite P850 with Core i7-3610QM,8gb of ram,default 750hdd has dual screens via a external display as main and laptop display as second running windows 10

MacBookPro11,3:I7-4870HQ, 512gb ssd,16gb of memory

Link to comment
Share on other sites

Link to post
Share on other sites

Blue Jay

CPU: Intel Core i7 6700k (OC'd 4.4GHz) Cooler: CM Hyper 212 Evo Mobo: MSI Z170A Gaming Pro Carbon GPU: EVGA GTX 950 SSC RAM: Crucial Ballistix Sport 8GB (1x8GB) SSD: Samsung 850 EVO 250 GB HDD: Seagate Barracuda 1TB Case: NZXT S340 Black/Blue PSU: Corsair CX430M

 

Other Stuff

Monitor: Acer H236HL BID Mouse: Logitech G502 Proteus Spectrum Keyboard: I don't even know Mouse Pad: SteelSeries QcK Headset: Turtle Beach X12

 

GitHub

Link to comment
Share on other sites

Link to post
Share on other sites

im throwing together a script now to see if it works anyway.

Everything you need to know about AMD cpus in one simple post.  Christian Member 

Wii u, ps3(2 usb fat),ps4

Iphone 6 64gb and surface RT

Hp DL380 G5 with one E5345 and bunch of hot swappable hdds in raid 5 from when i got it. intend to run xen server on it

Apple Power Macintosh G5 2.0 DP (PCI-X) with notebook hdd i had lying around 4GB of ram

TOSHIBA Satellite P850 with Core i7-3610QM,8gb of ram,default 750hdd has dual screens via a external display as main and laptop display as second running windows 10

MacBookPro11,3:I7-4870HQ, 512gb ssd,16gb of memory

Link to comment
Share on other sites

Link to post
Share on other sites

Ive done some research and found something worth nothing. if you have files/file paths without spaces works and you disable the quotes on the echo $line and then use that setup. works great. issue if you have spaces and use quotes or double quotes it treats it as part of the path and says it cant file the file or things there is multiple files when there is one. still progress.

script code for bash file sort.txt

Everything you need to know about AMD cpus in one simple post.  Christian Member 

Wii u, ps3(2 usb fat),ps4

Iphone 6 64gb and surface RT

Hp DL380 G5 with one E5345 and bunch of hot swappable hdds in raid 5 from when i got it. intend to run xen server on it

Apple Power Macintosh G5 2.0 DP (PCI-X) with notebook hdd i had lying around 4GB of ram

TOSHIBA Satellite P850 with Core i7-3610QM,8gb of ram,default 750hdd has dual screens via a external display as main and laptop display as second running windows 10

MacBookPro11,3:I7-4870HQ, 512gb ssd,16gb of memory

Link to comment
Share on other sites

Link to post
Share on other sites

well for that to work. you need to supply whoever can make such code a location with the files. media player you were planning to use. the context its being used for would be helpful. i will say mplayer set to go random in a folder should also work. ill have a look you can set mplayer to play a folder. having them all in one folder with that setup will be far simpler and easy to setup. which i do know how to setup.

EDIT: im looking on omxplayer works as well

EDIT: i did some reading and python was recomended...

EDIT: further notes checks

 

So far, I've been working wtih omxplayer, but I don't care as long as it works. Actually, omxplayer doesn't have volume controls, so other things could be better.

 

The path is /home/pi/Desktop/fourthofjuly.mp3 for one of them, all the others are just home/pi/Desktop/[nameofsong].mp3 I could put them in one folder, if I did that it would be /home/pi/Desktop/music/[nameofsong].mp3

 

Also, if I need to download anything, give me a link not meant to be taken straight on to the pi; my pi mysteriously won't connect to the internet.

Link to comment
Share on other sites

Link to post
Share on other sites

So far, I've been working wtih omxplayer, but I don't care as long as it works. Actually, omxplayer doesn't have volume controls, so other things could be better.

 

The path is /home/pi/Desktop/fourthofjuly.mp3 for one of them, all the others are just home/pi/Desktop/[nameofsong].mp3 I could put them in one folder, if I did that it would be /home/pi/Desktop/music/[nameofsong].mp3

 

Also, if I need to download anything, give me a link not meant to be taken straight on to the pi; my pi mysteriously won't connect to the internet.

if they are all in one folder. yes. and all it requires is base linux utilties as far i can tell. note the updated file hasnt be debugged again as i dont have omxplayer, and i made change to something i had working before. but it should be fine.

script code for bash file sort.txt

Everything you need to know about AMD cpus in one simple post.  Christian Member 

Wii u, ps3(2 usb fat),ps4

Iphone 6 64gb and surface RT

Hp DL380 G5 with one E5345 and bunch of hot swappable hdds in raid 5 from when i got it. intend to run xen server on it

Apple Power Macintosh G5 2.0 DP (PCI-X) with notebook hdd i had lying around 4GB of ram

TOSHIBA Satellite P850 with Core i7-3610QM,8gb of ram,default 750hdd has dual screens via a external display as main and laptop display as second running windows 10

MacBookPro11,3:I7-4870HQ, 512gb ssd,16gb of memory

Link to comment
Share on other sites

Link to post
Share on other sites

if they are all in one folder. yes. and all it requires is base linux utilties as far i can tell. note the updated file hasnt be debugged again as i dont have omxplayer, and i made change to something i had working before. but it should be fine.

The attached file is just a link to a stackoverflow page. Can I please have a script that I can just write into a shell or a python script? Thanks.

Link to comment
Share on other sites

Link to post
Share on other sites

Everything you need to know about AMD cpus in one simple post.  Christian Member 

Wii u, ps3(2 usb fat),ps4

Iphone 6 64gb and surface RT

Hp DL380 G5 with one E5345 and bunch of hot swappable hdds in raid 5 from when i got it. intend to run xen server on it

Apple Power Macintosh G5 2.0 DP (PCI-X) with notebook hdd i had lying around 4GB of ram

TOSHIBA Satellite P850 with Core i7-3610QM,8gb of ram,default 750hdd has dual screens via a external display as main and laptop display as second running windows 10

MacBookPro11,3:I7-4870HQ, 512gb ssd,16gb of memory

Link to comment
Share on other sites

Link to post
Share on other sites

Thanks for your help. It works now.

It gave me reason to fm dig up my Linux laptop remember how shell scripting worked...

Everything you need to know about AMD cpus in one simple post.  Christian Member 

Wii u, ps3(2 usb fat),ps4

Iphone 6 64gb and surface RT

Hp DL380 G5 with one E5345 and bunch of hot swappable hdds in raid 5 from when i got it. intend to run xen server on it

Apple Power Macintosh G5 2.0 DP (PCI-X) with notebook hdd i had lying around 4GB of ram

TOSHIBA Satellite P850 with Core i7-3610QM,8gb of ram,default 750hdd has dual screens via a external display as main and laptop display as second running windows 10

MacBookPro11,3:I7-4870HQ, 512gb ssd,16gb of memory

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×