Mac System info on your desktop

There are a small handful of windows apps that I think are pretty useful and don’t have better Mac equivalents. bginfo_ss.jpg BgInfo is one of these. It used to be an independent freeware app, but microsquish thought it was cool enough to acquire – at least it’s still free (for now). What is does is simple: it aggregates a bunch of different bits of information about the system it’s running on and merges it with the desktop background. This may not seem very useful to most people since most people only use one or two different computers and don’t really care about things like their Default Gateway or MAC Address. However, for those who work in a dev/IT environment where they switch between a bunch of different machines or better yet, have a lab of boxes that they don’t use regularly – this is extremely handy.

Now I could not find a utility that does what BgInfo does for the Mac – at least not specifically. Then I remembered about GeekTool. GeekTool is the Shopsmith to BgInfo’s hand drill. I plan to write another post dedicated to Mac utilities where I’ll go into more detail on GeekTool, but for now we’ll just get started. If you know of something else that does what BgInfo can do on the Mac, please let me know – I’m not totally addicted to big hammers.

Here’s what you do:

  • Install GeekTool
  • Paste the following ruby code into a text file and save it somewhere like ~/scripts or ~/Library/Scripts as sys_info.rb:
@user = `whoami`
@system = `scutil --get ComputerName`
@ip = (`ifconfig en0 | grep netmask`).split
@vers = (`sw_vers | grep ProductVersion`).split
@hw_info = `system_profiler`
@up = (`uptime`).split(',')
if @vers[1].include?('10.5')
  @hw_name = 'Processor Name'
  @hw_speed = 'Processor Speed'
  @hw_name = 'CPU Type'
  @hw_speed = 'CPU Speed'
puts "User: #{@user}"
puts "Computer: #{@system}"
puts "IP: #{@ip[1]}"
puts "OS Version: #{@vers[1]}"
puts @hw_info.grep(/#{@hw_name}/).to_s.strip
puts @hw_info.grep(/#{@hw_speed}/)[0].to_s.strip
puts @hw_info.grep(/Memory:/)[0].to_s.strip
puts "Uptime: #{@up[0].strip}"
  • Open the GeekTool preference pane and add a new entry. Select Shell from the pop-up menu.


  • In the Command box, enter: ruby ~/scripts/sys_info.rb (change to your path and file name)
  • Set the refresh for 300
  • Now you should see a box somewhere on your desktop and it should have 8 lines of juicy info.
  • Play with the other tabs to set the font style and background.
  • You can drag and resize the box to wherever you like.

I know this works on OS X Tiger and Leopard and it should work fine on Panther. BTW – GeekTool works great on Leopard.
If you have any suggestions, changes or additions to this, please share.

Previous Next

15 Comments (+add yours?)

  1. mark vereb
    Feb 02, 2009 @ 14:52:00

    Nice idea, but no go, any ideas??

  2. adam
    Apr 19, 2009 @ 13:22:13

    Hi Matt, I’m not much of a coder like your self but was wondering if you knew how to get this script to connect to a database, i managed this on the pc with BGinfo and a vb-script to communicate with the database, i would love this to work on the Macintosh.

    VB Script:


  3. adam
    Apr 19, 2009 @ 13:23:59

    VBSCRIPT – Adam
    strConnection = “Provider=sqloledb;Data Source=”ComputerName”;Initial Catalog=labmanagerdev;User Id=labmgrsql;Password=masseyo”

    strStatus = “No status available!”

    set conn = CreateObject(“ADODB.Connection”)

    set results = CreateObject(“ADODB.Recordset”)

    conn.ConnectionString = strConnection


    Query = “Select notice from service_announcement”

    set results = conn.Execute(Query)

    if not results.eof then

    strStatus = results(0)

    end if


    echo strStatus


  4. adam - Geektool not working?
    Apr 19, 2009 @ 14:59:04

    Hey Mark, its a little Buggy but it now works when you change the file to an unix executable file via Mac Terminal (Bash).

    Type the following:

    Chmod 755 /users/admin/sys_info.rb


  5. matt
    May 18, 2009 @ 18:51:50

    > Hey Mark, its a little Buggy but it now works when you change the file to an unix executable file via Mac Terminal (Bash).

    > Type the following:

    > Chmod 755 /users/admin/sys_info.rb

    Doh! I forgot about setting permissions. Thanks Adam!

  6. matt
    May 18, 2009 @ 18:58:25

    Adam – I would suggest using ruby and MYSql. You could also use sqlite. sqlite comes with OS X and MYSql is an easy install. I found some decent instructions for getting it all setup with MYSql here ( Let me know if you need any help with the ruby code.

  7. Ambrose Neville
    Jun 25, 2009 @ 05:40:32

    Hi there

    I’m running Geektool 2.1.2 on a 10.5.7 Intel Mac.

    I’ve followed the instructions to create the ruby script and also used Chmodded the file to 755, but but am not getting any text in the output box at all.

    Any suggestions as to something I might have missed?

    Thanks in advance

  8. Ambrose Neville
    Jun 25, 2009 @ 07:19:46

    Solved my own problem by creating the .rb file with a different text editor, so please ignore the above!

  9. matt
    Jun 25, 2009 @ 13:16:00

    Ambrose – Well done!

    I really like TextMate as a programming editor. See my recent post on Mac apps for more details.


  10. Allan Der
    Sep 22, 2009 @ 08:03:16

    Thanks, works great! Now when I ask the user what computer there at, they can tell me. (They remove the asset tag labels and can’t find there IPs.)

  11. Bendigo Boy
    Oct 05, 2009 @ 17:53:28

    Hi Matt,

    One of the advantages of BGInfo is the native ability to export this data to a predefined .XLS spreadsheet.

    I know Adam had mentioned this to a database, what script would be used to output to a .XLS?

    Any help apprecaited.

  12. WilsonSZ
    Apr 12, 2012 @ 13:24:52

    Has anyone revisited this in the past two years? I’d love to get it
    working in Lion (10.7.3, as of this writing) with GeekTool 3.0.3 but
    I’ve had no success so far. Cannot get any text to output to the
    Geeklet box at all. Have chmod-ed the ruby script as per comments
    above but no dice. Any suggestions? Thoughts?

  13. LachlanB
    May 16, 2012 @ 22:08:36

    Have it working on 10.7.4 fine.

    The gotcha I came across was that if your desktop wallpaper is black the text by default is black as well so you cannot see it.

    Change your text font to white and all is well.

  14. James
    Dec 03, 2012 @ 10:11:19


    Did you get it to work? I’m trying now and would love it if someone had a solution for Lion/Mountain Lion and geek tool 3.0.3.


  15. Ian Bauters
    Apr 17, 2013 @ 23:52:53

    Great post! Have been looking for this for quite some time!
    Now, can you please help me with this?
    I’d like to see my WiFi and Ethernet MAC address on there too but I have no idea how to do so.
    Hope you can help me!

Leave a Reply