RetroPie forum home
    • Recent
    • Tags
    • Popular
    • Home
    • Docs
    • Register
    • Login
    Please do not post a support request without first reading and following the advice in https://retropie.org.uk/forum/topic/3/read-this-first

    Bash Welcome Tweaking

    Scheduled Pinned Locked Moved Help and Support
    bash welcome
    5 Posts 3 Posters 4.8k 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.
    • V
      Vaulcul
      last edited by Vaulcul

      Hi!

      I've been looking around and have not found much information on tweaking the Bash Welcome message.

      I've found that I can tweak the screen a little bit if I change the information in
      /RetroPie-Setup/scriptmodules/supplementary/bashwelcometweak.sh
      AND
      /.bashrc

      I've succesfully made changes to these files... but the area I was trying to change, only created blank spaces and did not output the desired information.

      What I'm trying to do is edit the Welcome Screen to look something like this (note the added 2 lines about /dev/sda1 and /dev/sda2:

           .***.     Monday,  5 September 2016, 06:01:38 PM
           *****     Linux 4.4.13-v7+ armv7l GNU/Linux
           `***'
            |*|      Filesystem      Size  Used Avail Use% Mounted on
            |*|      /dev/root        30G  5.0G   24G  18% /
          ..|*|..    /dev/sda1	1.8T 481G  1.3T 27%  /mnt/ROMS
        .*** * ***.  /dev/sda2	3.9G 2.1G  1.6G 56%  /mnt/SWAP
        *******@@**  Uptime.............: 0 days, 18h04m55s
        `*****@@**'  Memory.............: 40508kB (Free) / 752872kB (Total)
          `*******'  Running Processes..: 141
            `"""'    IP Address.........: 192.168.1.104
      	       Temperature........: CPU: 69°C/156°F GPU: 69°C/156°F
      	       The RetroPie Project, https://retropie.org.uk
      

      As I said, I got the display to place blank spaces where this information should be... and I think I've figured out how to get the information... I just don't know how to actually display the information.

      To get my blank lines I added the following, updating the following code as necessary :

              3)
                  out+="${fgylw}${df_out[0]}"
                  ;;
              4)
                  out+="${fgwht}${df_out[1]}"
                  ;;
              5)
                  out+="${fgylw}${df_out[8]}"
                  ;;
              6)
                  out+="${fgwht}${df_out[9]}"
      

      But, my new data appears blank and the last two lines of the data (Temp and Project Link) disappear.

      What am I doing wrong? How can I get this to work?

      Thanks much in advance.

      V 1 Reply Last reply Reply Quote 0
      • V
        Vaulcul @Vaulcul
        last edited by

        Anyone?

        1 Reply Last reply Reply Quote 0
        • C
          ceedub
          last edited by

          In /.bashrc, around line 142
          local df_out=()
          local line
          while read line; do
          df_out+=("$line")
          done < <(df -h)
          should look like that. still can only have so many lines though, might have to delete something.

          V 1 Reply Last reply Reply Quote 0
          • V
            Vaulcul @ceedub
            last edited by

            @ceedub Awesome! Thanks! Too bad there's a line limit... seems so... 1980s... :p

            1 Reply Last reply Reply Quote 0
            • suprjamiS
              suprjami
              last edited by

              As you can see, it just iterates over the number of lines in the logo array: for i in "${!logo[@]}"; do

              And the logo array has 10 lines, so only 10 lines will be printed:

              168     local logo=(
              169         "${fgred}   .***.   "
              170         "${fgred}   ***${bfgwht}*${fgred}*   "
              171         "${fgred}   \`***'   "
              172         "${bfgwht}    |*|    "
              173         "${bfgwht}    |*|    "
              174         "  ${bfgred}..${bfgwht}|*|${bfgred}..  "
              175         "${bfgred}.*** ${bfgwht}*${bfgred} ***."
              176         "${bfgred}*******${fggrn}@@${bfgred}**"
              177         "${fgred}\`*${bfgred}****${bfgylw}@@${bfgred}*${fgred}*'"
              178         "${fgred} \`*******'${fgrst} "
              179         "${fgred}   \`\"\"\"'${fgrst}   "
              180         )
              

              Assuming you've renumbered the out loop from 1 to 12 so that it ends:

              220             12)
              221                 out+="${fgwht}The RetroPie Project, https://retropie.org.uk"
              222                 ;;
              

              Just add two more lines to the logo with the correct spacing:

              180         "           "
              181         "           "
              182         )
              

              Now it works fine:

              pi@retropie:~ $ source .bashrc
              
                   .***.     Sunday, 18 September 2016, 10:39:06 PM
                   *****     Linux 4.4.13-v7+ armv7l GNU/Linux
                   `***'     
                    |*|      Filesystem      Size  Used Avail Use% Mounted on
                    |*|      /dev/root        59G   14G   43G  24% /
                  ..|*|..    Bachelor Chow
                .*** * ***.  Now with flavor!
                *******@@**  Uptime.............: 9 days, 18h56m29s
                `*****@@**'  Memory.............: 28872kB (Free) / 752872kB (Total)
                 `*******'   Running Processes..: 125
                   `"""'     IP Address.........: 192.168.1.202
                             Temperature........: CPU: 54°C/129°F GPU: 54°C/129°F
                             The RetroPie Project, https://retropie.org.uk
              

              Learn bash scripting and you can do many things on Linux :) http://tldp.org/LDP/Bash-Beginners-Guide/html/index.html

              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.