Re-routing Traffic via a Remote Server
15/02/12 16:18 Filed in: Linux
This isn't a great long guide to using ssh for port forwarding, it just covers the one instance I needed.
Normally I connect my mail program running on c1 (my Mac at home) to server s3 port p3 (my mail server at work).
But today I can't get traffic from c1 to s3 because s3's corporate firewall has blocked me. So I need to re-route all the traffic destined for s3 port p3 via a separate server s2, which fortunately is in another country and I have ssh access to it.
You change your local mail program, instead of connecting to s3 port p3, to connect to "localhost" port p1 (some port on your Mac/PC you haven't used for anything else, e.g. 2000).
Then in a Terminal window you do
ssh -v -L p1:s3:p3@s2
To give you a concrete example, my IMAP server I want to talk to is at imap.work.com port 993.
My remote server (to which I have ssh access) which I want to route all traffic via, is called ssh.mydomain.com and it listens on port 22 as usual. I have an account there with username jkf.
On my local Mac running my Mail client, I've decided to route IMAP traffic via port 2000 as it's an unused port. That "2000" is pretty much any number in the range 1024-65535 that seems to work. If you hit one that doesn't work or produces an error, guess again.
I would type this:
ssh -v -L 2000:imap.work.com:993 jkf@ssh.mydomain.com
If the ssh server on ssh.mydomain.com ran on port 2222 instead of the default port 22, I would just have to add "-p 2222" to that command.
So your traffic from your mail program (set to talk to localhost port p1 which is 2000 in my case) does this:
c0 ==> s1 (==localhost) port p1 ==> s2 port 22 ==> s3 port p3
You will need to set up more than 1 of these as you'll probably want to re-route SMTP traffic as well. So just open another Terminal window and run another similar command in there, for the appropriate SMTP port.
The commands will look like they have just logged you in to your remote ssh server (ssh.mydomain.com) but they will have set up all the magic before they did it. The "-v" in the ssh commands makes it show you more detail of what is going on.
Normally I connect my mail program running on c1 (my Mac at home) to server s3 port p3 (my mail server at work).
But today I can't get traffic from c1 to s3 because s3's corporate firewall has blocked me. So I need to re-route all the traffic destined for s3 port p3 via a separate server s2, which fortunately is in another country and I have ssh access to it.
You change your local mail program, instead of connecting to s3 port p3, to connect to "localhost" port p1 (some port on your Mac/PC you haven't used for anything else, e.g. 2000).
Then in a Terminal window you do
ssh -v -L p1:s3:p3
To give you a concrete example, my IMAP server I want to talk to is at imap.work.com port 993.
My remote server (to which I have ssh access) which I want to route all traffic via, is called ssh.mydomain.com and it listens on port 22 as usual. I have an account there with username jkf.
On my local Mac running my Mail client, I've decided to route IMAP traffic via port 2000 as it's an unused port. That "2000" is pretty much any number in the range 1024-65535 that seems to work. If you hit one that doesn't work or produces an error, guess again.
I would type this:
ssh -v -L 2000:imap.work.com:993 jkf@ssh.mydomain.com
If the ssh server on ssh.mydomain.com ran on port 2222 instead of the default port 22, I would just have to add "-p 2222" to that command.
So your traffic from your mail program (set to talk to localhost port p1 which is 2000 in my case) does this:
c0 ==> s1 (==localhost) port p1 ==> s2 port 22 ==> s3 port p3
You will need to set up more than 1 of these as you'll probably want to re-route SMTP traffic as well. So just open another Terminal window and run another similar command in there, for the appropriate SMTP port.
The commands will look like they have just logged you in to your remote ssh server (ssh.mydomain.com) but they will have set up all the magic before they did it. The "-v" in the ssh commands makes it show you more detail of what is going on.
Comments
HOWTO Install Mac OS X 10.7 Lion From DVD
23/06/11 12:07 Filed in: Mac
Apple would have you believe that the only way to install Lion on a Mac is to install 10.6 Snow Leopard, update it to the latest revision, go to the Mac App Store, download Lion from there and run it.
Cobblers.
It is trivially simple to burn Lion to a DVD or USB stick so you can install it onto a clean Mac without having to install anything first. Obviously firstly you need to get a copy of Lion from the Mac App Store, but only bother doing that once.
Then all you need to do is use Disk Utility to either burn that to a DVD or write it to a USB stick.
Burn InstallESD.dmg to DVD
Write InstallESD.dmg to USB stick
Now you can put the DVD or USB stick into the Mac you want to use for Lion, and hold down the Option/Alt key while you power on the Mac. Keep Option/Alt held down until a picture of your bootable devices appears. Select the DVD or USB device you want to boot from (the one you just wrote) and the standard Lion installer will appear in a while.
Cobblers.
It is trivially simple to burn Lion to a DVD or USB stick so you can install it onto a clean Mac without having to install anything first. Obviously firstly you need to get a copy of Lion from the Mac App Store, but only bother doing that once.
- Right-click on the Lion application and choose “Show Package Contents”.
- Navigate into the Contents/SharedSupport folder.
- In there you will see a huge file called “InstallESD.dmg”.
Then all you need to do is use Disk Utility to either burn that to a DVD or write it to a USB stick.
Burn InstallESD.dmg to DVD
- Run Disk Utility.
- Drag InstallESD.dmg from a Finder window into the bottom left pane in Disk Utility.
- Click the “Burn” button in the toolbar.
Write InstallESD.dmg to USB stick
- Run Disk Utility.
- Insert your USB stick and wait for it to appear in the list of devices in the top-left pane in Disk Utility.
- Select your USB stick in Disk Utility.
- Click on “Erase” in the right pane, enter the name “Lion” and click the “Erase...” button. Note: This will totally wipe all of your USB stick. Make sure there are no files or apps on there that you need!
- After it has erased, click on “Restore” in the right pane.
- Drag InstallESD.dmg from a Finder window into the “Source” box.
- Drag the “Lion” icon (immediately below your USB stick) from the top-left pane to the “Destination” box.
- Ensure the “Erase destination” box is ticked.
- Click the “Restore” button.
Now you can put the DVD or USB stick into the Mac you want to use for Lion, and hold down the Option/Alt key while you power on the Mac. Keep Option/Alt held down until a picture of your bootable devices appears. Select the DVD or USB device you want to boot from (the one you just wrote) and the standard Lion installer will appear in a while.
Add an Email Account to Outlook 2011
26/12/10 19:51 Filed in: Mac
This article describes how to add email accounts to Outlook 2011, part of Microsoft Office 2011 for Mac. It is specific to the domain “ecs.soton.ac.uk”, but many of the settings are generally useful, not just for “ecs.soton.ac.uk”.
There are 2 parts,
Add an Exchange account
Select "Tools / Accounts..." from the menus, then click on the little "+" button in the bottom left corner.
Choose "Exchange..." from the little menu that appears.

Fill in your full ECS email address in the form username@ecs.soton.ac.uk, your username and your ECS password.
Leave the "Configure automatically" box ticked.
Click "Add Account".
If you are inside the ECS network, it will automatically be found and most of the configuration done for you.
In the resulting dialog, click the "Advanced" button in the bottom right corner.

The "Microsoft Exchange" and "Directory Service" server names can be left alone, but you need to enter
ou=ECSUsers,dc=ecs,dc=soton,dc=ac,dc=uk
in the "Search Base" field, and change the "Maximum number of results to return" to 10000 instead of 1000.
Set all the tickboxes as shown above.
Then click "OK".
That's it. Click "OK" to return to the main window showing your email, and open your Inbox.
You should not use the "On My Computer" folders at all. They are not accessible from anywhere else, and are probably not backed up at all. You can easily switch them off. Choose from the menu: Outlook / Preferences. Then click the "Show All" button, select the "General" page and tick the box "Hide On My Computer folders".
Add an IMAP account
This involves a few more stages than adding an Exchange account, in order to set it efficiently and to take full advantage of the advanced things our IMAP server can do for you. But it is straightforward, don't worry.
Select "Tools / Accounts..." from the menus, then click on the little "+" button in the bottom left corner.
Choose "E-mail..." from the little menu that appears.

Set the first box as shown above, putting in your own username and password where shown.
Click "Add Account".
In the resulting dialog, click on the "More Options" button just below the "Outgoing server" settings.

Set all the entries as shown above.
Click "OK".
This takes you back to the main account view screen as you have just seen.
Now click on the "Advanced" button in the bottom right corner.

Set all the settings as shown above.
Then click on the "Folders" tab at the top of the dialog.

Set all the settings as shown above. Note that some of the folder names are different from the default settings.
Then click "OK".
That's it. Click "OK" to return to the main window showing your email, and open your Inbox.
You should not use the "On My Computer" folders at all. They are not accessible from anywhere else, and are probably not backed up at all. You can easily switch them off. Choose from the menu: Outlook / Preferences. Then click the "Show All" button, select the "General" page and tick the box "Hide On My Computer folders".
There are 2 parts,
- Add an Exchange account
- Add an IMAP account
Select "Tools / Accounts..." from the menus, then click on the little "+" button in the bottom left corner.
Choose "Exchange..." from the little menu that appears.

Fill in your full ECS email address in the form username@ecs.soton.ac.uk, your username and your ECS password.
Leave the "Configure automatically" box ticked.
Click "Add Account".
If you are inside the ECS network, it will automatically be found and most of the configuration done for you.
In the resulting dialog, click the "Advanced" button in the bottom right corner.

The "Microsoft Exchange" and "Directory Service" server names can be left alone, but you need to enter
ou=ECSUsers,dc=ecs,dc=soton,dc=ac,dc=uk
in the "Search Base" field, and change the "Maximum number of results to return" to 10000 instead of 1000.
Set all the tickboxes as shown above.
Then click "OK".
That's it. Click "OK" to return to the main window showing your email, and open your Inbox.
You should not use the "On My Computer" folders at all. They are not accessible from anywhere else, and are probably not backed up at all. You can easily switch them off. Choose from the menu: Outlook / Preferences. Then click the "Show All" button, select the "General" page and tick the box "Hide On My Computer folders".
This involves a few more stages than adding an Exchange account, in order to set it efficiently and to take full advantage of the advanced things our IMAP server can do for you. But it is straightforward, don't worry.
Select "Tools / Accounts..." from the menus, then click on the little "+" button in the bottom left corner.
Choose "E-mail..." from the little menu that appears.

Set the first box as shown above, putting in your own username and password where shown.
Click "Add Account".
In the resulting dialog, click on the "More Options" button just below the "Outgoing server" settings.

Set all the entries as shown above.
Click "OK".
This takes you back to the main account view screen as you have just seen.
Now click on the "Advanced" button in the bottom right corner.

Set all the settings as shown above.
Then click on the "Folders" tab at the top of the dialog.

Set all the settings as shown above. Note that some of the folder names are different from the default settings.
Then click "OK".
That's it. Click "OK" to return to the main window showing your email, and open your Inbox.
You should not use the "On My Computer" folders at all. They are not accessible from anywhere else, and are probably not backed up at all. You can easily switch them off. Choose from the menu: Outlook / Preferences. Then click the "Show All" button, select the "General" page and tick the box "Hide On My Computer folders".
Configure Office 2011 for Mac
26/12/10 19:49 Filed in: Mac
This article briefly describes a recommended configuration for Microsoft Office 2011 for Mac.
Advice about adding e-mail accounts to Outlook 2011 is elsewhere on this site.
Uninstall Microsoft Office 2008
This is best done before you install Office 2011.
If you have already installed Office 2011 at this point, then just delete the Microsoft Office 2008 folder from /Applications.
If you have not yet installed Office 2011 at this point, then follow the instructions in this paragraph:
Run the application /Applications/Microsoft Office 2008/Additional Tools/Remove Office.
Then do a Spotlight search (click on the magnifying glass icon at the very top right corner of your display).
Search for "Microsoft", wait a few seconds and then click on the "Show all" item at the top of the menu of results.
Delete every folder it finds that doesn't contain your documents.
Search for "Office" and do the same as above.
Now run the application /Applications/Font Book.
From the Edit menu, select "Select Duplicated Fonts", then "Resolve Duplicates".
Then empty the Trash.
Then Reboot.
Word
Create a new blank document.
From the menus, choose Tools / Language and set it to "English (UK)".
Click the "Default..." button and select "Yes".
Click "OK".
From the menus, choose View / Toolbox / Styles.
The toolbox will appear. Click on the arrow icon in the top right corner of the toolbox, and set to fade to 40% after 15 seconds.
Tick the "Online" box.
Click "OK" and leave the toolbox open.
From the menus, choose Word / Preferences....
Set the following:
AutoCorrect: AutoFormat as You Type: NO internet and network paths with hyperlinks.
Save: YES always create backup copy.
User Information: Set sensibly for yourself.
Ribbon: Print Layout View: YES Paragraphs indents & spacing.
Click "OK" to close the preferences dialog.
From the menus, choose Word / Quit Word.
Don't save the document, if prompted.
Powerpoint
Create a new blank presentation.
From the menus, choose View / Toolbox / Reference Tools.
The toolbox will appear. Click on the arrow icon in the top right corner of the toolbox, and set to fade to 40% after 15 seconds.
Tick the "Online" box.
Click "OK" and close the toolbox.
From the menus, choose Powerpoint / Preferences....
Set the following:
AutoCorrect / AutoFormat as You Type: NO Internet and network paths with hyperlinks.
Advanced / User Information: Set sensibly for yourself.
Click "OK" to close the preferences dialog.
From the menus, choose Powerpoint / Quit Powerpoint.
Don't save the document, if prompted.
Outlook
Close the "Welcome" dialog.
From the menus, choose Tools / Junk E-mail Protection.
Click on the "None" button.
Click "OK".
From the menus, choose Outlook / Preferences....
Set the following:
Reading / Security / Automatically download pictures: YES In messages from my contacts.
Composing / Replies and Forwards: YES Indent each line of the original message.
Schedules: YES Send & Receive All.
Contacts / Phone Numbers: NO Automatically format phone numbers.
From the menus, choose Outlook / Quit Outlook.
Show All the Welcome Dialogs Again When You Next Open Office Applications
Open a Terminal window. This can be found in /Applications/Utilities/Terminal.
cd ~/Library/Preferences
plutil -convert xml1 com.microsoft.Word.plist
plutil -convert xml1 com.microsoft.Powerpoint.plist
plutil -convert xml1 com.microsoft.Outlook.plist
Edit com.microsoft.Word.plist
Search for "Hide Welcome Dialog"
Set the next line to " "
Edit com.microsoft.Powerpoint.plist
Search for "Hide Welcome Dialog"
Set the next line to "0 "
Edit com.microsoft.Outlook.plist
Search for "FirstRunExperienceCompleted"
Set the next line to " "
The next time you run any of the Office applications listed above, the "Welcome" dialog will be shown once. This is very useful if you have configured the applications for someone else, but still want them to see the introductory screen so they can learn about Office 2011, or easily add e-mail accounts to Outlook.
Advice about adding e-mail accounts to Outlook 2011 is elsewhere on this site.
Uninstall Microsoft Office 2008
This is best done before you install Office 2011.
If you have already installed Office 2011 at this point, then just delete the Microsoft Office 2008 folder from /Applications.
If you have not yet installed Office 2011 at this point, then follow the instructions in this paragraph:
Run the application /Applications/Microsoft Office 2008/Additional Tools/Remove Office.
Then do a Spotlight search (click on the magnifying glass icon at the very top right corner of your display).
Search for "Microsoft", wait a few seconds and then click on the "Show all" item at the top of the menu of results.
Delete every folder it finds that doesn't contain your documents.
Search for "Office" and do the same as above.
Now run the application /Applications/Font Book.
From the Edit menu, select "Select Duplicated Fonts", then "Resolve Duplicates".
Then empty the Trash.
Then Reboot.
Word
Create a new blank document.
From the menus, choose Tools / Language and set it to "English (UK)".
Click the "Default..." button and select "Yes".
Click "OK".
From the menus, choose View / Toolbox / Styles.
The toolbox will appear. Click on the arrow icon in the top right corner of the toolbox, and set to fade to 40% after 15 seconds.
Tick the "Online" box.
Click "OK" and leave the toolbox open.
From the menus, choose Word / Preferences....
Set the following:
AutoCorrect: AutoFormat as You Type: NO internet and network paths with hyperlinks.
Save: YES always create backup copy.
User Information: Set sensibly for yourself.
Ribbon: Print Layout View: YES Paragraphs indents & spacing.
Click "OK" to close the preferences dialog.
From the menus, choose Word / Quit Word.
Don't save the document, if prompted.
Powerpoint
Create a new blank presentation.
From the menus, choose View / Toolbox / Reference Tools.
The toolbox will appear. Click on the arrow icon in the top right corner of the toolbox, and set to fade to 40% after 15 seconds.
Tick the "Online" box.
Click "OK" and close the toolbox.
From the menus, choose Powerpoint / Preferences....
Set the following:
AutoCorrect / AutoFormat as You Type: NO Internet and network paths with hyperlinks.
Advanced / User Information: Set sensibly for yourself.
Click "OK" to close the preferences dialog.
From the menus, choose Powerpoint / Quit Powerpoint.
Don't save the document, if prompted.
Outlook
Close the "Welcome" dialog.
From the menus, choose Tools / Junk E-mail Protection.
Click on the "None" button.
Click "OK".
From the menus, choose Outlook / Preferences....
Set the following:
Reading / Security / Automatically download pictures: YES In messages from my contacts.
Composing / Replies and Forwards: YES Indent each line of the original message.
Schedules: YES Send & Receive All.
Contacts / Phone Numbers: NO Automatically format phone numbers.
From the menus, choose Outlook / Quit Outlook.
Show All the Welcome Dialogs Again When You Next Open Office Applications
Open a Terminal window. This can be found in /Applications/Utilities/Terminal.
cd ~/Library/Preferences
plutil -convert xml1 com.microsoft.Word.plist
plutil -convert xml1 com.microsoft.Powerpoint.plist
plutil -convert xml1 com.microsoft.Outlook.plist
Edit com.microsoft.Word.plist
Search for "Hide Welcome Dialog"
Set the next line to "
Edit com.microsoft.Powerpoint.plist
Search for "Hide Welcome Dialog"
Set the next line to "
Edit com.microsoft.Outlook.plist
Search for "FirstRunExperienceCompleted"
Set the next line to "
The next time you run any of the Office applications listed above, the "Welcome" dialog will be shown once. This is very useful if you have configured the applications for someone else, but still want them to see the introductory screen so they can learn about Office 2011, or easily add e-mail accounts to Outlook.
Uninstall TeX from a Mac
26/12/10 19:47 Filed in: Mac
This describes how to remove pretty much all of Mac TeX from a Mac, which you might want to do before installing a new version.
You need to do some of this in a Terminal window, and as root (use the command "cd /; sudo su -" to become root properly).
rm -rf /usr/local/texlive
rm -rf /Applications/TeX
rm -rf /Library/TeX
Then open System Preferences, right-click on the the TeX icon and choose "Remove".
That should pretty much do it.
You can leave multiple versions installed and it will cope, you use the TeX preference pane to switch between different versions.
You need to do some of this in a Terminal window, and as root (use the command "cd /; sudo su -" to become root properly).
rm -rf /usr/local/texlive
rm -rf /Applications/TeX
rm -rf /Library/TeX
Then open System Preferences, right-click on the the TeX icon and choose "Remove".
That should pretty much do it.
You can leave multiple versions installed and it will cope, you use the TeX preference pane to switch between different versions.
Uninstall Office 2008 from a Mac
26/12/10 19:46 Filed in: Mac
You may well want to do this before you install Office 2011, unless you really want both versions on your system.
I advise leaving the fonts present so you don't break any of your documents that use them.
Look in /Applications/Microsoft Office 2008/Additional Tools/Remove Office and run the "Remove Office" application.
It might or might not do anything useful.
Delete
/Applications/Microsoft Office 2008
/Library/Application Support/Microsoft
From your user directory, delete
Library/Application Support/Microsoft
Documents/Microsoft User Data
Then drag all the Microsoft Office icons off your Dock onto the Desktop so they disappear in a puff of smoke.
Now empty your Trash and Restart your Mac.
You are now ready for a clean installation of Microsoft Office 2011.
I advise leaving the fonts present so you don't break any of your documents that use them.
Look in /Applications/Microsoft Office 2008/Additional Tools/Remove Office and run the "Remove Office" application.
It might or might not do anything useful.
Delete
/Applications/Microsoft Office 2008
/Library/Application Support/Microsoft
From your user directory, delete
Library/Application Support/Microsoft
Documents/Microsoft User Data
Then drag all the Microsoft Office icons off your Dock onto the Desktop so they disappear in a puff of smoke.
Now empty your Trash and Restart your Mac.
You are now ready for a clean installation of Microsoft Office 2011.
Mac OSX: Hide a File or Folder from Finder
26/12/10 19:45 Filed in: Mac
This describes how to set a file or folder so it is hidden in the Finder in Mac OS X.
It is very simple: to hide a file or folder, for example "/private", simply do this as root
setfile -a V /private
It is very simple: to hide a file or folder, for example "/private", simply do this as root
setfile -a V /private
Cannot copy files from Mac to Samba
There is a new bug in MacOS 10.6.3 which presents problems when you copy files and directories from a Mac to any Samba server or NAS box using Samba or providing Windows (or CIFS or SMB) shares.
When you try to copy files and directories onto the Samba/NAS, you will get an error message about you not having permission.
The following workaround appears to work:
1. Copy all the files you want to put on the filestore into a new directory on your Mac, this just makes things easier. For this example we will call this directory "/Users/Jules/Documents/MyNotes".
2. Open the Applications folder in Finder, go into "Utilities" and run "Terminal".
3. Type the following commands exactly (even better: copy and paste them from here!), replacing the directory name with the location you used in step 1. Do not miss the dot at the end of 3 of the lines.
cd /Users/Jules/Documents/MyNotes
xattr -d -r com.apple.quarantine .
xattr -d -r com.apple.FinderInfo .
xattr -d -r com.apple.metadata:kMDItemWhereFroms .
exit
You should now be able to copy your directory MyNotes over to the Samba server.
When you try to copy files and directories onto the Samba/NAS, you will get an error message about you not having permission.
The following workaround appears to work:
1. Copy all the files you want to put on the filestore into a new directory on your Mac, this just makes things easier. For this example we will call this directory "/Users/Jules/Documents/MyNotes".
2. Open the Applications folder in Finder, go into "Utilities" and run "Terminal".
3. Type the following commands exactly (even better: copy and paste them from here!), replacing the directory name with the location you used in step 1. Do not miss the dot at the end of 3 of the lines.
cd /Users/Jules/Documents/MyNotes
xattr -d -r com.apple.quarantine .
xattr -d -r com.apple.FinderInfo .
xattr -d -r com.apple.metadata:kMDItemWhereFroms .
exit
You should now be able to copy your directory MyNotes over to the Samba server.
VMware vSphere Client in Parallels Desktop
This is a quick solution to a problem I suffered, and thought it was a bug in Parallels Desktop for Mac. You run the vSphere Client application, open a Console to a virtual machine, and after that all your Windows keystrokes and mouse clicks go into the Console and not into any other Windows applications at all, not even the taskbar or Start menu.
The key is that the vSphere Client uses the same "Ctrl Alt" key combination to get out of the console, as does Parallels to get out of Windows programs.
When running in Coherence or Crystal mode, you never really need this key combination as it works automatically anyway when you click in any other Mac application.
The solution is to change the Parallels "Release Input" key combination. Get out of Crystal mode, then go to the Parallels / Preferences window. Select the "Keyboard & Mouse" pane of the dialog box, and work through each Profile in turn. In each profile, set the key combination for "Release Input" to "Cmd-Ctrl-Space" (that's what I used).
Then quit and re-run Parallels and you will find the problem has gone away.
The key is that the vSphere Client uses the same "Ctrl Alt" key combination to get out of the console, as does Parallels to get out of Windows programs.
When running in Coherence or Crystal mode, you never really need this key combination as it works automatically anyway when you click in any other Mac application.
The solution is to change the Parallels "Release Input" key combination. Get out of Crystal mode, then go to the Parallels / Preferences window. Select the "Keyboard & Mouse" pane of the dialog box, and work through each Profile in turn. In each profile, set the key combination for "Release Input" to "Cmd-Ctrl-Space" (that's what I used).
Then quit and re-run Parallels and you will find the problem has gone away.
Mac Internet Sharing to Squeezebox or XBox 360
26/06/08 10:00 Filed in: Mac
If you try to share a Mac internet connection, and you can’t get your Squeezebox or XBox 360 to get an IP address from it, read on:
The important file here is /etc/bootpd.plist. If this file doesn’t exist when Internet Sharing starts, it will create it, and remove it when it stops. But if the file already exists when it starts, the Mac will leave it alone and not overwrite or remove it.
Now just check that your value of 0 is still there in /etc/bootpd.plist, it should have survived.
Your Squeezebox or XBox 360 will now happily get an IP address from your Mac’s Internet Sharing.
The important file here is /etc/bootpd.plist. If this file doesn’t exist when Internet Sharing starts, it will create it, and remove it when it stops. But if the file already exists when it starts, the Mac will leave it alone and not overwrite or remove it.
- Start Internet Sharing
- Copy the file somewhere safe: “cp /etc/bootpd.plist /tmp/“
- Stop Internet Sharing
- Edit /tmp/bootpd.plist
- Look for the “reply_threshold_seconds” setting at the bottom of the file, it will be set to 4
- Change the 4 to 0
- Copy the file back in place: “sudo cp /tmp/bootpd.plist /etc/“
- Start Internet Sharing
Now just check that your value of 0 is still there in /etc/bootpd.plist, it should have survived.
Your Squeezebox or XBox 360 will now happily get an IP address from your Mac’s Internet Sharing.
X in Solaris 10 on a MacBook
Section "ServerLayout"
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/X11/lib/X11/rgb"
ModulePath "/usr/X11/lib/modules"
FontPath "/usr/X11/lib/X11/fonts/TrueType/"
FontPath "/usr/X11/lib/X11/fonts/Type1/"
FontPath "/usr/X11/lib/X11/fonts/Type1/sun/"
FontPath "/usr/X11/lib/X11/fonts/F3bitmaps/"
FontPath "/usr/X11/lib/X11/fonts/misc/"
FontPath "/usr/X11/lib/X11/fonts/100dpi/"
FontPath "/usr/X11/lib/X11/fonts/75dpi/"
EndSection
Section "Module"
Load "IA"
Load "Xst"
Load "dbe"
Load "extmod"
Load "record"
Load "xtrap"
Load "glx"
Load "bitstream"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/mouse"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
ModeLine "MacBook13" 172.73 1280 1336 1616 1728 800 802 814 840
EndSection
Section "Device"
### Available Driver options are:-
### Values: : integer,: float, : "True"/"False",
###: "String", : " Hz/kHz/MHz"
### [arg]: arg optional
#Option "ShadowFB" # []
#Option "DefaultRefresh" # []
Identifier "Card0"
Driver "vesa"
VendorName "Unknown Vendor"
BoardName "Unknown Board"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 1
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 4
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 8
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 15
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 16
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 24
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
EndSection
# Option "dpms"
#EndSection
#
#Section "Device"
# Identifier "Videocard0"
# Driver "vesa"
# VendorName "Videocard vendor"
# BoardName "VESA driver (generic)"
#EndSection
#
#Section "Screen"
# Identifier "Screen0"
# Device "Videocard0"
# Monitor "Monitor0"
# DefaultDepth 24
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 8
# Modes "MacBook13"
# EndSubSection
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 16
# Modes "MacBook13"
# EndSubSection
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 24
# Modes "MacBook13"
# EndSubSection
#EndSection
#
#Section "DRI"
# Group 0
# Mode 0666
#EndSection
Identifier "X.org Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
RgbPath "/usr/X11/lib/X11/rgb"
ModulePath "/usr/X11/lib/modules"
FontPath "/usr/X11/lib/X11/fonts/TrueType/"
FontPath "/usr/X11/lib/X11/fonts/Type1/"
FontPath "/usr/X11/lib/X11/fonts/Type1/sun/"
FontPath "/usr/X11/lib/X11/fonts/F3bitmaps/"
FontPath "/usr/X11/lib/X11/fonts/misc/"
FontPath "/usr/X11/lib/X11/fonts/100dpi/"
FontPath "/usr/X11/lib/X11/fonts/75dpi/"
EndSection
Section "Module"
Load "IA"
Load "Xst"
Load "dbe"
Load "extmod"
Load "record"
Load "xtrap"
Load "glx"
Load "bitstream"
Load "type1"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "keyboard"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/mouse"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "Monitor Model"
ModeLine "MacBook13" 172.73 1280 1336 1616 1728 800 802 814 840
EndSection
Section "Device"
### Available Driver options are:-
### Values: : integer,
###
### [arg]: arg optional
#Option "ShadowFB" # [
#Option "DefaultRefresh" # [
Identifier "Card0"
Driver "vesa"
VendorName "Unknown Vendor"
BoardName "Unknown Board"
BusID "PCI:0:2:0"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Card0"
Monitor "Monitor0"
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 1
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 4
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 8
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 15
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 16
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Depth 24
Modes "1280x800"
# Modes "MacBook13"
EndSubSection
EndSection
# Option "dpms"
#EndSection
#
#Section "Device"
# Identifier "Videocard0"
# Driver "vesa"
# VendorName "Videocard vendor"
# BoardName "VESA driver (generic)"
#EndSection
#
#Section "Screen"
# Identifier "Screen0"
# Device "Videocard0"
# Monitor "Monitor0"
# DefaultDepth 24
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 8
# Modes "MacBook13"
# EndSubSection
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 16
# Modes "MacBook13"
# EndSubSection
# SubSection "Display"
# Viewport 0 0
# Virtual 1280 800
# Depth 24
# Modes "MacBook13"
# EndSubSection
#EndSection
#
#Section "DRI"
# Group 0
# Mode 0666
#EndSection
X in CentOS/RHEL 5 on a MacBook
# Xorg configuration created by pyxf86config
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "vesa"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "MonitorVendor"
ModelName "MonitorModel"
Horizsync 28-50
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Modes "1280x800"
Depth 24
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen 0 "Screen0" 0 0
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "InputDevice"
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "vesa"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "MonitorVendor"
ModelName "MonitorModel"
Horizsync 28-50
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Virtual 1280 800
Modes "1280x800"
Depth 24
EndSubSection
EndSection
X in CentOS/RHEL 4 on a MacBook Pro
# Xorg configuration created by system-config-display
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection
Section "InputDevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection
Section "Monitor"
# HorizSync 21.5 - 150.0
# VertRefresh 30.0 - 150.0
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "LCD Panel 1680x1050"
ModeLine "MacBookPro17" 136.3 1680 1720 1856 2096 1050 1053 1056 1084
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "vesa"
VendorName "Videocard vendor"
BoardName "VESA driver (generic)"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Virtual 1680 1050
Depth 8
Modes "MacBookPro17"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1680 1050
Depth 16
Modes "MacBookPro17"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1680 1050
Depth 24
Modes "MacBookPro17"
EndSubSection
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection
Section "ServerLayout"
Identifier "single head configuration"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
Section "Files"
# RgbPath is the location of the RGB database. Note, this is the name of the
# file minus the extension (like ".txt" or ".db"). There is normally
# no need to change the default.
# Multiple FontPath entries are allowed (they are concatenated together)
# By default, Red Hat 6.0 and later now use a font server independent of
# the X server to render fonts.
RgbPath "/usr/X11R6/lib/X11/rgb"
FontPath "unix/:7100"
EndSection
Section "Module"
Load "dbe"
Load "extmod"
Load "fbdevhw"
Load "glx"
Load "record"
Load "freetype"
Load "type1"
Load "dri"
EndSection
Section "InputDevice"
# Specify which keyboard LEDs can be user-controlled (eg, with xset(1))
# Option "Xleds" "1 2 3"
# To disable the XKEYBOARD extension, uncomment XkbDisable.
# Option "XkbDisable"
# To customise the XKB settings to suit your keyboard, modify the
# lines below (which are the defaults). For example, for a non-U.S.
# keyboard, you will probably want to use:
# Option "XkbModel" "pc102"
# If you have a US Microsoft Natural keyboard, you can use:
# Option "XkbModel" "microsoft"
#
# Then to change the language, change the Layout setting.
# For example, a german layout can be obtained with:
# Option "XkbLayout" "de"
# or:
# Option "XkbLayout" "de"
# Option "XkbVariant" "nodeadkeys"
#
# If you'd like to switch the positions of your capslock and
# control keys, use:
# Option "XkbOptions" "ctrl:swapcaps"
# Or if you just want both to be control, use:
# Option "XkbOptions" "ctrl:nocaps"
#
Identifier "Keyboard0"
Driver "kbd"
Option "XkbModel" "pc105"
Option "XkbLayout" "us"
EndSection
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "IMPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "yes"
EndSection
Section "Monitor"
# HorizSync 21.5 - 150.0
# VertRefresh 30.0 - 150.0
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "LCD Panel 1680x1050"
ModeLine "MacBookPro17" 136.3 1680 1720 1856 2096 1050 1053 1056 1084
Option "dpms"
EndSection
Section "Device"
Identifier "Videocard0"
Driver "vesa"
VendorName "Videocard vendor"
BoardName "VESA driver (generic)"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Virtual 1680 1050
Depth 8
Modes "MacBookPro17"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1680 1050
Depth 16
Modes "MacBookPro17"
EndSubSection
SubSection "Display"
Viewport 0 0
Virtual 1680 1050
Depth 24
Modes "MacBookPro17"
EndSubSection
EndSection
Section "DRI"
Group 0
Mode 0666
EndSection
USB Serial Port Adapter for Mac
22/01/08 12:14 Filed in: Mac
I have bought a couple of USB serial port adapters which work as serial ports on Mac OSX. They are from SerialIO.com.
Drivers can be downloaded from http://serialio.com/products/adaptors/usb_serial.php and installation instructions and so on are at http://serialio.com/support/OSX/USB-Serial-plug.php.
You have to stop them being used as network adapters so that the serial devices are available as ports for minicom and the like.
You can build minicom from the MacOS Ports system with “port install minicom”. You have to bodge one little bit that doesn’t compile, by turning a compile of static variables into normal globals, but otherwise it builds okay. Hopefully someone will fix the compilation problem by the time this is needed.
Drivers can be downloaded from http://serialio.com/products/adaptors/usb_serial.php and installation instructions and so on are at http://serialio.com/support/OSX/USB-Serial-plug.php.
You have to stop them being used as network adapters so that the serial devices are available as ports for minicom and the like.
You can build minicom from the MacOS Ports system with “port install minicom”. You have to bodge one little bit that doesn’t compile, by turning a compile of static variables into normal globals, but otherwise it builds okay. Hopefully someone will fix the compilation problem by the time this is needed.