Solved

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

Posted on 2015-01-05
7
517 Views
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
Yashy
0
Comment
Question by:Yashy
  • 3
  • 2
  • 2
7 Comments
 
LVL 53

Accepted Solution

by:
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:

http://www.macupdate.com/app/mac/11703/ip-in-menubar
0
 
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
http://applehelpwriter.com/2013/07/30/applescript-get-your-external-ip-address/

Code below courtesy of site link above
(*
script by Phil Stokes
www.applehelpwriter.com
*)
 
property theNext : ""
property theNetwork : ""
property theRouter : ""
property theLocalNode : ""
 
on getIP()
        try
                set myTemp to do shell script "mktemp -t txt"
                do shell script "curl -s http://checkip.dyndns.org &> " & 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"
                else
                        set theNetwork to extIP
                end if
        on error
                set theNetwork to "No connection"
        end try
end getIP
 
on getRouter()
        try
                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()
        try
                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
 
end
 
on getCopyItem()
        try
                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
                else
                        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
 
repeat
        try
                getRouter()
                getIP()
                getLocalNode()
                userInfo()
                if result = "Try Again" then
                        getIP()
                else if theNext = "Copy" then
                       
                        getCopyItem()
                        exit repeat
                       
                end if
               
        on error
                exit repeat
        end try
end repeat

Open in new window

0
 
LVL 1

Author Comment

by:Yashy
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
yashy
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 53

Expert Comment

by:strung
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.
0
 
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.
0
 
LVL 1

Author Comment

by:Yashy
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.
0
 
LVL 53

Expert Comment

by:strung
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.
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

If you get continual lockouts after changing your Active Directory password, there are several possible reasons.  Two of the most common are using other devices to access your email and stored passwords in the credential manager of windows.
OfficeMate Freezes on login or does not load after login credentials are input.
This Micro Tutorial will teach you the basics of configuring your computer to improve its speed. It will also teach you how to disable programs that are running in the background simultaneously. This will be demonstrated using Windows 7 operating…
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.

706 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

12 Experts available now in Live!

Get 1:1 Help Now