Here is the video tutorial that explains these customizations.
Create Your Own User
Note: I would also recommend you to change the default password for the wlanpi account.
In order to create a new user, you need to ssh into the WLAN. By default, if you connect the WLAN Pi to your laptop via the USB connection, this should establish an Ethernet over USB connection and your laptop should receive an IP address in the 192.168.42.0/24 IP address subnet.
You can now ssh into the WLAN Pi from your laptop using the default username and password:
- Username: wlanpi
- Password: wlanpi
- Use the following command to create a new user: sudo adduser username
- In the following prompts, specify which password you want to use for this user
- Use the following command to give this user sudo privileges: sudo usermod -aG sudo username
- Finally, try to connect using this new username and password: su - username
- In the home directory of the user, open the .profile file using the following command: sudo nano .profile
- Modify this file by adding the following line at the end of the .profile file: PATH=$PATH:/sbin:/usr/sbin
- Save and close the .profile file
- Once back in the shell, reload the profile using this command: source .profile
- You should now be able to use the ifconfig command
Change the Hostname of the WLAN Pi
- Open the file using the following command: sudo nano /etc/hostname
- Modify the hostname to your liking
- Save and close the /etc/hostname file
- Reboot the WLAN Pi
Create Your Aliases
Everyone has their own set of aliases they like to use. Here I will just share the ones I use. Feel free to use them as well and feel free to create your own.
In order to create your aliases, you need to do the following:
- ssh back to the WLAN Pi using your new user: ssh francois@192.168.42.1
- Once connected to the WLAN Pi, modify the .bashrc file using the following command: nano .bashrc
- Add your aliases at the end of this .bashrc file
- Save and close the .bashrc file
- Reload your bash profile using the following command: source .bashrc
- Validate that your aliases have been applied using the alias command.
Customize Your Prompt
In order to change the look of your prompt, you can do the following:
- From the WLAN Pi and from your user home directory, open the .bashrc file using the following command: nano .bashrc
- Inside the .bashrc file, scroll down until you find the PS1 variable. Then replace the value of that PS1 variable with whatever you would want to use.
- Save and close the .bashrc file
- Reload your bash profile using the following command: source .bashrc
Change the Picture Displayed when Booting
First, you need to retrieve the original image used. It is located on the WLAN Pi at the following location: /home/wlanpi/NanoHatOLED/BakeBit/Software/Python/wlanprologo.png
In order to retrieve this image, I used the scp command from my laptop. This command allows you to copy files from the WLAN Pi to your laptop over an SSH connection. Here is the command I used:
Once I knew the resolution, I created my own image using Illustrator. I actually created the two following ones:
So first, you need to transfert the new image back to the WLAN Pi. I transfered mine back to my home directory using the following command:
And finally, you need to replace the old image with the new one. I used the following command to do so: sudo cp WLANPi-SemFio-StartUp.png /home/wlanpi/NanoHatOLED/BakeBit/Software/Python/wlanprologo.png
Note: It is very important here that you use the same destination name. The picture name will still be the same as before (wlanprologo.png) but its content will be different. I tried to do it a different way by changing the configuration files of the NanoLED program, but it didn't work properly.
Then, you can reboot your WLAN Pi, you should see the new picture when the WLAN Pi boots.
Ideas
If you manage multiple WLAN Pi, you could also create a Python script that you could run on multiple WLAN Pi to speed up their configurations and customizations.
Please share how you like to customize yours!
Thank you for reading!
Written by François Vergès