How to get IP addresses to display on Mac desktop/background? Same as how VNC works on PC's?

Posted on 2015-01-05
Last Modified: 2015-01-08
hi guys,

We have upgraded a lot of our Macs to the new Yosemite version. However, we would like their IP addresses to be displayed on the background so that when we want to remotely access them, we can ask the user to give them to us and proceed instead of the painstaking 'please go to system preferences-?network-..etc'.

Do you guys know of any applications that do this? On Windows we use Ultra-VNC and it works perfectly.

Thank you
Question by:Yashy
  • 3
  • 2
  • 2
LVL 53

Accepted Solution

strung earned 250 total points
ID: 40531846
I haven't tried it, but this free utility purports to display the IP address in the menubar:
LVL 39

Assisted Solution

by:Eoin OSullivan
Eoin OSullivan earned 250 total points
ID: 40531855
One option is to create a little AppleScript .. Open a new script file in Script Editor on OSX .. paste in the code below and save it as an Application and put it on all users desktops .. they double click and the app will show their network IP address .. you can customise the script to just show LAN IP address if you want

Code below courtesy of site link above
script by Phil Stokes
property theNext : ""
property theNetwork : ""
property theRouter : ""
property theLocalNode : ""
on getIP()
                set myTemp to do shell script "mktemp -t txt"
                do shell script "curl -s &> " & myTemp & " &2> /dev/null"
                # CHANGE THE DELAY HERE…             
                delay 3
                set extIP to do shell script "sed 's/[a-zA-Z/<> :]//g' " & myTemp
                if extIP = "" then
                        set my theNetwork to "No connection"
                else if extIP contains "=" then
                        set theNetwork to "Can't get IP"
                        set theNetwork to extIP
                end if
        on error
                set theNetwork to "No connection"
        end try
end getIP
on getRouter()
                set oldDelims to AppleScript's text item delimiters
                set AppleScript's text item delimiters to "gateway:"
                set theGateway to do shell script "route get default | grep gateway"
                set AppleScript's text item delimiters to oldDelims
                set theRouter to the last word of theGateway
        on error
                set my theRouter to "No connection"
        end try
end getRouter
on getLocalNode()
                set theIP to (do shell script "ifconfig | grep inet | grep -v inet6 | cut -d\" \" -f2")
                set theLocalNode to the last word of theIP
        on error
                set theLocalNode to "Can't get Local IP"
        end try
end getLocalNode
on getCopyItem()
                set theList to {"Router", "Local IP", "External IP"}
                choose from list theList with prompt "Choose an item to copy:"
                set myResult to (item 1 of the result)
                if myResult = "Router" then
                        set the clipboard to theRouter
                else if myResult = "Local IP" then
                        set the clipboard to theLocalNode
                        set the clipboard to theNetwork
                end if
        end try
end getCopyItem
on userInfo()
        display dialog "Router: " & theRouter & return & return & "Local IP: " & theLocalNode & return & return & "External IP: " & theNetwork buttons {"OK", "Copy", "Try Again"} cancel button {"OK"} with title "Your IP addresses" default button "Try Again"
        set theNext to the button returned of the result
        return result
end userInfo
                if result = "Try Again" then
                else if theNext = "Copy" then
                        exit repeat
                end if
        on error
                exit repeat
        end try
end repeat

Open in new window


Author Comment

ID: 40535540
Thank you guys for the feedback. Great script there Eonio, thank you

I have a question though. Is there any way that either of these could automatically run?

I've got the Macs on the domain and when you look at the users, they have the 'login items'. However, is there a way to make this happen for global users instead of having to logon as the user, go to Login items and select a script or application to run? Is there a way to make it run globally for all users?

thanks again
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

LVL 53

Expert Comment

ID: 40535554
I would be surprised if the utility that I recommended did not run automatically. The installer for menubar items usually sets them to run automatically by default.
LVL 39

Expert Comment

by:Eoin OSullivan
ID: 40535586
If the application is added as a login item it will automatically run on login .. no need to manually run it .. but it can be run manually too on demand if you want by putting the app in the Dock or putting it on the Desktop.

Author Comment

ID: 40537610
I downloaded the Ipmenubar application. However, I ran it and it opens up fine. But it doesn't install really. It runs as an executable when you double click on it, but once you restart the machine and come back on, it's no longer there.
LVL 53

Expert Comment

ID: 40537642
To get it to run automatically, do the following:

1. Save it to the Applications Folder.
2. Double click on it to open in and click Yes on the popup about applications downloaded from the internet.
3. Go to the System Prefs to Users & Groups.
4. If the padlock on the lower left is locked, click on it to unlock it.
5. Click on the Login Items tab.
6. Click on the + sign at the bottom left of the Login Items window and browse to and add the IPMenu app.
7. Restart the computer. The IPMenu item should appear in the menubar.

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

iCloud Drive was introduced after iOS 8 was launched last year. This drive is Apple’s online storage device that lets users sync their files and access them from all their Apple devices.   There is a lot of data that is not automatically backed up…
On some Windows 7 (SP1) computers, Windows Update becomes super slow even the computer is reasonably fast.  There's one solution that seemed to have worked well for me (after trying a few other suggested solutions).
In this Micro Tutorial viewers will learn how to use Boot Corrector from Paragon Rescue Kit Free to identify and fix the boot problems of Windows 7/8/2012R2 etc. As an example is used Windows 2012R2 which lost its active partition flag (often happen…
This Micro Tutorial will give you a basic overview of Windows DVD Burner through its features and interface. This will be demonstrated using Windows 7 operating system.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now