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.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> bash scripts at startup
adg0013
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/PandorasBox.sh 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 PandorasBox.sh script:
#!/bin/bash

gpio -g mode 22 in

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

fi

"http://www.instructables.com/id/Pandoras-Box-An-Internet-Radio-player-made-with/step8/Putting-it-Together-with-BASH-and-Python/"
"http://www.shaungehring.com/2013/01/03/raspberry-pi-project-1-pandora-streamer/comment-page-2/#comment-395"
"http://learn.adafruit.com/pi-wifi-radio/raspberry-pi-setup-3-of-3 "
Go to the top of the page
 
+Quote Post

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: 11th December 2017 - 07:53 PM