Settings for Raspberry Pi¶

Adapt the Resolution¶

For the Raspberry Pi three and the lower versions, you need reset the resolution ratio as follows. As for Raspberry Pi 4, when you first up it, the resolution is optimum. If you want to change its resolution, please refer to the next part.

For Raspberry Pi 3 or Lower Version

Pace i: Open config.txt.

                
                sudo
                nano
                /
                boot
                /
                config
                .
                txt
              

Pace 2: Change the /kick/config.txt file.

  1. Define a custom CVT mode (since Raspberry Pi uses the standard rate when 1024×600 is non included, y’all need to set the aspect ratio close to 16:9) and add together the following lines beneath #hdmi_force_hotplug=1.

                
                hdmi_cvt
                =
                1024
                600
                60
                3
                0
                0
                0
              

hdmi_cvt=<width> <height> <framerate> <aspect> <margins> <interlace>

value

Default

Description

width

(required)

width in pixels

height

(required)

height in pixels

framerate

(required)

framerate in Hz

aspect

3

aspect ratio ane=four:3, 2=14:nine, 3=16:9, 4=5:four, 5=16:x, 6=15:9

margins

0

0=margins disabled, 1=margins enabled

interlace

0

0=progressive, ane=interlaced

rb

0

0=normal, 1=reduced blanking

  1. Find the following lines, delete the “#” mark and modify the value similar this:

                
                hdmi_group
                =
                2
                hdmi_mode
                =
                87
                ....
                hdmi_drive
                =
                2
              

hdmi_group=2 ways DMT (Display Monitor Timings, the standard typically used on monitors)
hdmi_mode=87 indicates we create a new hdmi fashion named 87.
hdmi_drive=two selects the Normal HDMI mode.

Subsequently the modification is washed, salve and leave. For more details near configuring config.txt, refer to Raspberry Pi official website: https://www.raspberrypi.org/documentation/configuration/config-txt.md.

Step 3: Reboot Raspberry Pi.

Reboot the Raspberry pi with the command sudo reboot.

For Raspberry Pi 4

  1. Click the
    Raspberry Pi icon
    ->
    Preferences
    ->
    Screen Configuration.

  1. Then choose
    Configure
    ->
    Screens
    ->
    HDMI-1
    ->
    Resolution
    ->
    choose the resolution that you want.

_images/image12.png

  1. Subsequently that you need to click the
    tick icon
    to save your configure.

_images/image13.png

Install Virtual Keyboard on Raspberry Pi¶

When yous use a touch on panel, you tin can connect an external keyboard to help you practise a text input operation, but information technology is best to install a virtual keyboard.

Install the required software with the following command.

                sudo apt install onboard sudo apt install at-spi2-core
              

In order to make the virtual keyboard have a meliorate effect, you need to do further settings.

Click the Raspberry Pi icon in the upper left corner and select
Preferences
->
Onboard Settings.

_images/onboard.png

In the
General
selection, check the following 2 items. When you cheque
Automatically display when editing text, you will be prompted to reboot, you lot tin reboot after all settings are complete.

_images/keyboard1.png

In the
Window
option, cheque
Dock to screen border.

_images/keyboard2.png

And in
Auto-show
pick, bank check
Auto-bear witness when editing text
again.

_images/keyboard3.png

The next 2 items are optional, the ones checked in the picture are recommended past us, you can also check other ones.

In
Layout
option,
Small
is recommanded.

_images/keyboard4.png

In
Theme
option,
DarkRoom
is recommanded.

_images/keyboard5.png

After the setting is consummate, restart Raspberry pi. Every time you restart Raspberry pi, you need to click
General Access
->
Onboard
to enable the virtual keyboard.

_images/enable_onboard.png

Now yous can utilize this keyboard to edit your files or codes.

_images/keyboard6.png

Right Click on Raspberry Pi¶

The touchscreen makes information technology easy to perform uncomplicated navigation tasks with your finger or stylus, but y’all may want to be able to use the context menu (right-click menu).

And so you will demand to download a

Touchégg
. Enter the following control to install information technology.

For 32-bit Bone:

                wget https://github.com/JoseExposito/touchegg/releases/download/2.0.14/touchegg_2.0.14_armhf.deb sudo apt install ./touchegg_2.0.14_armhf.deb
              

For 64-scrap Bone:

                wget https://github.com/JoseExposito/touchegg/releases/download/2.0.xiv/touchegg_2.0.14_arm64.deb sudo apt install ./touchegg_2.0.14_arm64.deb
              

Afterwards restarting, you can double-tap the screen to bring upwardly the context bill of fare.

_images/right_click.png

Note

The product is not compatible with some of Touchégg’due south gestures, such every bit three-finger zoom in/out.

Rotate the Display and Impact Bending¶

After the Raspberry Pi is turned on, if you observe that the brandish or touch on angle is not correct, or you demand to rotate to other angles during use, y’all can follow the tutorial below to achieve them.

Rotate the Display Bending¶

There are ii means to rotate the brandish angle, one fashion is from the Raspberry Pi desktop, and the other style is using the command line.

i. Ready from the Raspberry Pi Desktop

Click the
Raspberry Pi icon
->
Preferences
->
Screen Configuration.

_images/TSimage11.png

And so click
Configure
->
Screens
->
HDMI-1
->
Orientation, and then select the angle you want to rotate.

_images/orientation.png

Click the greenish checkbox to take effect.

_images/check.png

Notation

  • Later on checking the box, you need to confirm the changes past clicking
    OK
    within 10 seconds, otherwise it will go dorsum to the previous angle.

_images/invert_ok.png

  • For Debian Bullseye system, at that place is but one option –
    Inverted, if you desire to rotate to another angle, you need to set it from command line.

2. Using the Command Line

To make this change stay after a reboot, do the following to rotate your display.

Open the

autostart

file.

                  sudo nano /etc/xdg/lxsession/LXDE-pi/autostart
                

Add the following line to the stop.

                  
                  @xrandr
                  --
                  output
                  HDMI
                  -
                  1
                  --
                  rotate
                  correct
                


  • right

    represents the direction of rotation, and there are 4 directions to cull from:

    normal
    ,

    correct
    ,

    left

    and

    inverted
    .

After restarting the Raspberry Pi, you will run into the result of rotation.

Rotate Touch Angle¶

Run the post-obit command to open the

40-libinput.conf

file.

                  sudo nano /usr/share/X11/xorg.conf.d/40-libinput.conf
                

Find the touchscreen section and add the corresponding rotation angle to it.

_images/touch_rotate.png

  • 0 degrees:

    Option
    "CalibrationMatrix"
    "ane
    0
    0
    0
    ane
    0
    0
    0
    1"

  • ninety degrees:

    Option
    "CalibrationMatrix"
    "0
    1
    0
    -ane
    0
    1
    0
    0
    1"

  • 180 degrees:

    Option
    "CalibrationMatrix"
    "-1
    0
    1
    0
    -1
    1
    0
    0
    1"

  • 270 degrees:

    Option
    "CalibrationMatrix"
    "0
    -ane
    1
    1
    0
    0
    0
    0
    1"

Notation

For some Raspberry Pis, you may set the rotation angle of touch to 90°, just somewhen you find that it is not xc° and you need to manually alternating these 4 sets of values.

Subsequently restarting the Raspberry Pi, you will see the effect of rotation.