Raspberry Pi OS 10 Desktop

This tutorial is done using 2020-08-20-raspios-buster-armf.zip or better known as Raspberry Pi OS (32-bit) with desktop from here

Flash the image to the SD card with either balenaEtcher or use the Raspberry Pi Imager for the OS that you have on your PC.

Connect a mouse, keyboard and monitor to the Raspberry Pi and boot up.

When you boot up to the desktop you get the welcome screen, you might want to write down the IP address if your going to use SSH or VNC later.

_images/welcome-01.png

Click on Next then set the country, language, time zone and check off use English language and keyboard the press Next.

_images/welcome-02.png

Set the password you want to use and press Next.

_images/welcome-03.png

On the next screen usually you just press Next.

_images/welcome-04.png

You can either setup a wireless network or skip it.

_images/welcome-05.png

Update the software page press Next to update.

_images/welcome-06.png

After the update click Ok

_images/welcome-07.png

Then click Restart

_images/welcome-08.png

Setup a temporary user, in a terminal do the following

sudo adduser temp
sudo adduser temp sudo
_images/temp-user-01.png

Click on the Raspberry in the upper left corner then select Preferences then Raspberry Pi Configuration

  • System Tab
    • Set the Hostname you want to use

    • Turn off auto login

    • Network at Boot Wait for network

    • Splash Screen up to you, I turn it off

_images/config-01.png
  • Interfaces
    • SSH Enable

    • VNC up to you

_images/config-02.png

Click Ok and reboot and log in as temp or whatever name you used.

Change the user name of pi to your user name in my case it’s john sudo usermod -l newUsername oldUsername

sudo usermod -l john pi

Change the home directory name to your name again for me it’s john

sudo usermod -d /home/newHomeDir -m newUsername

sudo usermod -d /home/john -m john
_images/user-mod-02.png

Reboot and log back in as your new user, for me it’s john.

Delete temporary user and folder

sudo deluser temp
sudo rm -r /home/temp
_images/temp-user-02.png

You can now setup auto login in Raspberry Pi Configuration, don’t it says auto login for pi it also says auto login for default user which is you now.

_images/user-mod-03.png

Now if you reboot it will automaticly login as you.

User bin Directory

To add a bin directory and make .bashrc add that to the path so any executables you place in the /home/username/bin will run from the command line or as a program you need to edit the /home/username/.bashrc file. Open the file manager and click on View then Show Hidden.

_images/bin-01.png

Create a new folder called bin then double click on the .bashrc file to open it up in the editor.

Add the following to the end of the file

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
                PATH="$HOME/bin:$PATH"
fi

# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
                PATH="$HOME/.local/bin:$PATH"
fi

Reboot again so this will take effect. To test that it works open the file manager and create a file in the bin directory called howdy. Double click to open it in the editor and add the following.

#!/usr/bin/python3

print('Howdy')

Save and close the editor. Then in the file manager right click on the file howdy and in the Permissions tab select an option for Execute

_images/bin-02.png

Open a terminal and type in howdy and press enter and your program will run and print Howdy in the terminal.

_images/bin-03.png