Add pi model and RetroPie version number to Shell start messages
-
The pi shell startup text gives OS, file system, processes, IP address and more when a terminal starts up, but not the pi model or RetroPie versions in use. These are very useful for deciding when to look for updates.
I manually add these to /home/pi/.bashrc but they get over written each upgrade. Could the maintainer include them in the standard /home/pi/.bashrc ? Please.Here's how I do it -
Use $ nano /home/pi/.bashrc add these lines (around line # 130 / 140) -
After local UPTIME=$(printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs")
add -
# Read the pi & retropie version into temporary variables
local PIVER
read -r PIVER < /sys/firmware/devicetree/base/model
local RPVER
read -r RPVER < /opt/retropie/VERSIONAnd at ~ line # 200, after
1)
out+="${fgcyn}$(uname -srmo)"
;;Add an extra case for the value '2' to print the temporary variables -
2)
out+="${fgpur}${PIVER} running RetroPie Vr ${RPVER}"
;;then ^X Y <Enter> to save it.
-
Nice idea.
I formalized your approach a little by utilizing an extra scriptmodulebashwelcomeextra.sh
, which will also "survive" updates of the RetroPie-Setup.With that the banner looks like this (some info redacted):
INSTALLATION
On RetroPie shell as user pi:
cd RetroPie-Setup mkdir -p ext/local/scriptmodules/supplementary pushd ext/local/scriptmodules/supplementary wget -O bashwelcomeextra.sh https://gist.githubusercontent.com/Gemba/bc41f9b2570486b855d6bfa57b3cbdc5/raw/d03b9f101212a0acb37d8750f9006f8639fcc54e/bashwelcomeextra.sh popd # remove genuine scriptmodule and install this one sudo ./retropie_packages.sh bashwelcometweak remove sudo ./retropie_packages.sh bashwelcomeextra install # both modules can also be found in the RetroPie-Setup UI in the Configuration/Tools section # relogon to test or source ~/.bashrc
Or see gist there
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.