cherrybombuc
Posts: 24
Joined: Mon Feb 25, 2013 4:59 pm

Shell script

Wed Feb 27, 2013 4:16 am

how to install a program or startup raspberry pi is shell script?
thanks

User avatar
socialdefect
Posts: 110
Joined: Mon Jun 25, 2012 9:02 pm
Location: Tilburg, the Netherlands
Contact: Website

Re: Shell script

Wed Feb 27, 2013 8:32 am

cherrybombuc wrote:how to install a program or startup raspberry pi is shell script?
thanks
I'm not quite sure what you mean here.....

Installing a program on Raspbian:

Code: Select all

sudo apt-get install program-name
To search for software:

Code: Select all

apt-cache search program-name
Installing packages on ArchARM:

Code: Select all

sudo paman -Sy program-name
Searching:

Code: Select all

pacman -Ss program-name
Install a program from a shell script:

Code: Select all

#!/bin/bash

echo 'This script will install VLC for you.....'
sudo apt-get -y install vlc
if [ $? != 0 ] ; then
echo 'There was an error while installing VLC, Please try again....'
else
echo 'VLC installed successfuly, you can start it from your programs menu now...'
fi

exit $?
Starting a script when RasPi starts:
small scripts or path to a script can be added to /etc/rc.local. This will execute every start-up.

on desktop systems there is often a autostart feature (or hidden folder in /home/yourname/.config/autostart). You can enter shell scripts there and they will execute with no options. Create a .desktop file to execute a script with extra options.

does this answer your question???
== If it's not broke... I'm not done fixing it! ==

Return to “General discussion”