RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login

    Add pi model and RetroPie version number to Shell start messages

    Scheduled Pinned Locked Moved Ideas and Development
    feature request
    2 Posts 2 Posters 269 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • B
      bgennette
      last edited by

      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/VERSION

      And 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.

      1 Reply Last reply Reply Quote 0
      • LolonoisL
        Lolonois
        last edited by

        Nice idea.
        I formalized your approach a little by utilizing an extra scriptmodule bashwelcomeextra.sh, which will also "survive" updates of the RetroPie-Setup.

        With that the banner looks like this (some info redacted):

        bashwelcomeextra.jpg

        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

        1 Reply Last reply Reply Quote 0
        • First post
          Last post

        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.