Skip to content

Instantly share code, notes, and snippets.

@kyle-west
Last active April 2, 2023 19:47
Show Gist options
  • Save kyle-west/f78abc095438236238ee9ba34bfb7e24 to your computer and use it in GitHub Desktop.
Save kyle-west/f78abc095438236238ee9ba34bfb7e24 to your computer and use it in GitHub Desktop.
Set up RaspberryPi for first time. These are all the steps I take to initialize my Pi the way I like it. It's opinionated. Use it if you want, at your own risk. I have it public so that I can find it without login.

Require Login

sudo nano /etc/lightdm/lightdm.conf

Make sure these two pieces are set/unset:

greet-hide-users=false
...
#auto-login-user=pi

then reboot

Appearance

Fonts

Download

cd ~/Downloads # or wherever you downloaded to

mkdir -p ~/.fonts/Ubuntu;
mkdir -p ~/.fonts/Inconsolata;
unzip Ubuntu.zip -d ~/.fonts/Ubuntu;
unzip Inconsolata.zip -d ~/.fonts/Inconsolata;

fc-cache -v -f

Desktop

Right click on desktop to change background. If you don't have time to find one online, the aurora.png file looks great. Also:

  • Menu Bar >> Change color to darkest purple and white for text
  • System >> Change font to Ubuntu Regular 12

Open panel preferences:

  • change location to bottom
  • size to Large (32x32)
  • panel height to 44px
  • Panel Applets >> Add Spacer on both sides of "Task Bar"

Terminal

Edit >> Preferences:

  • Style >> font: Inconsolata Rgular 14
  • Display >> Size: 100x30, Scrollback lines: 10000

bash environment

Got to GitHub.com and get a new PAT

echo "machine github.com" >> ~/.netrc;
echo "login {{PERSONAL_ACCESS_TOKEN}}" >>  ~/.netrc;
git config --global user.name "Your Name";
git config --global user.email "[email protected]";
git config pull.rebase true;

Install Node

# install fast node manager
curl -fsSL https://fnm.vercel.app/install | bash;
source ~/.bashrc; # needed for using immediately 

# install Node16
fnm install 16;
fnm use 16;

Set up rc stuff, this is from my own .dotfiles repo (private) so replace this part with your own.

cd ~ # start in the home directory;
git clone https://github.com/kyle-west/.bash_custom.git; # download
cd ~/.bash_custom;
git switch pi;
cd ~;
bash ~/.bash_custom/.install.sh; # install
mkdir ~/dev

Additional Programs

Spotlight replacement

https://github.com/kyle-west/power-prompt.pi

Hold off on the keybindings parts, we will do that later

Editor

VS Code: https://code.visualstudio.com/docs/setup/raspberry-pi

sudo apt-get install code

Others

sudo apt-get install gnome-dictionary

Keybindings

sudo apt install xbindkeys
nano ~/.xbindkeysrc
# open PowerPrompt.pi
"python ~/.power-prompt.pi/main.py"
control+space

# lock the computer
"dm-tool lock"
control+alt+q

# fix vscode issue with min-max controls
"echo;"
shift+alt+down
"echo;"
shift+alt+up

Activate by running xbindkeys again.

@kyle-west
Copy link
Author

kyle-west commented Apr 2, 2023

Optionally, you can modify the splashscreen image. Here is what I do for mine:

cd /usr/share/plymouth/themes/pix
sudo mv splash.png splash.png.bk
sudo cp ~/Downloads/splash.png ./splash.png

https://user-images.githubusercontent.com/18150457/229371518-ce7b3d68-7869-4d9c-bbf0-d1fda4e18a4c.png

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment