Difference between revisions of "RPi Wheezy raspi-config 2012-06-18"

From eLinux.org
Jump to: navigation, search
m (The raspi-config)
Line 11: Line 11:
  change_pass Change password for ‘pi’ user
  change_pass Change password for ‘pi’ user
  change_locale Set locale
  change_locale Set locale
  change_timezone       Set timezone
  change_timezone         Set timezone
  memory_split Change memory split
  memory_split Change memory split
  ssh Enable or disable ssh server
  ssh Enable or disable ssh server
  finish Finish config and don’t start raspi-config at boot
  finish Finish config and don’t start raspi-config at boot
  <Ok> <Exit>
  <Ok> <Exit>
== Moving Around the Menu ==
== Moving Around the Menu ==

Revision as of 06:45, 29 June 2012

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 [1].

The raspi-config

When you start your Pi for the first time using the Wheezy image 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
<Ok>						<Exit>

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. 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.

What raspi-config does

Some 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 [[2]]

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 the card is that it takes much longer to backup the image.

OVERSCAN - Change Overscan

What would you like to do with overscan
<Disable>                      <Enable>

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. 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 negative Overscan 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, 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 fiddle with Overscan values, more information here [[3]].

CONFIGURE-KEYBOARD - Set keyboard layout

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

The first list will probably fall to one of the generic 105 key keyboards but it’s probably not a big deal if you can't find yours on the list, have fun remember you can always 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 actually 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


   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 the normal 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.

To return to my mantra if you screw this up be prepared to re-image and lose any work you have done and programs installed (you did back up you-re 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

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.

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

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

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.

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 (GPU) and how much for the operation of the main ARM processor.

Three choices 32MB for GPU, 64MB for GPU, 128MB for GPU. First time users should leave it at 64MB for the GPU. There is more information on when to use the different options here [[4]]. You can change it with raspi-config and it will take effect at the next reboot.

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 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 [5]

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 <Ok> from this option then on all future startups you won't get the raspi-config menu. If you choose <Exit> then the next time you start your 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 some gibberish about the Last Login (ignore this).

Then there’s some info on finding further information on the included programs. As a new user for now even locating this stuff is probably a no-no.

Then you get the standard NO WARRANTY message it’s 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.

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. There is a good linux cheatsheet here. 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 all the 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.