Skip to content

My Raspberry PI Setup


apt-get update
apt-get upgrade
apt-get dist-upgrade
apt-get install git-core wget ca-certificates binutils -y
wget -O /usr/bin/rpi-update && chmod +x /usr/bin/rpi-update
nano /boot/config.txt

Add the following in to the file for 128MB GPU if 256MB Pi or 256MB GPU for 512MB Pi


echo "CONF_SWAPSIZE=1024" > /etc/dphys-swapfile
dphys-swapfile setup
dphys-swapfile swapon
apt-get install preload -y
apt-get autoremove
sed -i 's/vm.swappiness=1/vm.swappiness=10/g'  /etc/sysctl.conf
sed -i 's/vm.min_free_kbytes = 8192/vm.min_free_kbytes=32768/g'  /etc/sysctl.conf
sed -i 's/sortstrategy = 3/sortstrategy = 0/g'  /etc/preload.conf
apt-get install tightvncserver -y
vncserver :1 -geometry 1024x600 -depth 16 -pixelformat rgb565
nano /etc/profile

———-add startx to end of file

crontab -e

———-add following line

@reboot su -c "vncserver :1 -geometry 1024x600 -depth 16 -pixelformat rgb565" pi

chmod +x youtube-dl
cp youtube-dl /usr/bin/youtube-dl
sudo apt-get install python-setuptools -y
tar -zxvf whitey-0.1.tar.gz
nano ./whitey-0.1/src/yt/

————–edit ‘mplayer and switches to omxplayer

cd whitey-0.1/
sudo python install
sudo git clone git://
cd get_iplayer
sudo chmod 777 get_iplayer
sudo apt-get install libwww-perl rtmpdump flvstreamer ffmpeg -y
#create /usr/bin.get_iplayer
sudo mkdir /usr/bin/get_iplayer
#copy to /usr/bin/get_iplayer
sudo cp -Rv * /usr/bin/get_iplayer/
# set default type to tv & radio
/usr/bin/get_iplayer/get_iplayer --prefs-add --type=tv,radio
# set cache expiry to 1 hour
/usr/bin/get_iplayer/get_iplayer --add-prefs --expiry=3600
# set output directory
/usr/bin/get_iplayer/get_iplayer --prefs-add --output="/media/iplayer"
# set specific output directory for radio
/usr/bin/get_iplayer/get_iplayer --prefs-add --outputradio="/media/iplayer/radio"
# you can also set specific output directory for tv with
/usr/bin/get_iplayer/get_iplayer --prefs-add --outputtv="/media/iplayer/tv"
# set to use sub-directories
/usr/bin/get_iplayer/get_iplayer --prefs-add --subdir
# set file name format
/usr/bin/get_iplayer/get_iplayer --prefs-add --file-prefix="---"
# set to search future schedule
/usr/bin/get_iplayer/get_iplayer --add-prefs --refresh-future
# set to exclude cbebbies and cbbc from refresh
/usr/bin/get_iplayer/get_iplayer --add-prefs --refresh-exclude="cbeebies,cbbc,CBBC"
# set to download thumbnail
/usr/bin/get_iplayer/get_iplayer --add-prefs --thumbnail
# set to download metadata
/usr/bin/get_iplayer/get_iplayer --add-prefs --metadata=generic
# symlink for get_iplayer
cd /usr/bin
ln -s /usr/bin/get_iplayer/get_iplayer iplayer
# create cron.4hourly
mkdir /etc/cron.4hourly
chmod 755 /etc/cron.4hourly


/usr/bin/get_iplayer/get_iplayer --pvr


chmod 755 /etc/cron.4hourly/iplayer_pvr


/usr/bin/get_iplayer/get_iplayer --type=tv,radio --refresh-future --refresh


chmod 755 /etc/cron.daily/iplayer_refresh_feeds


/usr/bin/get_iplayer/get_iplayer  --thumbnail-only --history
/usr/bin/get_iplayer/get_iplayer --metadata-only --metadata=generic --history


chmod 755 /etc/cron.daily/iplayer_update_metadata

# create cron.nightly
mkdir /etc/cron.nightly
chmod 755 /etc/cron.nightly


find /media/iplayer/tv -name *.partial.mp4.flv -exec rm -v {} \;


chmod 755 /etc/cron.nightly/iplayer_cleanup_partial_downloads

add the following to /etc/crontab

40 0,4,8,10,14,18,22 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.4hourly )


apt-get install libpcre3 -y
apt-get purge omxplayer -y
dpkg -i omxplayer_0.2.1~git20120812~231c08b4_armhf.deb
apt-get install minidlna -y
apt-get install ntfs-3g -y
mkdir -p /media/HardDrive
chmod 755 /media/HardDrive
nano /etc/fstab
nano /etc/minidlna.conf


# Change db_dir so that the database is saved across reboots
# Uncomment log_dir for now in case we hit problems


cupdate-rc.d minidlna defaults
service minidlna start

if you need to edit minidlna.conf after saving run

service minidlna force-reload

to test 4hourly run
run-parts --verbose /etc/cron.4hourly


From → Raspberry PI

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: