Good day for me today :-)
Mac OSX Hints have published two of my Mac hints! Quite pleased with that!
http://www.macosxhints.com/article.php?story=20080427091554310
and
http://www.macosxhints.com/article.php?story=20080427091327509
A collection of thoughts, tips and tricks and other ponderings relating to technology, now oxidized.
Showing posts with label mac. Show all posts
Showing posts with label mac. Show all posts
Thursday, May 01, 2008
Wednesday, April 23, 2008
Getting Alex to read you to sleep (Make your own Audiobooks on a Mac)
I have recently undertaken some training in which I have to cover a massive amount of material. Being the natural procrastinator that I am I immediately went on the prowl for better books, better methods and all other sorts of periphery that doesn't actually count as studying.
One of these projects was to convert the text versions of my study guides to audio so that I could listen to the text in the car while I drive (an ideal time to study). The process was actually surprisingly simple.
Here is a procedure to convert PDFs to Audio books.
1) Open the document in Preview.
2) Command + A (Select All), Command + C (Copy).
3) Open a new document in TextEdit.
4) Paste the contents into the new document (Command + V)
5) Convert the document to Text (Format -> Make plain text)
6) Save the file to a .txt document. For this example we use rawfile.txt
At this stage you might want to do some cleanup. I use a little Perl Script listed below. You might want to do some Regular Expression hacking do clean up the document from things like Footers, Headers or Page Numbers.
convert.pl
7) Save convert.pl to the file system. And make it executable:
8) Clean up the text document:
9) Open the file cleanfile.txt in TextEdit (you might have to choose the UTF-8 type)
10) Fire up Automator and create a Custom script with two actions.
Select an appropriate target directory and filename. I highly recommend choosing the voice Alex
11) Make sure your cleanfile.txt document in TextEdit is selected.
12) Go back into Automator and hit Play.
13) Sit back and relax while Leopard converts your text to an Audio file.
From there you can import the audio file into iTunes, convert it to Mp3 if you want and sync it to your iPod to take the book on the road.
Guess I should start studying now...
One of these projects was to convert the text versions of my study guides to audio so that I could listen to the text in the car while I drive (an ideal time to study). The process was actually surprisingly simple.
Here is a procedure to convert PDFs to Audio books.
1) Open the document in Preview.
2) Command + A (Select All), Command + C (Copy).
3) Open a new document in TextEdit.
4) Paste the contents into the new document (Command + V)
5) Convert the document to Text (Format -> Make plain text)
6) Save the file to a .txt document. For this example we use rawfile.txt
At this stage you might want to do some cleanup. I use a little Perl Script listed below. You might want to do some Regular Expression hacking do clean up the document from things like Footers, Headers or Page Numbers.
convert.pl
#!/opt/local/bin/perl
while (<>) {
s/^\d+\/.*$//; #Remove page numbers
s/^\d*.$//;
s/Chapter \d+: [\s\w]+//;
#Remove image and figure references
s/^Figure \d+.*/;
#Remove - continuations from end on lines.
if (s/-.$//) {
chomp;
}
print;
}
7) Save convert.pl to the file system. And make it executable:
$chmod u+x convert.pl
8) Clean up the text document:
$cat rawfile.txt | ./convert.pl > cleanfile.txt
9) Open the file cleanfile.txt in TextEdit (you might have to choose the UTF-8 type)
10) Fire up Automator and create a Custom script with two actions.
- Text -> Get Contents of TextEdit Document
- Music -> Text to AudioFile
Select an appropriate target directory and filename. I highly recommend choosing the voice Alex
11) Make sure your cleanfile.txt document in TextEdit is selected.
12) Go back into Automator and hit Play.
13) Sit back and relax while Leopard converts your text to an Audio file.
From there you can import the audio file into iTunes, convert it to Mp3 if you want and sync it to your iPod to take the book on the road.
Guess I should start studying now...
I'll do some home work while I listen to my fresh Audiobook :-)
Monday, January 28, 2008
Open Season for Open Source
Nokia has acquired Trolltech. This hot on the heals of Sun's acquisition of MySQL. It truly is an exciting time and really gratifying for those of us that have been saying for years that Open Source Software is viable and that it makes sense to businesses.
I've always had a soft spot for KDE and Trolltech and it really seems like a great opportunity for them to truly become serious players. Webkit has already demonstrated over and over that KDE is build on top of solid technology. An interesting intersection of KDE -> Trolltech -> Nokia and Apple...
I've always had a soft spot for KDE and Trolltech and it really seems like a great opportunity for them to truly become serious players. Webkit has already demonstrated over and over that KDE is build on top of solid technology. An interesting intersection of KDE -> Trolltech -> Nokia and Apple...
Thursday, January 10, 2008
Mac OSS roundup
Thanks for KMF for some of these.
Looking for OSS software for Mac OS X?
Here is a list of very useful Open Source Software/Free Software directories for the Mac. I have used a couple of these with great success. There inevitably is some duplication, so be warned.
Here they are:
Looking for OSS software for Mac OS X?
Here is a list of very useful Open Source Software/Free Software directories for the Mac. I have used a couple of these with great success. There inevitably is some duplication, so be warned.
Here they are:
- Open Source Mac (http://www.opensourcemac.org/)
- FreeSMUG (http://www.freesmug.org/)
- iUseThis (http://osx.iusethis.com/search?q=open+source)
- CocoaDev (http://www.cocoadev.com/index.pl?CocoaOpen)
- AjaxFlakes Top 100 Best (http://www.ajaxflakes.com/open-source/top-100-best-open-source-mac-software)
- The mother ship (http://www.apple.com/opensource/)
- MacPorts (http://www.macports.org/)
- Fink (http://www.finkproject.org/)
Apple Address Book and Microsoft Exchange (LDAP)
I had a short discussion this afternoon with a fellow Mac fanatic (KMF) discussing the problem we both share and that is: Accessing Microsoft Exchange from Mac OS X.
There are three elements that you would mostly be interested in: email, calendar and contacts. This quick howto deals with getting Address Book to work with LDAP (Microsoft Active Directory in our case).
Step 1: Determine the default naming context (base dn) for the search
- Fire up Terminal and issue an ldapsearch to determine the default naming context:
$ldapsearch -h your.exchange.server -x -b '' -s base '(objectclass=*)' 'namingContexts'

- Search for the lines beginning with "namingContexts":
namingContexts: DC=mycompany,DC=com
namingContexts: CN=Configuration,DC=mycompany,DC=com
namingContexts: CN=Schema,CN=Configuration,DC=mycompany,DC=com
The result you are looking for is the "base/root" and that is the shortest one in the case of Exchange (btw - this will work on other LDAP servers too), ie. DC=mycompany,DC=com.
Step 2: Configure Address Book to query the server
- Fire up Address Book and go to the Preferences (Command + ,). Select the LDAP tab.
- Hit the "+" to add a new server.
- In the "Server" field complete the hostname of your Exchange server or Active Directory domain controller in the case of larger companies.
- In the "Search Base" use the information that you retrieved from "ldapsearch" earlier. It will be in the format DC=company,DC=com.
- Choose "Simple" authentication.
- "User Name" should be your normal Windows logon.
- "Password" again, your Windows password.
Step 3: Searching your Global Address list.
- Address Book will automatically query the server whenever you search for a name.

This will also happen whenever you type new addresses into Mail.app when composing emails.
Hope this helps!
There are three elements that you would mostly be interested in: email, calendar and contacts. This quick howto deals with getting Address Book to work with LDAP (Microsoft Active Directory in our case).
Step 1: Determine the default naming context (base dn) for the search
- Fire up Terminal and issue an ldapsearch to determine the default naming context:
$ldapsearch -h your.exchange.server -x -b '' -s base '(objectclass=*)' 'namingContexts'

- Search for the lines beginning with "namingContexts":
namingContexts: DC=mycompany,DC=com
namingContexts: CN=Configuration,DC=mycompany,DC=com
namingContexts: CN=Schema,CN=Configuration,DC=mycompany,DC=com
The result you are looking for is the "base/root" and that is the shortest one in the case of Exchange (btw - this will work on other LDAP servers too), ie. DC=mycompany,DC=com.
Step 2: Configure Address Book to query the server
- Fire up Address Book and go to the Preferences (Command + ,). Select the LDAP tab.
- Hit the "+" to add a new server.
- In the "Server" field complete the hostname of your Exchange server or Active Directory domain controller in the case of larger companies.- In the "Search Base" use the information that you retrieved from "ldapsearch" earlier. It will be in the format DC=company,DC=com.
- Choose "Simple" authentication.
- "User Name" should be your normal Windows logon.
- "Password" again, your Windows password.
Step 3: Searching your Global Address list.
- Address Book will automatically query the server whenever you search for a name.

This will also happen whenever you type new addresses into Mail.app when composing emails.
Hope this helps!
Thursday, December 20, 2007
Mac OS X Open Source and Security
Previously I blogged about my regularly used Open Source applications on the Mac. Today I am dealing with some applications that deal with security on the Mac. In my career I wear two hats, one of Open Source advocate/developer/consultant and then also a security consultant hat.
I also have a keen interest in keeping my Mac secure when using it from day to day - thus the tools I am about to discuss deal with "personal" security (local firewall for example) as well as "network" security.
Lets get started.
I also have a keen interest in keeping my Mac secure when using it from day to day - thus the tools I am about to discuss deal with "personal" security (local firewall for example) as well as "network" security.
Lets get started.
- MacGPG (http://macgpg.sourceforge.net/)
- The Free Software implementation of PGP. I specifically use the GPGMail plug-in for Apple Mail.app to allow me to send and receive encrypted email as well as sign emails and verify email signatures.
- sshfs (http://code.google.com/p/macfuse/)
- A FUSE pluggable filesystem for the Mac that allows it to mount drives on other Unix or Linux hosts using ssh. This might not be a specific security related app but it does allow for extra security when sharing across a network - the links are encrypted and safe from snooping.
- Waterroof (http://www.hanynet.com/waterroof/)
- A personal firewall manager that exposes the underlying, powerful, ipfw firewall of Mac OS X. There were a couple of scares with the Leopard firewall's default behavior when it first ship and it led me to look for more information on the topic. Waterroof allows a user to truly fine-tune the firewall. A handy wizard also allows novice users to set up a very secure default policy.
- MacPorts Apps (http://www.macports.org/)
- Some applications are best served using macports. To install the following app download and install macports and then issue: "sudo port install appname"
- nmap (http://insecure.org/nmap/)
- nmap is the de-facto standard when it comes to port scanning. You can use nmap to learn a lot about hosts, networks and services.
- wireshark (http://www.wireshark.org/)
- wireshark is a packet sniffer with a lot of advanced capabilities. Packet captures can be analyzed to a great level of detail. It also produces traffic flow and usage reports on the traffic that it captures. If you need find out what is going on on your network you need Wireshark.
Wednesday, December 19, 2007
Mac OS X Open Source Roundup
As we approach the end of the year, here is a list of really usefull Open Source utilities and applications that I use regularly on my Mac.
I run Mac OS X 10.5 (Leopard), but most of the applications should work on Tiger (10.4) as well.
I run Mac OS X 10.5 (Leopard), but most of the applications should work on Tiger (10.4) as well.
- Freemind (http://freemind.sourceforge.net/)
- Indispensable mind-mapping application written in Java. I have been using Freemind for years on Linux, Windows and of course now on the Mac as well. Truly useful with some real advanced functions and scripting capabilities.
- Vienna (http://www.opencommunity.co.uk/vienna2.php)
- An Open Source RSS feed reader. Vienna is a part of my daily routine in which I track a couple of hundred feeds. Once you get to know it you will love it even more - some clever keyboard shortcuts really create a lot of efficiency.
- Firefox (http://www.mozilla.com/en-US/firefox/)
- Firefox is the standard web browser for millions of Windows, Linux and Mac users out there. I prefer Firefox as opposed to Camino on the Mac as I really depend on some plug-ins for my daily security and privacy needs (I'll blog more about this again soon).
- Adium (http://www.adiumx.com/)
- Due to its massive multi-protocol nature (supports over 10 different IM providers) Adium was a no-brainer when it came to Instant Messaging on the Mac. I have never tried iChat or any alternatives mostly as Adium did such a stellar job out of the box. Growl integration makes it even more powerful - I like the ability to do specific actions when certain contacts come online. It also offers the ability to "bundle" accounts from multiple networks into one account for those contact who like myself are on various networks.
- Colloquy (http://colloquy.info/)
- The gents behind Adium also recommend Colloquy for IRC (internet relay chat). My usage of IRC varies depending on project and job focus but I have started to learn the nuances of the program and have grown to love it. I'm not crazy about its default behavior but after a little bit of tweaking it really turned out to be a powerful tool.
- Quicksilver (http://www.blacktree.com/projects/quicksilver.html)
- What can one say about Quicksilver? It has changed the way I interact with my computer and probably would be one of the functions I cant live without. The ability to "act without doing" as the developers call it creates the most amazing productivity gains. I am not a Quicksilver ninja yet but the limited ways that I use it in has made life so much easier... Thinking of an app? Three keystrokes and you're there.
Tuesday, November 20, 2007
WEP?? Leopard Internet Sharing Woes
I anxiously awaited Leopard in the hope that Intenet Sharing would support WPA. I have a really hard time understanding why Leopard supports Internet Sharing through WEP. Aircrack-ng and other tools can crack WEP in uder a minute - it just does not make sense.
Perhaps the Lazyweb can recommend a solution whereby I can do WPA through third party support? From what I understand WPA has the same performance impact as WEP (when not using AES) - but it probably is a case of the Hardware only supporting the old standard...
My recommendation? If you truly need to do Internet Sharing do it through the Ethernet port (using a crossover cable) or enable WEP only for a short while and change the password every time you use it.
Perhaps the Lazyweb can recommend a solution whereby I can do WPA through third party support? From what I understand WPA has the same performance impact as WEP (when not using AES) - but it probably is a case of the Hardware only supporting the old standard...
My recommendation? If you truly need to do Internet Sharing do it through the Ethernet port (using a crossover cable) or enable WEP only for a short while and change the password every time you use it.
Friday, November 16, 2007
Leopard Firewall - OS X 10.5.1 relief
I'm glad to report that this morning after updating to Mac OS 10.5.1 the firewall seems to be working as advertised. They dropped the "Block all incoming" moniker and replaced it with "Allow only essential services", which I selected.

Also, I enabled "Stealth Mode" under Advanced.

I then ran some tests from another host to verify that the firewall was up and it seemed to be performing as advertised. I'm pretty interested to see what the "Essential" services are - perhaps I will do some digging soon.
Just for completeness run the following tests from another host on the network:
$ ping hostname
(Should return no replies if stealth is on)
$ nmap hostname
(Should also not return with any open ports)
I disabled my firewall temporarily to scan for some open ports and then tested connections to those ports using telnet after re-enabling the firewall. All results were also positive.
I'm very pleased that this issue has been resolved.

Also, I enabled "Stealth Mode" under Advanced.
I then ran some tests from another host to verify that the firewall was up and it seemed to be performing as advertised. I'm pretty interested to see what the "Essential" services are - perhaps I will do some digging soon.
Just for completeness run the following tests from another host on the network:
$ ping hostname
(Should return no replies if stealth is on)
$ nmap hostname
(Should also not return with any open ports)
I disabled my firewall temporarily to scan for some open ports and then tested connections to those ports using telnet after re-enabling the firewall. All results were also positive.
I'm very pleased that this issue has been resolved.
Thursday, November 08, 2007
Leopard Firewall Woes
I have been using Mac OS X Leopard for the last few weeks and the article on Heise Security caught my attention. I use a 3G connection to the internet quite often and have to assume that a NAT firewall wont always be available.
I did some of my own tests and as far as I could tell setting the firewall to "Block All Incoming Connections" just does not seem to work.
The output of "sudo ipfw list" does not seem to change when switching between "Allow All" and "Block All"...
Here is what I recommend for now:
- Download WaterRoof ipfw at: http://www.hanynet.com/waterroof/ (its OSS).
- Run through the Wizard, just clicking next is the equivalent of "Block All"
- If you want "Stealth", go to "Static Rules" and add a rule to block all ICMP from "Any" to "Me".
- Make these changes permanent through: Tools -> Startup Script -> Install Startup Script.
To test if your setup is any good head over to Shields Up! Steve Gibson's excellent resource and run some tests to check that your firewall is actually working as planned. Shields Up! can be found at: http://www.grc.com/.
Please note that this test is most effective if you are directly connected to the internet. If you cannot connect directly rather Google for nmap and run some tests on your LAN. I used nmap to run some tests against the firewall to confirm the results - consider just trying to ping your machine from another host at least.
For reference here are my rules, running "sudo ipfw list" from the terminal should give you similar results.
And remember: "Friends do not let friends get Owned" - Pauldotcom Security Weekly
I did some of my own tests and as far as I could tell setting the firewall to "Block All Incoming Connections" just does not seem to work.
The output of "sudo ipfw list" does not seem to change when switching between "Allow All" and "Block All"...
Here is what I recommend for now:
- Download WaterRoof ipfw at: http://www.hanynet.com/waterroof/ (its OSS).
- Run through the Wizard, just clicking next is the equivalent of "Block All"
- If you want "Stealth", go to "Static Rules" and add a rule to block all ICMP from "Any" to "Me".
- Make these changes permanent through: Tools -> Startup Script -> Install Startup Script.
To test if your setup is any good head over to Shields Up! Steve Gibson's excellent resource and run some tests to check that your firewall is actually working as planned. Shields Up! can be found at: http://www.grc.com/.
Please note that this test is most effective if you are directly connected to the internet. If you cannot connect directly rather Google for nmap and run some tests on your LAN. I used nmap to run some tests against the firewall to confirm the results - consider just trying to ping your machine from another host at least.
For reference here are my rules, running "sudo ipfw list" from the terminal should give you similar results.
$sudo ipfw list
00100 allow ip from any to any via lo*
00110 deny ip from 127.0.0.0/8 to any in
00120 deny ip from any to 127.0.0.0/8 in
00130 deny ip from 224.0.0.0/3 to any in
00140 deny tcp from any to 224.0.0.0/3 in
01000 allow tcp from any to any out
01000 allow tcp from any to any established
01100 deny icmp from any to me
65534 deny tcp from any to any
65535 allow ip from any to any
And remember: "Friends do not let friends get Owned" - Pauldotcom Security Weekly
Tuesday, August 07, 2007
Switch!!
As of last Thursday I am a Mac OS X user - and I love it!
The latest Macs are the only platforms you can run all 3 of the major OS flavors on (my biggest reason for switching). I am running VMWare Fusion (for Windows/Unity) as well as bootcamp. My Ubuntu install is relegated to a virtual machine for now, but the hardware will run it just fine natively. Contrary to my expectations, I am really at home in OS X - the switch was quick and its complete.
The latest Macs are the only platforms you can run all 3 of the major OS flavors on (my biggest reason for switching). I am running VMWare Fusion (for Windows/Unity) as well as bootcamp. My Ubuntu install is relegated to a virtual machine for now, but the hardware will run it just fine natively. Contrary to my expectations, I am really at home in OS X - the switch was quick and its complete.
Subscribe to:
Posts (Atom)