Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> bash scripts at startup
post Aug 1 2013, 11:38 AM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 1
Joined: 1-August 13
Member No.: 18,435

I have been following multiple tutorials in an attempt to build a stand alone Pandora internet radio player using the Raspberry Pi. The Pi is running Wheezy, the latest distribution of Raspbian. All the tutorial are nearly identical when it comes to making pianobar and your bash script start at boot. Pianobar is the command line Pandora player and the bash script takes care of the button presses for next song, new station, volume up/down, pause/play, and shutdown/menu. I can get pianobar to start on boot, but the problem is the script: the buttons won't work. I have tried to solve this on my own for nearly an entire day and a half now, but am getting discouraged so I finally decided to ask others for help. I will post links for the tutorials and my code below. As of right now, I have pianobar and bash /home/pi/.config/pianobar/scripts/ added to the end of the ~/.bashrc file. I have tried adding the two lines to the /etc/rc.local file as well as the /etc/bashrc file. Nothing seems to work! One final thing: this is supposed to start playing music from Pandora by just applying power. Like I said before the music will work but the buttons will not. However, if I ssh into it and type ~/.bashrc and then quit pianobar, the buttons work!?

Here is the script:

gpio -g mode 22 in

if [ $(gpio -g read 22) = 1 ]
sudo python /home/pi/.config/pianobar/scripts/
bash /home/pi/.config/pianobar/scripts/


" "
Go to the top of the page
+Quote Post

Posts in this topic
- adg0013   bash scripts at startup   Aug 1 2013, 11:38 AM

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 22nd July 2018 - 03:28 PM