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

    Show RetroPie version at logon

    Scheduled Pinned Locked Moved Ideas and Development
    blank line
    2 Posts 2 Posters 225 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

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

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

      1 Reply Last reply Reply Quote 0
      • mituM
        mitu Global Moderator
        last edited by

        You can use the existing retropie_welcome function as a starting point and modify it, showing the info your want, then uninstall the bashwelcometweak package so it won't be overwritten on upgrades.

        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.