RetroPie SSH MOTD Banner
-
When connecting to the RetroPie through SSH, it shows a Message of the Day (MOTD) banner with statistics:
Filesystem Size Used Avail Use% Mounted on
/dev/root 30G 5.0G 23G 18% /
Uptime.............: 0 days, 01h24m47s
Memory.............: 577524kB (Free) / 752876kB (Total)
Running Processes..: 117
IP Address.........: X.X.X.X
Temperature........: CPU: 41°C/105°F GPU: 41°C/105°FHow can this be edited? I've looked in a few traditional locations:
/etc/motd
/etc/issues
/etc/issues.netAlso looked in crontab to see if there was a script that runs to update this. I can't seem to find anything. I'd like to see about adding additional location like number of ROMs found. Thanks!
-
@fahrenheit this is the retropie_welcome. Look at
$HOME/.bashrc
.;-)
-
Excellent, that's it! Thanks!
-
In case anyone is interested, I added additional code to the .bashrc script that lists the number of ROMs available for each platform. It's a little manual; you have to edit the code to look into each rom folder. However, now I ssh in and can see how many ROMS exist.
I modified ~/.bashrc from:
$(tput setaf 7) The RetroPie Project, https://retropie.org.uk $(tput sgr0)" } retropie_welcome # RETROPIE PROFILE END
To (updated):
$(tput setaf 7) The RetroPie Project, https://retropie.org.uk $(tput setaf 1)ROMS: Sega.....: $(ls /home/pi/RetroPie/roms/mastersystem/*.{sms,sg} | wc -l) NES......: $(ls /home/pi/RetroPie/roms/nes/*.{nes,unf} | wc -l) Genesis..: $(ls /home/pi/RetroPie/roms/genesis/*.bin | wc -l) SNES.....: $(ls /home/pi/RetroPie/roms/snes/*.{smc,fig} | wc -l) NeoGeo...: $(ls /home/pi/RetroPie/roms/fba/*.{zip,fs} | wc -l) $(tput sgr0)" } retropie_welcome # RETROPIE PROFILE END
I'm sure someone knows of a better way to do this programmatically, but this meets my needs.
http://he1t.net/support/retropie_ssh_roms.png -
@fahrenheit
you can give several arguments to the ls.
Is there a reason to use those "&&" conditionals? -
I wasn't sure how to list multiple types of file extensions. Looks like it can be accomplished with:
ls /home/pi/RetroPie/roms/mastersystem/*.{sms,sg} | wc -l
Cool, I'll change that...thanks again!
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.