RPi Wheezy raspi-config 2012-06-18

raspi-config was introduced with the advent of the Debian Wheezy image. It helps you configure your Pi. It is a work in progress so the number of menu items and the ease of use of those items will increase with time. If anyone feels willing and able to improve raspi-config then please contact Alex Bradbury.

The raspi-config
When you start your Pi for the first time using the Wheezy image then, following lots of scrolling text with a couple of pauses lasting in total a few tens of seconds, you will be automatically logged in as pi with the password raspberry and the raspi-config menu will appear. It has the following entries:

info			Information about this tool expand-rootfs		Expand root partition to fill SD card overscan		Change overscan configure-keyboard	Set keyboard layout change_pass		Change password for ‘pi’ user change_locale		Set locale change_timezone        Set timezone memory_split		Change memory split ssh			Enable or disable ssh server finish			Finish config and don’t start raspi-config at boot 						

Moving Around the Menu
At any point from within any of the menu or sub-menu options the Tab key will toggle about the selected entry and the options at the bottom inside angle brackets, cursor keys move up and down menus. There is an exception to this and that’s with the change_locale option, ignore that exception for now it’s covered later.

Some of the menu entries take quite a while to display. The user experience looks like its running a desktop but in fact it isn't; its using the command line and its graphics capabilities (remember VDU's) so occasionally the screen will scroll a bit.

What raspi-config does
Some menu entries modify the file /boot/config.txt. This file, out of the box, contains a number of commented out configuration entries; raspi-config adds entries at the end of this file. You can see what raspi-config has done to the file by viewing it on the Pi using Leafpad and, if you really mess things up you can edit the file from the SD card using Notepad on a Windows PC. More information on editing config.txt here R-Pi_ConfigurationFile

Other entries modify Linux configuration files, some take effect immediately, others at the next boot.

INFO - Information About This Tool
This would be really helpful if it actually explained the options in the menu, hopefully at least it will provide a reference to this Wiki page.

It helpfully advises you may have difficulties if you have heavily customized your installation but as this is probably the first thing a rookie is going to see the likelihood of a heavily customized installation is small.

raspi-config appears automatically at first boot. You can run it at any time after that by typing sudo raspi-config (case sensitive) at the command line or in a terminal window. The sudo (do as superuser) is necessary because you will be changing files that you as user pi do not own, its Debian's way of providing a root login.

The lovely thing about the Pi is that, if you mess up, it will not be difficult to re-image; killing the install may require a re-image (check this).

EXPAND-ROOTFS - Expand Root Partition to Fill SD Card
This does what it says on the tin so if you have installed Wheezy on a 4GB or greater card use this option and AFTER REBOOT it will use all of the SD card. The Wheezy image takes nearly 2GB so if you are going to install additional software or large files its worth doing, however you don't need to do it on first boot. The downside of using all of a larger card is that it takes much longer to backup the image.

OVERSCAN - Change Overscan
What would you like to do with overscan                      

Any changes will take effect after a reboot. If you change a setting and end up losing the left side of the screen you can easily edit /boot/config.txt on a PC to undo the changes.

Televisions do not usually display the whole of the picture, they Overscan and crop off a few percent of the image. This is to hide the data signals such as teletext which use the outer lines of the picture (could be a hangover from analogue TV). Computers, including the Pi, use all the lines for real display so often the image displayed by computers on TV's is cropped.

To avoid losing the critical left column at first boot the clever Pi people have deliberately enabled Overscan and used positive Overscan vlauses to make the displayed image smaller, and to play safe much smaller. This means, depending on your monitor/TV, there may be black borders around the picture. LXDE will show the wrong resolution in its display information as it shows you the size of the framebuffer (display size-overscan), and the display may be a bit fuzzy.

On some displays, particularly monitors, just disabling Overscan will make the picture fill the whole screen and correct the resolution. For other displays it may be necessary to leave overscan enabled and fiddle with Overscan values, more information here R-Pi_Troubleshooting.

CONFIGURE-KEYBOARD - Set keyboard layout
Slow to display and, if you select some of the non-default options, there will be a short delay while changes are made. Changes take effect immeadiately except for changes to X-server exit which require a reboot.

This menu for using different attached keyboards. Brands of keyboards are chosen first followed by other choices to set up nationality of keyboards etc.

Default is Generic 105-key (Intl) PC. If you cannot find your keyboard on the list then use one of the generic keyboards but it’s probably not a big deal if you can't find yours on the list, have fun remember you can always, change it later or re-image if you're really stuck.

The next screen regards keyboard layout. If you are not using the first choice of English UK select Other and you will be faced with a long list of other national keyboards. Funnily enough this list includes English UK.

Next screen is quite well documented on the screen you're probably going to run with one of the top two choices. These are:

The default for the keyboard layout Or No AltGr key

To be honest if this is your first setup and you get this wrong it’s not going to break the bank and as I keep saying if in doubt re-image and start again.

Next screen; well if your using a standard keyboard then you probably don’t have a compose key and if your new to computing as intended you're not likely to need one for a while so I would suggest choosing

No compose key

The next screen is a useful one and the on screen documentation is actually quite clear provided you know what is meant by “X server” so here’s an outline:

When you have finished your install the last line of the start-up will tell you that you can run startx. Startx is the command to run the windows (like) screen where you use a mouse to select options.

This is the X server and to get back to command line (that’s all the typed stuff) you can use [Ctrl][Alt][Backspace] all pressed at the same time to shut down this X server screen; you can always restart it by typing “startx”. Always handy if you have a flaky mouse or are using a wireless mouse that eats batteries.

Of course this is pointless if you don’t remember the key combination when the time comes!

CHANGE_PASS - Change password for ‘pi’ user
The default user for the Wheezy install is pi and its password is raspberry. Until you're familiar with the setup it’s probably better to leave this password as it is at least till you are happy changing stuff. In addition you can re-run raspi-config to change it at any time.

If you screw this up be prepared to re-image and lose any work you have done and programs installed (you did back up your data didn't you). With Linux and Unix forgotten passwords are a killer the Raspberry Pi is one of the simpler systems. Let's face it till you know what your looking at, the out of the box solution of pi and raspberry are probably all you will need.

CHANGE_LOCALE - Set locale
Slow to start up and there will be a delay while locales are generated.

You can tell this was written by a computer engineer and not a human how about this as an alternative.

change_locale		Tell the computer if you need non English characters.

Sheesh! a computer aimed at children and new users and then you expect them to know what locale means (google's your friend?).

This menu option gives you a massive list of choices that look like they were written by one of the infinite monkeys of legend (goggle infinite monkeys Shakespeare if you don’t understand this reference).

The default setting is

en_GB UTF-8 UTF-8 (ain't it nice to have a UK produced computer!)

English, Great Britain and UTF-8 is a code related to showing all of the characters usually needed to show English letters and other symbols on the screen. If you are working in some other language than English then you will probably need to play around with this.

You can select multiple choices in the list the space bar toggles them on and off (this was the exception I mentioned earlier) and it’s a long list. Basically if you want to work in more than one language then you will need to make other choices from this list based on the languages you intend to use.

If you are working in English only the default choice is probably the only one you will need.

CHANGE_TIMEZONE - Set timezone
Slow to display.

This is where you setup your clock; now it’s no big issue if it’s wrong it just means the date and time assigned to files you create (automatically when you make them) will be out and its not hard to set this up. (What is the effect if you are not connected to the internet and don't have time set with ntp?)

The set up consists of two layers basically to make your selection easier to find.

First option screen think Continent; just to confuse things you have US and America because we all know USA is not part of America. Actually the US option just gives you a shorter list containing the US time zones that are included in the American list; they just made a shorter list under US for all those Good Old Boy American Citizens who don’t know about American places outside of the USA. (flames imminent!).

SystemV relies on you knowing what SystemV is (Think Unix and ignore it for now).

Most people know where they are in the world for time zone; for me it’s Europe then London on the next screen but I’ve always been of the opinion that there should be ropes and lights around the M25 with signs saying “Danger hole in the world Keep Out” but then I’m not from London and the M25 was always the road to hell.

MEMORY_SPLIT - Change memory split
This allows you to choose how much of the RAM memory is set aside for the Broadcom Graphics Processing Unit (Videocore) and how much for the operation of the main ARM processor.

Three choices 32MiB for Videocore, 64MiB for Videocore, 128MiB for Videocore. First time users should leave it at the default 64MiB for the Videocore. There is more information on when to use the different options here RPi_Advanced_Setup. You can change it with raspi-config and it will take effect at the next reboot (check).

Now let’s assume your really fresh to writing code, as in never done this before ever. You're not going to be writing really complex Artificial Intelligence type programs and your also unlikely to be running cutting edge real time first person shooter games not yet anyways. I like the idea of having 128 meg for graphics. As a new programmer your not likely to push graphics unless you want to do something with photos or live streaming (Watching Live TV on your Pi).

SSH - Enable or disable ssh server
NOTE: This is broken in Wheezy Beta. If you enter it by mistake press CTRL-C and type sudo raspi-config to recover.

This change takes effect when???

This option enables or disables the ssh server, a program which sits quietly in the Pi looking for ssh connections from other computers. The default setting is on and there's little reason for a new user to change this unless your home network has hostile users or is open to the Internet. ssh means 'secure shell'. It is a communication protocol which will allow you to log into the Pi from another computer on your network using a program like Putty to provide a command line interface in a terminal window.

Putty is free and available to download. It’s free Open source and runs on both Windows,Linux. There are other things available for Mac’s (I’m not really familiar enough but I believe there’s an option in Xterm).

This option allows access to the Pi without a monitor attached to the Pi. OK it’s easier if you have one but let’s say you want to do some command line stuff and your partner/brother/sister whatever wants to use the TV for Corrie or suchlike. Its particularly useful for starting a VNC server on the Pi so you can use the Pi's desktop on another computer. More details here this is a link to a Blog page that douments an experience with VNC.

Using Putty or the like is pretty straightforward. You will need to know the IP address of the Pi, either by watching the startup output as it scrolls by, typing ifconfig at the Pi's command line or terminal window, or looking at your router. The IP address is dynamic and can change, particularly if you have not used the Pi for a day or so.

However if you are using everything from the box as is. That is to say you have your HDMI connected to a TV and a Keyboard and Mouse on the Pi and you have the menu running then I suggest you could disable ssh just to be on the safe side security wise(note just a suggestion).

FINISH - Finish config and don’t start raspi-config at boot
If you select  from this option then on all future startups you won't get the raspi-config menu. If you choose  then the next time you start you are going to get this menu again automatically.

After Exiting the Menu
OK let's assume you have happily worked your way through this and you selected OK for the final menu option.

You are going to get the text that is displayed each time you login to your Pi:

First information about the Last Login which is useful for finding out if it was you, your son/daughter/grandmother/cat was the last to login and screw up your Pi.

Then you get the standard copyright and NO WARRANTY message the latter just legalese for “your doing this at your own risk” that kind of goes without saying.

Then the key line.

Type ‘startx’ to launch graphical session

So, if at this point you type startx followed by hitting the Enter key you will be launched headlong into a windows style environment. When you have finished work logout using the red exit button (bottom right) and then type sudo halt at the command line. Wait until 'System Halted' is displayed before pulling the plug. (Exiting the desktop is a bit flakey on Wheezy beta, you may find you end up with a blank screen and will have to pull the plug with a small risk of corrupting the SD card. Enabling and using CTRL-ALT-BACKSPACE appears to be much more reliable.)

If on the other hand you want to play in the rarefied atmosphere of the command line environs then type away. You are in the home directory of the pi user; typing ls followed by [enter] will display its files and directories. Directories are in blue so type cd python_games then ls to change folder and display its contents. When you have finished don't forget to type sudo halt and wait until 'System Halted' is displayed before pulling the plug.

Finally you may want to manually reboot just to allow allow the delayed configuration settings to take effect; type sudo reboot at the command line.

If you use just the command "reboot" your RaspberryPi will tell you that you must be super user so type sudo reboot

This should restart your Pi. Scrolling text should appear immediately and there will be a pause if you have chosen to resize your SD card.

NOTE All of this is specific to the 2012-06-18 Beta version of Wheezy and not the New version.

=References=