Raspberry Pi

On this page I’m going to document the changes I have personally made to my Raspberry Pi and the reason for them.

This page is mostly to help me restore my Pi after a format, but I’ve put it up here in case it is useful to anyone else.

Before booting

Connect a wireless USB dongle (or plug in a network cable), a keyboard and mouse. There are only two USB sockets so either use a wireless keyboard and mouse that share a dongle or connect to a powered usb hub first.

First time boot


Raspi-Config is the screen that appears on the Raspberry Pi when you boot it for the first time. Each option has quite a detailed explanation.

Docs: http://elinux.org/RPi_raspi-config

  • Run expand_rootfs
  • Run change_pass (then choose pi’s password)
  • Run set_locale (en_gb was already selected, just had to set it as default)
  • Run ssh and enable
  • Run boot_behavior and always boot to desktop

Once we’re in raspbian

Using the GUI

Run wpa_gui and connect to the wireless (or plug in a network cable)

Moving to Putty

Putty allows you to use your main computer to run commands on the PI. Download it here. Run and connect to the raspberry pi ip address, type pi as the username and your password.


Apt-get lets us download new packages from the internet. It installs them for you too. A little housekeeping before we start

sudo apt-get update

It is also recommended to upgrade the packages we already have. This will take 15 minutes or longer.

sudo apt-get upgrade

Sudo works like ‘Run as Administrator’ on Windows, but on the Pi you must write it before the command

GUI package installer

It’s easier (when not using Putty) to use a GUI to install packages. It also lets you search more easily (so you don’t need to know the exact package name). The programme to do this is Synaptic, but we first need to download it; so we’ll use apt-get again

sudo apt-get install synaptic


VNC is a remote desktop application that allows you to see the Raspberry Pi desktop from your main computer. Download it with

sudo apt-get install x11vnc

Once that is installed type

x11vnc -storepasswd

and when prompted enter a password

To run VNC type

x11vnc -bg -usepw

Putty will fill up with text showing the application is running. Open VNC and connect to [Raspberry Pi IP]:5900.

-bg lets x11vnc run in the background after you start it.

You should now be viewing the same desktop as you would see through the HDMI connection

Shortening the VNC command

Make a file called vnc.sh  with the following content

#! /bin/sh
x11vnc -bg -usepw

then to start vnc type

sh vnc.sh

Synaptic package manager

You’ve now got a GUI package manager and you have remote access to SSH and the desktop from your main computer. Using the GUI we can now install some of the other applications we need

Chromium web browser

Open Synaptic from the desktop menu. You’ll need your password.

Click on Search and type


Tick the box next to the chromium result and select ‘Mark for installation’ then ‘Mark’

Click on ‘Apply’ then ‘Apply’ again.


Personally I want to run this on an upright monitor and I want to ensure that the screensaver does not come on / the screen does not go blank after a certain amount of time.

Stopping the screen going blank

Connect to the pi with Putty. Type the following

sudo nano /etc/lightdm/lightdm.conf

A text file will appear on the screen. You should to do this in putty as you need root access to the text file. If you don’t have putty use the terminal in the GUI.

Press the down arrow on the keyboard until you hit this line


Replace this line with

xserver-command=X -s 0 -dpms

(ensure that you have removed the # from the start of the line)





Press Enter. Your file is now saved.

Rotating the display

Turn off the Raspberry Pi and remove the SD card. Put the SD card into a computer and edit config.txt. Add the following lines to the config file

#Rotate Display
#display_rotate=0        Normal
#display_rotate=1        90 degrees
#display_rotate=2        180 degrees
#display_rotate=3        270 degrees
#display_rotate=0x10000  horizontal flip
#display_rotate=0x20000  vertical flip

I personally need 270 degrees so I remove the # from #display_rotate=3

No HDMI cable?

If connecting to the Raspberri Pi without a TV connected you may wish to remove the # from


To force it into 720p

Dynamic DNS

sudo apt-get install ddclient

Run through the installation

One Comment

  1. Bill Bones

    I have followed your instructions to install x11vnc and it does not always connect from my pc running tightvnc.
    i can see x11vnc running in the task manager but get the responce “the target machine actively refused it”
    Do you have any ideas on how to make the connection more reliable?

    Thanks Bill

    3 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *