I have a script that starts pianobar (pandora player) and autoloads into tty2 after booting. I'm running Ubuntu Precise 12.04.
it's a pretty simple script:
#!bin/bash
sleep 5
echo "2" | pianobar
This works, it selects station 2 and begins playing... but when I try to type in commands it doesn't work (like pushing "p" for pause.) It'll show the letter for a second, then hide it. If I try to exit with ctrl+z it just sits there and I can't use it at all.
If I run this it works fine but doesn't auto-select the second station:
#!bin/bash
sleep 5
pianobar
Is there anyway to write this so it will automatically input "2" and then allow me to control from there? Or am I stuck with having to select 2 every time I boot up?
EDIT:
I modified it to this:
#!bin/bash
sleep 5
{ echo 2 ; cat ; } | pianobar
and it does the exact same thing as just "echo 2 | pianobar"
"Isn't there an option to pianobar to start with a default station"
I would of thought so, but I can't find a command for a default setting when I do "man pianobar"
When I open the program, it does a login and then the program starts with "Select station:" I'd like for it to automatically go into the 2nd station.