See basic system information on the desktop

Apr 01, '09 07:30:03AM

Contributed by: marcpage

We have several machines that we remotely control, and it's nice to easily see what machine it is you're controlling, along with some basic system information.

To solve this problem, I use GeekTool, which allows me to display the output from shell commands on the desktop. Here is the shell command I use to post machine name, OS X version, amount of RAM, and processor information on the desktop:

system_profiler SPHardwareDataType SPSoftwareDataType | perl -e '@info= <>; $info= join("", @info);if($info=~m@[\r\n]+\s*Computer Name:\s*([^\r\n]+)[\r\n]+@) {print "$1\n";}if($info=~m@[\r\n]+\s*System Version:\s*([^\r\n]+)[\r\n]+@) {print "$1\n";}if($info=~m@[\r\n]+\s*Memory:\s*([^\r\n]+)[\r\n]+@) {print "$1\n";}if($info=~m@[\r\n]+\s*Total Number Of Cores:\s*([^\r\n]+)[\r\n]+@) {print "$1 x ";}if($info=~m@[\r\n]+\s*Processor Speed:\s*([^\r\n]+)[\r\n]+@) {print "$1 ";}if($info=~m@[\r\n]+\s*Processor Name:\s*([^\r\n]+)[\r\n]+@) {print "$1\n";}'
Enter this as a new GeekTool Shell command on each machine you connect to (and set the font and colors to your liking). When you then control those machines remotely, you'll see this information on the desktop.

[robg adds: This works as described. However, I strongly recommend that you change the Refresh setting to something huge (like 86400, which is 24 hours in seconds), as this information is static, and takes a second or two to generate. You don't want GeekTool to be running this process over and over when the information is rarely going to change.]

Comments (6)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20090330084409707