Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Use a laptop as a mobile wireless power meter Network
This hint is for people trying to optimise their wireless signal reception in strange places. I recently had to get a wireless network operating over 100 meters away from the base station, and in a metal shed -- not the best environment for microwave communication!

This hint basically does the same job as AP Grapher, but can be run from the command line or over SSH -- so I was able to have someone else carry my MacBook Pro around the shed while I stayed near the wireless router and fiddled with its antennas.

I ssh'd into my MacBook Pro from a computer at the router, and ran the following command in Terminal:
while x=1; do /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | grep CtlRSSI; sleep 0.5; done
This periodically displays the received signal strength indicator (RSSI), basically the power of the microwave radio signal from your router.

The value is in dBm, which is a logarithmic scale so that an increase of 10 units means a factor of 10 increase in power; an increase of 20 means a factor of 100 increase in power; etc. Watching this reading, I was able to position the router and antenna for maximum signal strength at various places in the shed.
The airport -I command alone displays other useful information about your airport connection, like the network name, channel, authorization mode, and the noise on the microwave signal.
  Post a comment  •  Comments (11)  
  • Currently 3.52 / 5
  You rated: 1 / 5 (23 votes cast)
 
[11,820 views] Email Article To a Friend View Printable Version
10.6: Fix Samba write access from OS X to Linux servers Network
Snow Leopard only hintAfter installing the OS X Snow Leopard 10.6.3 update, I found that I could no longer write to Samba (SMB) volumes shared from my Linux server (running Ubuntu 9.10 Karmic Koala) that I had mounted on OS X.

Whenever I tried to copy a file from OS X to the mounted Samba drive, I got this error message:
The operation canít be completed because you donít have permission to access some of the items.
To solve the problem, turn off Unix extensions in your Samba server (Ubuntu 9.10 in my case) by adding the following line to smb.conf in the global settings block, and then restarting Samba:
unix extensions = no
You might also need to unmount and re-mount your Samba volumes from OS X after you make this change. More details on what caused this problem can be found in this blog post.
  Post a comment  •  Comments (9)  
  • Currently 3.55 / 5
  You rated: 2 / 5 (20 votes cast)
 
[31,320 views] Email Article To a Friend View Printable Version
Ten different ways to connect to servers Network
Watching someone else working on his Mac (especially in a bigger network environment with many servers) showed me that not everyone seems to know that there are different types of servers, and different ways to mount them in Finder. And not everyone really uses the best way -- although there is never the best way and everyone has to find his/her way for the best workflow handling. But did you know all the following ways of mounting a server?

Read the rest of the hint for 10 different ways to mount a server share....
read more (1,526 words)   Post a comment  •  Comments (20)  
  • Currently 3.39 / 5
  You rated: 3 / 5 (28 votes cast)
 
[105,027 views] Email Article To a Friend View Printable Version
10.6: Turn off automatic wake-from-sleep network check Network
Snow Leopard only hintOne of Snow Leopard's advertised new features is the much more ambitious 'wake for network access' functionality. What was previously a setting only used by geeks and network administrators -- people who readily knew what a 'magic packet' was and how to send one -- has now been expanded and simplified to make it into a feature any user could understand and make use of. A lot of work went into making it just work in any environment.

Unfortunately for those of us who were already happy with the wake on Ethernet access feature as it was in Leopard and before, they fixed what, in our case, didn't need fixing. In Snow Leopard, if you enable waking for network access, your Mac will periodically wake up every two hours (possibly sooner), no matter what. Mind you, it's a special new 'lightweight wake' with the display staying off, and it'll go right back to sleep in about 20 seconds. Still, I absolutely hated the periodic hard drive and fan noise, the apparent pointlessness and wastefulness of it all.

A comment in mDNSResponder's open source code offers some explanation:
we still want to wake up in at most 120 minutes, to see if the network environment has changed. E.g. we might wake up and find no wireless network because the base station got rebooted just at that moment, and if that happens we don't want to just give up and go back to sleep and never try again.
In my case, the network environment is static and only I could change it. I don't use wireless wake, Back to My Mac, or AirPort Extreme's sleep proxy. So how do I turn off this auto-wake feature then?
read more (191 words)   Post a comment  •  Comments (6)  
  • Currently 3.57 / 5
  You rated: 3 / 5 (23 votes cast)
 
[23,471 views] Email Article To a Friend View Printable Version
Use Terminal to open Screen Sharing connections Network
The open command in Terminal will, when given a vnc://1.2.3.4 (or vnc://hostname) protocol argument, open the Screen Sharing app and connect to IP address 1.2.3.4 (or hostname).

[robg adds: I was certain we'd covered this tip somewhere before, but all I can find is a brief mention in this comment to this hint about dict:// URLs.]
  Post a comment  •  Comments (10)  
  • Currently 3.20 / 5
  You rated: 5 / 5 (15 votes cast)
 
[16,763 views] Email Article To a Friend View Printable Version
Disable AirPort when Ethernet cable is connected Network
At my office, I needed to find a way to turn of the wireless network when someone plugged in their network cable. I also did not want them to be able to turn the wireless network back on until the network cable was unplugged. I came up with the fallowing solution.

I created a launchDaemon called com.companyname.ethernetmonitor, and saved it in /System » Library » LaunchDaemons:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>Label</key>
  <string>com.companyname.ethernetmonitor</string>
  <key>ProgramArguments</key>
  <array>
    <string>/Library/Scripts/CompanyName/turnOffAirport.sh</string>
  </array>
  <key>WatchPaths</key>
  <array>
    <string>/Library/Preferences/SystemConfiguration</string>
  </array>
</dict>
</plist>
This will watch the System Configurations folder for changes. This folder changes when you plug in a network cable, turn on AirPort, etc. When it changes, a script called turnOffAirport.sh, stored in /Library/Scripts, is run to see if the Ethernet connection has a company IP address:
#!/bin/sh
if ifconfig en0 | grep 155.144; 
then /usr/sbin/networksetup -setairportpower off
else
exit 0
fi
This helps keep the user from grabbing two IPs (our wireless and wired network use the same set of IPs), and also helps prevent a few other odd issues when a user is connected to both wireless and Ethernet networks.
  Post a comment  •  Comments (28)  
  • Currently 3.57 / 5
  You rated: 5 / 5 (23 votes cast)
 
[33,447 views] Email Article To a Friend View Printable Version
Script the Login window through Apple Remote Desktop Network
After trying to script the login window multiple ways, I have come up with the perfect solution; this works 100% of the time when tested under OS X 10.4 and higher. We use this to log in computer(s) through Apple Remote Desktop by sending this script to computers sitting at the login window. This is great in a computer lab situation, where you may need to log in all the computers at once.

This method requires the username and password fields, but as long as you have a list of users with "Other..." displayed in the login window, it will work fine. Here's the script:
#!bin/sh
cat >/tmp/Login_Automatically.sh <<-"EOF"
if [[ "$(who | grep console)" == "" ]]; then # Runs ONLY if no one is logged in
osascript <<EOT
set username_ to "username"
set password_ to "password"
tell application "System Events"
key code 125 -- Down Arrow
key code 125 -- Down Arrow
delay 1
key code 125 -- Down Arrow
key code 125 -- Down Arrow
key code 125 -- Down Arrow
key code 125 -- Down Arrow
key code 125 -- Down Arrow
key code 125 -- Down Arrow
delay 0.5
key code 36 -- Return
delay 1
tell process "SecurityAgent" to set value of text field 1 of group 1 of window 1 to username_
tell process "SecurityAgent" to set value of text field 2 of group 1 of window 1 to password_
click button "Log In" of window 1 of application process "SecurityAgent"
end tell
EOT
fi
EOF
chmod 755 /tmp/Login_Automatically.sh
./tmp/Login_Automatically.sh
rm -f /tmp/Login_Automatically.sh
Some notes:
  • Initially the script will help "wake up" computers before attempting to go further by simulating a few Down Arrow keystrokes.
  • Any computers that are not on the username and password login window screen will be "encouraged" by clicking the Down Arrow multiple times and selecting that option. (It does not hurt anything to run this if the screen is already at the username/password fields.)
  • The script will fill in each field, and does not depend on the correct field being highlighted -- unlike other scripts we have seen and used in the past.
[robg adds: I haven't tested this one.]
  Post a comment  •  Comments (29)  
  • Currently 2.17 / 5
  You rated: 1 / 5 (18 votes cast)
 
[26,049 views] Email Article To a Friend View Printable Version
10.6: VPN connections and Back To My Mac Network
Snow Leopard only hintI connect to my Mac at work quite frequently when I'm home, and I found something interesting. At work, I have a fixed IP address...except when I need a VPN connection to access certain servers that I administer. When I connect to the VPN, I get a different IP address that's dynamically assigned (i.e., I never know the exact address, only the subnet).

Given the snow storm on the East Coast, I worked from home and connected to my Mac at work. I had forgotten to terminate a VPN connection I had going the previous day, but I was able to connect to my Mac anyway, even though I entered my Mac's usual address when I connected, rather than the VPN-supplied address.

Even more startling was that I maintained my connection even when terminating the VPN connection. To confirm, I restarted the VPN connection on my remote Mac, yet I didn't lose my remote session. In the past, I would have to reconnect, hoping I had properly guessed my Mac's VPN-assigned address.

Just another example of thoughtfulness from Apple.
  Post a comment  •  Comments (4)  
  • Currently 1.74 / 5
  You rated: 2 / 5 (19 votes cast)
 
[13,165 views] Email Article To a Friend View Printable Version
10.6: Take advantage of automatic Screen Sharing shortcuts Network
Snow Leopard only hintThe old Bonjour Browser hint for Screen Sharing was disabled in a 10.5 security update, and was missing completely in 10.6. However, a new workaround seems to have been built into 10.6, and it might even better than a browser window.

When you connect to any system via Screen Sharing in 10.6, a .vncloc file is automatically created within your user's Library/Application Support/Screen Sharing folder. (Copying this folder to any 10.5 system will also work, but you'll need to manually update it.) Clicking on any of these .vncloc files immediately launches Screen Sharing and connects to the selected system.

To make these shortcuts really easy to use, drag that Screen Sharing folder to your Dock, and now you've got an instant shortcut to any one of your stored Screen Sharing connections. New systems you connect to via the Finder are automatically added to this folder. Just pop up the folder from the Dock, then click the icon for the system you wish to connect to. Screen Sharing will launch and connect, assuming you saved the login info to your Keychain from the last time you connected.

[robg adds: I dragged the folder into Butler's configuration window, assigned it a hot key, and set it to display a menu near the mouse. Now I've got screen sharing connections available via a keyboard shortcut and pop-up menu - nice!]
  Post a comment  •  Comments (8)  
  • Currently 3.21 / 5
  You rated: 5 / 5 (28 votes cast)
 
[17,956 views] Email Article To a Friend View Printable Version
10.6: Automount Samba (Windows) shares as needed Network
Snow Leopard only hintHere's a way of mounting Samba shares in Snow Leopard that does not depend on the login process. This method auto-mounts a share when it is accessed. You need to have an administrator password to edit and create the needed files. First, edit /etc/auto_master (as root) and add a line:
/-     auto_smb
I use the free version of TextWrangler for this; it will prompt you for your admin password. This tells autofs to look in the file /etc/auto_smb for the mount info. The /- means the the full mount path will be specified in auto_smb.

Next, create a file called /etc/auto_smb which is owned by root:wheel. One way to do this is to type the following command in Terminal:
sudo touch /etc/auto_smb
Now edit this new file to put the share info into it.
read more (253 words)   Post a comment  •  Comments (16)  
  • Currently 3.14 / 5
  You rated: 2 / 5 (29 votes cast)
 
[69,158 views] Email Article To a Friend View Printable Version