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
602 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
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

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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

New Windows 7 Installations take days for Windows-Updates to show up and install. This can easily be fixed. I have finally decided to write an article because this seems to get asked several times a day lately. This Article and the Links apply to…
You may have a outside contractor who comes in once a week or seasonal to do some work in your office but you only want to give him access to the programs and files he needs and keep privet all other documents and programs, can you do this on a loca…
Windows 8 comes with a dramatically different user interface known as Metro. Notably missing from the new interface is a Start button and Start Menu. Many users do not like it, much preferring the interface of earlier versions — Windows 7, Windows X…
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…

825 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