Oct 08, '13 07:30:00AM • Contributed by: MacManager
sudo defaults write /Library/Preferences/com.apple.RemoteManagement VNCAlwaysStartOnConsole -bool true
Let VNC viewers connect to currently logged in user
Oct 08, '13 07:30:00AM • Contributed by: MacManager
Want to connect with the currently logged in user when using a VNC viewer rather than seeing the Login Window (ARD 3.5/OS X 10.7 and later)?
Find devices connected to your AirPort base station without AirPort Utility 5.6
Aug 21, '13 06:35:00AM • Contributed by: LexFriedman
AirPort Utility 5.6 could show you all the devices connected to your AirPort base station—wired and wireless alike. AirPort Utility 6.x, however, only lists devices connected to your base station over Wi-Fi. There’s no way to use the app to list off the IP addresses and names of devices plugged directly into the base station.
You can stil grab the old version of the utility from Apple, though you need a little help to install the app on Mountain Lion, since the installer (falsely) reports that AirPort Utility 5.6 is incompatible with Mac OS X 10.8.
But while you can force AirPort Utility 5.6 to install on Mountain Lion, there’s no guarantee that the app will continue to work on OS X 10.9 Mavericks or beyond. So if you want to find the IP addresses of other devices connected directly to your base station, you might prefer another option.
There are several.
In Terminal, you can use the
Those apps will, if possible, list off friendlier device names (in addition to IP addresses) than
How to set up a Mac as a PXE boot server, with Debian Live
Jun 28, '13 07:30:00AM • Contributed by: edxley
Here is how to set up a Mac, running OS X Client 10.5 or later, as a PXE boot server. We will configure OS X's built-in DHCP, TFTP, and NFS servers, start the servers, and put the client boot files in place. (The NFS server may be optional, depending on the operating system we are booting.)
You'll need the Mac, a PXE-capable PC, and an ethernet cable. Some steps will require being logged in as an administrator on the Mac.
We'll boot Debian Live on the client PC as an example. We'll show a regular setup with NFS, an alternate setup without NFS, and how to uninstall.
Regular setup (with NFS):
Alternate setup (no NFS):
This is a shorter method, because NFS is not required. Debian Live will download its root filesystem over TFTP. (However, the largest file that can be downloaded is limited by a bug.)
Password managers are a good thing, as they encourage you to maintain strong passwords. Just the sort of thing you’d want if you were opening every port on every computer on your enterprise network. Unfortunately, Juniper doesn’t see it this way. This can be resolved with some crafty scripting.
First, we need a scripting addition called Useable Keychain Scripting. Download it and copy it to /Library/Scripting Additions. You'll need to type your password to do this.
Next, you need to be able to connect to your VPN, so do this, then disconnect. Network Connect should retain the address of your server (e.g. https://vpn.example.com).
Now create a password item for the server (https://vpn.example.com), and grant access to Usable Keychain Scripting. Or not, your call.
Now fire up the script. It will get the address of the server from Network Connect, get your username and password from Keychain Access, and log you in.
Modified from https://github.com/seanfisk/juniper-network-connect-vpn-applescript:
property appName : "Network Connect" on main() tell application "Network Connect" if connected then sign out delay 5 quit else tell application "System Events" -- Recover the name of the VPN from Network Connect. set myAddress to value of combo box 1 of group 2 of tool bar 1 of window appName of application process appName set ASTID to AppleScript's text item delimiters set AppleScript's text item delimiters to "://" -- Get just the server address set vpnName to (text items 2 through -1 of myAddress) as text set AppleScript's text item delimiters to ASTID end tell tell application "Usable Keychain Scripting" to tell current keychain -- Recover the username and password from the login keychain set myPass to password of first internet password whose name contains vpnName set myAccount to account of first internet password whose name contains vpnName end tell connect to vpnName delay 5 tell application "System Events" -- enter the account name and password in the dialog box and click 'Sign In" set value of text field 1 of group 7 of UI element 1 of scroll area 1 of window appName of application process appName to myAccount of set value of text field 1 of group 10 of UI element 1 of scroll area 1 window appName of application process appName to myPass click button "Sign In" of group 14 of UI element 1 of scroll area 1 of window appName of application process appName end tell -- Could launch an application here if it's scriptable. return end if end tell end main main()Lex adds: I haven't tested this one.
A reader at Stack Exchange asked an interesting question about whether it was possible to set up an "airplane mode" for OS X. The idea was to ensure that there is no network activity through any possible network interfaces.
It's actually pretty simple to do this. If you go to the Network pane of System Preferences, you'll see a Location popup menu at the top of the window. Click on that menu and choose Edit Locations. Click on the + icon to add a new location, then enter a name, such as AirplaneMode. Click on Done.
Next, choose that location in the Location menu, and click on each available network interface in the list at the left of the window. Click on the Configure iPv4 menu, and choose Off. For Wi-Fi, just click on the Turn Wi-Fi Off button. Click Apply, and this location will block all network activity.
To activate the location, there are two ways. You can click on the Apple menu, then Location, and choose the location. Or, if you wish to do this from the command line, as the poster had requested, you can run this command:
networksetup -switchtolocation AirplaneMode
Replace AirplaneMode with the name you've chosen for the location.
Using airplane mode can be useful if you're worried about security when using a laptop in public places. It can also save battery power, as Wi-Fi will go off, and your Mac will no longer search for networks.
You can find out which wi-fi networks a Mac has connected to by going to the Network preference pane, then clicking on Advanced, then on the Wi-Fi tab; they'll be listed in Preferred Networks. But if you want to do this from Terminal - say for a Mac you've connected to via ssh - this hint, posted on OS X Daily, can do it as well: The list will be the same as that in Preferred Networks, and you can't alter it, but it my be useful in some situations.
When managing a server at work, I noticed my home server was showing up in the list of managed servers. Trying to see if I could connect by supplying my credentials was unsuccessful. I figured it must be showing up because I had signed into the same iCloud account on both machines. I then wondered if using the Back to My Mac URL for iCloud would allow me to connect.
To test, in Server.app I selected Manage > Connect to Server... From there chose "Other Mac." For the Hostname I inserted the Back to My Mac URL in the form server.XXXXXXXX.members.btmm.icloud.com. (see this hint to find how to construct the correct URL for your Mac), supplied my credentials and clicked Connect. The remote server came right up and I was able to manage my home server with no issues.
Option-click Airport menu to launch Wi-Fi Diagnostics
Sep 06, '12 07:30:00AM • Contributed by: gabester
A hint last year mentioned Wi-Fi Diagnostics, an application hidden in /System/Library/CoreServices. It turns out that you can also access this by Option-clicking the AirPort menu in your menubar and choosing Open Wi-Fi Diagnostics.
[kirkmc adds: This was available under Lion, but wasn't in the original hint, so it's worth posting.]
Remotely connect to a Mac via SSH using iCloud's network
Aug 10, '12 07:30:00AM • Contributed by: Anonymous
If you're running two Macs with iCloud support (Lion or Mountain Lion), then you can use iCloud's network to remote SSH back into your home computer no matter where you are with just a few commands in Terminal.
The process is explained by the One Thing Well blog, but you need to set up a few things before you get started. First, you need to make sure Back to My Mac is enabled in iCloud (System Preferences > iCloud > Back to My Mac). Next, you need to set up your home computer for sharing if it isn't already. Head to System Preferences > Sharing and turn on at least File Sharing and Remote Login. With everything set, you can now remotely log in to your home computer using iCloud's network wherever you have internet access.
To start with, you need to do is find your Back to My Mac account number. In Terminal (Applications > Utilities), type:
dns-sd -EThe final nine digit number is your Back to My Mac account number. Next, it's time to SSH into your other machine:
ssh -2 -6 username@computer-name.[account number].members.btmm.icloud.comIf you don't know your username or computer name, head to System Preferences > Sharing on the destination computer and click on Remote Login. Your Computer name is listed at the top (if it's multiple words use the address with the dashes). Your username is listed on the line below Remote Login right before the @ symbol. You will need to do this before you try to SSH into your computer when you're away.
With that, you should have access to your Mac no matter where you are. Head over to One Thing Well for a few more tricks and shortcuts for using the iCloud network to remote SSH.
[kirkmc adds: I haven't tested this.]
I came across this Apple technical note this morning, which describes how to flush the DNS cache on your Mac. We have a hint for 10.5, which is also valid for 10.6, but we're not up to date.
So, as a reminder, to flush the DNS cache in Mac OS X 10.5 and 10.6, run this command in Terminal:
sudo dscacheutil -flushcacheTo do the same in 10.7 and 10.8, run this command:
sudo killall -HUP mDNSResponderAs Apple points out, you might need to do this in the following situation:
"OS X keeps a local cache of resolved DNS queries for a time defined by the DNS server, but sometimes it may be necessary to reset the cache immediately and re-query a DNS server. For example, you might do this after an entry on the server is changed or a new entry is added."
From our Sponsor...
Latest Mountain Lion Hints
Hints1 new Hints in the last 24 hours
Comments last 2 days
Links last 2 weeksNo recent new links
What's New in the Forums?
Hints by Topic
News from Macworld
From Our Sponsors
All trademarks and copyrights on this page are owned by their respective owners.
Visit other IDG sites:
Powered by Geeklog Created this page in 1.07 seconds