Raspberry Pi - Configuration



In this chapter, we will learn about configuring the Raspberry Pi. Let us begin by understanding how to configure Raspberry Pi board in Raspbian.

Raspbian configuration

For configuring Raspberry Pi in Raspbian, we are using Raspbian with PIXEL desktop. It is one of the best ways to get Raspbian started with the Raspberry Pi. Once we finish booting, we will be in the PIXEL desktop environment.

Now to open the menu, you need to click the button that has the Raspberry Pi logo on it. This button will be in the top left. After clicking the button, choose Raspberry Pi configuration from the preferences.

Configuration tool

Following is the configuration tool in PIXEL desktop −

Configuration tool

By default, the configuration tool opens to its system tab which has the following options −

  • Change Password − The default password is raspberry. You can change it by clicking the change password button.

  • Change the hostname − The default name is raspberry pi. You can also change it to the name, which you want to use on the network.

  • Boot − You can choose from the two options and control whether Raspberry Pi boots into the desktop or CLI i.e., command line interface.

  • Auto Login − With the help of this option, you can set whether the user should automatically log in or not.

  • Network at Boot − By choosing this option, you can set whether the pi user is automatically logged in or not.

  • Splash screen − You can enable or disable it. On enabling, it will display the graphical splash screen that shows when Raspberry Pi is booting.

  • Resolution − With the help of this option, you can configure the resolution of your screen.

  • Underscan − There are two options, enable or disable. It is used to change the size of the displayed screen image to optimally fill the screen. If you see a black border around the screen, you should disable the underscan. Whereas, you should enable the underscan, if your desktop does not fit your screen.

There are three other tabs namely Interfaces, Performance, and Localization. The job of interface tab is to enable or disable various connection options on your Raspberry Pi.

You can enable the Pi camera from the interface tab. You can also set up a secure connection between computers by using SSH (short for Secure Shell) option.

If you want to remote access your Pi with a graphical interface then, you can enable RealVNC software from this tab. SPI, I2C, Serial, 1-wire, and Remote GPIO are some other interfaces you can use.

There is another tab called Performance, which will give you access to the options for overclocking and changing the GPU memory.

The localization tab, as the name implies, enable us to set −

  • The character set used in our language.

  • Our time zone.

  • The keyboard setup as per our choice.

  • Our Wi-Fi country.

Configure Wi-Fi

You can check at the top right, there would be icons for Bluetooth and Wi-Fi. The fan-shaped icon is on the Wi-Fi. To configure your Wi-Fi, you need to click on that icon. Once clicked, it will open a menu showing the available networks. It also shows the option to turn off your Wi-Fi.

Among those available networks, you need to select a network. After selecting, it will prompt for entering the Wi-Fi password i.e., the Pre Shared Key.

If you see a red cross on the icon, it means your connection has been failed or dropped. To test whether your Wi-Fi is working correctly, open a web browser and visit a web page.

Configure Bluetooth Devices

We can use wireless Bluetooth devices such as keyboard and/or mouse with Pi 3 and Pi zero W because these models are Bluetooth-enabled. In PIXEL desktop, you can set up your Bluetooth devices easily.

Following are the steps to configure the Bluetooth devices −

  • First, make your device discoverable for pairing.

  • Now, you need to click on the Bluetooth menu at the top right of the screen. It is aligned to the Wi-Fi button.

  • Now, choose the Add Device option.

  • The Raspberry will start searching for the devices and when it finds your device, click it and click the pair button.

Data Partition Setup

As we know that data partition is that area on your memory card (SD or MicroSD) which can be shared by various distributions. One of the best examples of use of a data partition is transferring the files between distributions.

The data partition has the label data.

You can use this labeled data to make a directory point to it as follows −

Step 1 − First, you need to boot the Raspberry Pi into Raspbian.

Step 2 − Now, click the Terminal icon to get to the command line.

Step 3 − Next, type the command mkdir shared. It will create a directory named shared.

Step 4 − Write the command sudo mount -L data shared. This command will point the directory to the shared partition.

Step 5 − Write the command sudo chown $USER: shared. It will set the permission for writing in this shared folder.

Step 6 − Now, to go to this shared folder, you need to type the command cd shared.

Once all the files are created in this shared folder, they will be available to all the distributions that have the permission to access the data partition.

Advertisements