Raspberry Pi 400 Setup

I got my RasPi400 after weeks of delay. WEEKS! What is this, 1980? (I wish)

Keyboard is almost precisely the size & layout of the Apple Magic Keyboard, which is fine with me. The key travel's bad, like the lawsuit butterfly keyboard. I'm moderately unpleased with the keyboard touch, but it's definitely usable. I switch over here to my Magic Keyboard, and it's night and day in quality. Mouse is nice enough; it's not a hi-DPI gaming mouse, but it's a good workstation mouse. Aesthetics are fine, I'd prefer black to white, but the raspberry red highlights are pleasing.

It is so nice to have a really usable little computer in a keyboard again. Literally the best thing since the Atari 800 (and that cost $899 in 1980, $2,869.53 in 2021's inflated currency; this is 28x cheaper!).

I've grown accustomed to Raspberry Pi OS (née raspbian). It's still a lame linux, but they've mostly got pulseaudio working(!) after 20 years of it being not functional, wifi mostly stays up, the desktop environment isn't awful. It's no Mac OS X Tiger, but nothing is anymore. There's less complaining from me using it, than hours of playing sysadmin would cause.

Not RasPi's problem, but I got a new, overly large portable LCD for use with this, FANGOR 15.6"; it's basically impossible to find any LCD >7" but <15" which has a decent rez (1920x1080) and color reproduction; the random-Chinese-fake-company plastic 10" on my RasPi4 is just awful, the worst screen I've ever used. RasPi4 is now on my bookshelf, waiting to be moved into a closet where it will live forever as a headless server that I don't have to hear the fan whine.

Checklist

  • "Recommended software"
    • Keep: Geany, Mathematica, WolframAlpha, VNC Viewer
    • Currently errors when I try to remove LibreOffice, which is bullshit!
    • I don't use Claws Mail, I use webmail on the pi. I should install mutt or alpine. But if you like graphical mail, leave it.
    • Minecraft Pi is ridiculous, tiny world, creative mode only, tiny window you can't resize. Don't bother.
    • Remove everything else.
  • Remove the unremovable crap and like half an SD card of dependencies! (update 2022-02-03: Seems like these are no longer pre-installed, so that's better.)
    % sudo apt-get purge "libreoffice*"
    % sudo apt-get purge "scratch*"
    % sudo apt-get clean
    % sudo apt-get autoremove
    
  • Add/Remove Software: zsh, gauche, vim, media apps. (update 2022-02-03: zsh is now in /bin/zsh where it should be.)
    % sudo apt-get install zsh gauche vim mpv yt-dlp 
    % sudo apt-get install xscreensaver xscreensaver-data xscreensaver-data-extra
    % chsh pi -s /bin/zsh
    
  • Fix mouse scroll direction!
    % sudo vi /usr/share/X11/xorg.conf.d/40-libinput.conf
    
    Section "InputClass"
        Identifier "libinput pointer catchall"
        MatchIsPointer "on"
        MatchDevicePath "/dev/input/event*"
        Driver "libinput"
        # add this:
        Option "NaturalScrolling" "true"
    EndSection
    
  • Fix capslock to be ctrl:
    % sudo vi /etc/default/keyboard
    XKBOPTIONS="ctrl:swapcaps"
    

    Or ctrl:nocaps if you don't want any capslock, but I find it somewhat useful.

  • Create local user, not pi:

    % sudo adduser mdh
    % sudo usermod -aG sudo mdh
    
  • Disable auto-login: Raspi, Preferences, Raspi Configuration.

  • login as mdh

    % chsh mdh -s /bin/zsh
    % mkdir bin
    % mkdir tmp
    
  • Fix vim: How to Configure Vim

  • vi .profile:

    export EDITOR=vim
    export TMP="$HOME/tmp"
    export LESS="-C -i -M -g -e -y4"
    export PATH="$HOME/bin:$PATH"
    
  • vi .zshrc:
    umask 022
    
    unsetopt NOMATCH
    setopt APPEND_HISTORY
    setopt COMBINING_CHARS
    setopt EXTENDED_HISTORY
    setopt HIST_IGNORE_DUPS
    setopt HIST_REDUCE_BLANKS
    setopt INC_APPEND_HISTORY
    setopt INTERACTIVE_COMMENTS
    setopt NO_BANG_HIST
    setopt PROMPT_SUBST
    
    bindkey -e
    
    export HISTFILE=~/.zhistory
    export HISTSIZE=10000
    export SAVEHIST=$HISTSIZE
    
    autoload -U zmv
    autoload -U colors && colors
    export PS1="%{$fg[red]%}%n@%m:%~%#%{$reset_color%} "
    
    zmodload zsh/mathfunc
    zmodload zsh/regex
    
    function mcd() {
        mkdir -p "$1"
        cd "$1"
    }
    
    function cdcd() {
        while [ $# -gt 0 ]; do
            cd "$1"
            shift
        done
    }
    
    function hd() {
        hexdump -C "$1"|less
    }
    
    alias ..='cdcd ..'
    alias ...='cdcd ../..'
    alias ....='cdcd ../../..'
    alias .....='cdcd ../../../..'
    alias c='clear'
    alias grep='egrep'
    alias l='ls -FsCk'
    alias la='ls -FsCka'
    alias ll='ls -al'
    alias md='mkdir'
    alias rd='rmdir'
    alias sd='screen -d -r'
    alias v='vim'
    alias x='exit'
    
  • add menu to lock xscreensaver:

    % echo 'sleep 1; xscreensaver-command --lock' >bin/xscreensaver-lock.sh
    % chmod 755 bin/xscreensaver-lock.sh

    Then add that to your main menu (RasPi, Preferences, Main Menu Editor).

  • Reboot, should be nice now.

Outstanding Issues

  • No multimedia keys

2 thoughts on “Raspberry Pi 400 Setup”

  1. Does the manufacturer of the "the random-Chinese-fake-company plastic 10" on my RasPi4 is just awful" display begin with the letter 'E' and end with "lecrow"? I practically bought one every day for the past week but have just been dragging my feet. Can YOU save my bacon? ;(

    1. It does, but there's too many other brands selling the same unit. Avoid at all costs, pay the extra $50 or whatever for a tolerable screen.

Comments are closed.