Show RetroPie version at logon
-
This is both a feature request and a how to (for adding the feature).
I know I can always find the version with $ less /opt/retropie/VERSION
but I would like to see it whenever I log on directly or via ssh the same as the date, linux version, BLANK LINE, filespace, uptime, memory, processes, IP and tetmperatures pops up.So I looked at the existing /home/pi.bashrc and saw that the BLANK LINE is produced from a case function at position 2 (which is not in use). All that is required is to earlier create a temporary variable, read /opt/retropie/VERSION into a it, then output that in the loop.
Here's how - in /home/pi/.bashrc add these lines (around line # 140) -
After local UPTIME=$(printf "%d days, %02dh%02dm%02ds" "$days" "$hours" "$mins" "$secs") add
# Read the retropie version into a temporary variable (it is stored as a single line)
local RPVER
read -r RPVER < /opt/retropie/VERSIONAnd at ~ line # 220, after
1)
out+="${fgcyn}$(uname -srmo)"
;;Add an extra case for the value '2' to print the temporary variable -
2)
out+="${fgpur}RetroPie Version ${RPVER}"
;;Works great, but .bashrc gets overwritten in every upgrade so I have to re-edit it :( so how about including it in the standard releases?
The fact that there is a spare BLANK LINE right after the linux version suggests that the RetroPie version MAY at one time have been shown here.
If it is possible to find the RetroArch version it would be good to print that on the same line too.
bye.
-
You can use the existing
retropie_welcome
function as a starting point and modify it, showing the info your want, then uninstall thebashwelcometweak
package so it won't be overwritten on upgrades.
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.