Category: Mac

Quick File Sharing for Linux and Mac OS X

This is a great little trick to quickly make a directory of files accessible to anyone. You can do it in any OS that has Python installed, which most Linux distros and Mac OS X do. Windows does not have python installed by default, but the same thing should work from there if python is installed.

First, open the terminal and navigate to the directory you want to share. While in that directory type the following command:

python -c "import SimpleHTTPServer;SimpleHTTPServer.test()"

This will start a web server on port 8000. This is a very simple and quick way to share a file over the network. Just send a link to the IP address of the machine.

If you are behind a NAT router or firewall, port 8000 needs to be forwarded or opened, but if you are on the same network all you need to do is send them a link to http://<your_ip_address>:8000 and they can easily browse the directory you ran the command from and download any file there. When you’re finished, go back to the terminal and use Ctrl+C to end the process.

Accessing Mac OS X Leopard Grayed-out Preference Panes

UPDATE: This also works on Snow Leopard if you are having the same problem accsessing any preference panes.

I have a work-issued MacBook Pro with Leopard, specifically Mac OS X 10.5.8, installed. It is a test image that was installed to test ideas about ways to administer systems for users without Administrative rights. At the end of the test, my access was changed to grant my user administrative rights on the laptop, but it still has many problems. I am waiting for the new Snow Leopard image to be completed to have my laptop reimaged. In the mean time, I have been struggling with a few issues.

The system blocks access to certain preference panes in System Preferences. This was probably an oversight or the leftovers of some experiment, because it does not block access to some of the more sensitive preferences. I can add new users to the laptop and do all sorts of things that I should probably not do on the network. The preferences I could not access were not too important for me to change, like Growl, for instance. Then I tried to use Apple’s Magic Mouse. When I installed the system update that enables its advanced features, I could not access the new Mouse preference pane. When I hover over it, the tooltip says “Your access to this preference has been restricted.” If you try to open the pane directly the error says “You cannot open “[name of preference pane]” preferences pane because it is not available to you at this time. You might need to connect a device to your computer to see this preferences pane.” It looks like this:

Here’s how you do it:

  1. Open the Applications folder and find the System Preferences.app file.
  2. Right click or Command-click System Preferences.app and choose Create Duplicate.
  3. Right click or Command-click the new System Preferences copy.app and choose Show Package Contents.
  4. Navigate to Contents > Resources and find the NSPrefPaneGroups.xml file.
  5. Move NSPrefPaneGroups.xml to the Trash.
  6. Make sure System Preferences is not running and double click System Preferences copy.app to run it. All the preference panes appear to be gone!
  7. In the System Preferences application click the View menu at the top of the screen. All the preference panes are now accessible from the View menu.
  8. When you have changed the preferences you need to change, close System Preferences.

Any time you need to access the disabled system preferences, just use System Preferences copy.app, otherwise you can still use the original System Preferences.app for changing system preferences normally.