Category Archives: Raspberry

Blogppost related to the Raspberry Pi

How to setup a VNC server on a Raspberry Pi for remote access.

Today I figured out how to setup a VNC server using tightvncserverPenguin tutor explains it very well on his website.

This is how I did it. Start off with a clean Raspbian Wheezy install. Make sure to use sudo aptitude update and sudo aptitude upgrade to get to the latest version.

Install the Tight VNC Server on the Rpi with the following command


aptitude install tightvncserver


You can start the tightvnc server with the following command


/usr/bin/tightvncserver:1 -geometry 1280×720 -depth 24


The first time you run the tightvnc server, you will have to set a password e.g. “raspberry”. You don’t need a view only password. In case you want to change the password a later moment, use the following command:



If you want to run tightvncserver at startup you have to do the following:


Create an init file


sudo nano /etc/init.d/tightvncserver


Make the content of the file look like this, user = “pi” desktop resolution is set to “1280×720” both can be changed:


# Set the USER variable VNC server

export USER=’pi’


eval cd ~$USER


case “$1” in


su $USER -c ‘/usr/bin/tightvncserver :1 -geometry 1280×720 -depth 24’

echo “Starting TightVNC server for $USER ”



pkill Xtightvnc

echo “Tightvncserver stopped”



echo “Usage: /etc/init.d/tightvncserver {start|stop}”

exit 1



exit 0


ctrl-x and Y to save


To complete execute the following commands:


sudo chown root:root /etc/init.d/tightvncserver

sudo chmod 755 /etc/init.d/tightvncserver

sudo update-rc.d tightvncserver defaults


The tightvncserver can be started and stopped with the following commands:


sudo /etc/init.d/tightvncserver start

sudo /etc/init.d/tightvncserver stop


In order to access the Raspberry Pi via VNC, you will need a VNC viewer.

That’s it!


How to setup a USB wlan connection on a Raspberry Pi – alternative method

Last week I received a new Raspberry PI model B with 512MB ram. I tried to enable WLAN using my own instructions for the Edimax WLAN Hi-Speed USB 2.0 EW-7811Un Nano and it didn’t work!?!? Huh?

Some how I got the following error message:

wpa_supplicant: /sbin/wpa_supplicant daemon failed to start

but after some google-ing I found a solution for the problem. In many posts on the web, it is suggested that the problem relates to a “lack of power” issue on the RPi USB. I found out that it is really a configuration issue. Here is how I solved it:

The setup assumes working from a clean Rasbian Wheezy image and applying the latest updates.

Configure the network adapter interface

sudo nano /etc/network/interfaces

you have to make the content of /etc/network/interfaces look like this:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

auto wlan0
allow-hotplug wlan0
iface wlan0 inet dhcp


ctrl-x and Y to save the changes

Now just restart your network connections

sudo /etc/init.d/networking restart

or alternatively reboot

sudo reboot

That is it! You don’t have to use the  “/etc/wpa_supplicant/wpa_supplicant.conf” with this setup.

new RPi with Edimax EW-7811Un

Using my Raspberry Pi as a Citrix Client

A few weeks ago I came accross The Raspberry Pi Thin Client project (RPiTC). You can find its website here:

I like to use the IceWeasel Citrix Client that it has onboard. Which works very well! In case you are a user of VMWare, Windows Remote Desktop etc, it also provides ready support for that.

Out of the box, the image works via the onboard Ethernet connection. But I wanted to use the RPiTC via a Wifi connection (Edimax ew-7811un). The RPi can be powered from the USB of my TV screen. I have the HDMI cable, USB WLAN and USB wireless HTPC keyboard connected to the RPI to make the setup complete and ready for work.

This is how I got it to work.

1) connect via SSH

2) logon using the following standard credentials

user: root

password: raspberry

you have to install the following tools:

aptitude install wireless-tools

apt-get install wpasupplicant
configure the wlan settings
nano /etc/wpa.conf
the file should look like this:
pairwise=CCMP TKIP
ctrl-x and Y
Configure your network interfaces
nano /etc/network/interfaces
the file should look like this:
auto lo
iface lo inet loopback
# auto eth0
# iface eth0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa.conf
ctrl-x and Y
For anyone that just wants an SD-card image, the original and the one with wlan support can be found in my public dropbox. (Files are currently being uploaded)
If you use the WLAN image you will have to edit the WLAN settings.

1) connect via SSH

2) logon using the following standard credentials

user: root

password: raspberry

configure the wlan settings
nano /etc/wpa.conf
by changing the following lines
ctrl-x and Y
PS: note that the original image RPiTC06022013.IMG fits on a 1GB card (the unpacked image is 1000MB). The RPiTC06022013-WLAN.IMG was made on my 4GB SD card (I didn’t have any smaller SD-cards), therefor this image is much bigger, despite the fact that the software doesn’t need all that space.

Download your AirPi SD Card image here

*** update – the files have been updated and fit on a 2GB SD cards now ***

The new files can be found in my public Dropbox in the \Images\Airpi directory.

I’ve just published a second image for the AirPi. Last month I published an image to get your AirPi working on your Raspberry Pi with a Logilink UA0053 USB soundcard. Now I’ve added on request an image that works with the onboard 3,5mm. For everyone that wants to save the time, you can download the image for a 4GB SD card directly from my public dropbox.Both images are based on Rasbian Wheezy and configured with:
– SSH enabled
– User = pi
– Password = raspberry
– locale = en_US.UTF8
– timezone = Europe.BerlinIt has auto login for user pi enabled
It’s broadcast name is AirPi
Pick the image of your choice. The 2013-03-19-wheezy-airpi image uses the onboard audio jack. The 2013-02-19-wheezy-airpi-UA0053 image is configured to use the USB audio Logilink UA0053 soundcard
Write the image to an 4GB SD card with Win32DiskImager.Plug it into the raspberry and hook the raspberry up to your network (and Logilink UA0053 soundcard) and soundsystem. It’ll work like a charm on iOS 6.Enjoy!The files can be found in my public Dropbox.

The broadcast name of the Raspberry AirPi can easily by changed, at the command prompt type:nano /etc/init.d/shairportlook for the following lineDAEMON_ARGS=”-w $PIDFILE -a AirPi”and change AirPi in what ever you like.

ctrl-x and Y to save changes

sudo reboot


How to change the WLAN settings
WLAN configuration can be set using the following command:
sudo nano /etc/network/interfaces
look for the lines with
wpa-ssid “YOUR SSID”
and replace YOUR SSID with the SSID of your network and replace YOUR PASSWORD with the password of your network.
ctrl-x and Y to save changes
sudo reboot
If there is no WLAN connection the Raspberry Pi will use the LAN connection if available.

Turning your Raspberry Pi into an AirPi with iOS6 support

There are several posts on the internet describing how to turn your Raspberry Pi into an Airpi. The install assumes working from a clean Raspbian Wheezy setup as decribed here.

This is how I did it:


Become root

sudo su


Update & upgrade Raspbian Wheezy

aptitude update

aptitude upgrade


Divert sound from HDMI to 3,5mm onboard sound jack

amixer cset numid=3 1


Get required libraries
aptitude install git libao-dev libssl-dev libcrypt-openssl-rsa-perl libio-socket-inet6-perl libwww-perl avahi-utils


Install Perl
aptitude install libmodule-build-perl
git clone perl-net-sdp
cd perl-net-sdp
perl Build.PL
./Build test
./Build install


Install Shairport iOS6 version
git clone shairport
cd shairport


Load shairport automatically at boot

make install

cp shairport.init.sample /etc/init.d/shairport

cd /etc/init.d

chmod a+x shairport

update-rc.d shairport defaults


Set the name of AirPi :

nano shairport


look for the DAEMON_ARGS line and amend accordingly:



ctrl-x and Y to save and close

To start the AirPi immediately 
./shairport start



You can also add Wlan support and USB Sound support.

How to create your Raspberry Raspbian “Wheezy” SD card

When you want to operate your Raspberry Pi, you need an SD card with an “OS”. I like using Raspbian Wheezy, a Linux Debian distro tailored for the Raspberry Pi.

What do you need:

1) atleast a 2GB SD card (I prefer using class 10 SD Card with 4GB or more)

2) an SD Card reader

3) The Raspian Wheezy OS

4) Win32DiskImager

Download & unpack the Raspbian Wheezy OS.

Pu the SD card in the card reader and connect it to your PC.

Card Reader

Download & install Win32DiskImager (you only have to create a directory which includes all the files from Win32DiskImager)

Run win32diskimager.exe

Select the previously download Image File

Select the Card Reader with the SD Card as Device

Hit the Write button, wait for the write process to finish.


PS: In case you want to make a back-up of your SD-Card you can create an Image File, select the Device (Card Reader) and press Read. This will create an image file of the SD card in the card reader.

PS2: in case you want to format your SD Card the HPUSDDisk.exe tool might come in handy, as it formats the SD Card regardless of size, OS and / or file system.



Connect to the Raspberry Pi via SSH / Putty

I find that I prefer working on my Raspberry Pi via SSH. This is how it is done.

1) Make sure that SSH is enabled on your Raspberry Pi

2) Find out the IP address of your Raspberry. I usually scan my network with Fing to find the Raspberry. In case you have access to the console you can also type the following command:

sudo ifconfig

it will show the network adapters and the assigned ip-address.


3) Download & Install Putty. It is not really an Install as you can run the putty.exe directly.

4) The Putty window opens


Enter the Raspberry Pi IP address, select SSH as connection type and under the menu item “Window” –> “Translation” select UTF-8


Click “Open” and you’re ready to log on.

Standard user = pi

Standard password = raspberry