[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
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
Medium Priority
?
952 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 1000 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 41

Assisted Solution

by:Eoin OSullivan
Eoin OSullivan earned 1000 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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 41

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

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

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

We could spend the next millennium discussing the differences of the Mac and Windows platforms. The next century will continue to have fanatics on both side of the equation and neither side will win the war. However, that’s not why we are here. W…
While there are many new features for iOS 11, these are the five that can improve your digital lifestyle.
This Micro Tutorial will teach you how to change your appearance and customize your Windows 7 interface to your unique preference. This will be demonstrated using Windows 7 operating system.
This Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Suggested Courses

872 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