Useful basic OS X HacksEven though I have a few Mac's (a 400 Mhz G4 power book and a 1000 Mhz eMac) capable of running Mac OS 10.4, and a pimped out beige box that can run 10.3.9, I've been happy using 9.2.2 because IMHO it has a much nicer interface and I have a few performance issues with X. The major issue I have is how much slower OS X runs with respect to OS 9 on a given computer. Most of the time I just use a computer to surf the web, so I don't need to use an OS like X that can run multiple threads, be memory protected, etc., etc. 'Nix based operating systems have their place, but for a simple guy like me, that just wants to check eMail and browse the web, OS 9 has been my chose because its small, stable, and very secure. I knew I had to eventually upgrade to X full time so last December 2005 I bought the last generation of the MacMini using a 1.5 Mhz G4 that could run classic and comes in a nice case which isn't all that hard to take apart. What I really like about the MacMini is its low power consumption... According to Editor Frank Voelkel (a review from Tom's Hardware Guide), the Mac mini only draws 20 watts of power and 28 watts during DVD playback. In contrast, Intel-based systems draw up to 160 watts under comparable conditions, eating up almost six times the power of the Mac mini. But IMHO the eye candy of X is overkill, and the user interface out of the box is a step backwards with respect to OS 9 because the interface does not adhere to the Human Interface Guidelines. So to get back some features of OS 9, I started by tweaked the X interface with Classic Menu shareware and removing some of the OS X bloat using the following basic hacks. Eliminate stuff ya dont needWhat most uses don't know is X generates lots and lots of cache and log files. One solution to delete these files is a shareware program like CacheOutX. This simple utility that makes it simple to erase and free up some disk space after using Safari 2 the default browser in OS 10.4 NOTE Apple Computer only supports Safari their in house browser for OS 10.4!!! In OS 10.3 Apple included a copy of Internet Explorer published by Microsoft which was helpful cause there were major issues with Safari 1.3.x and OS 10.3.9. A bonus to using CacheOutX is it also eliminates other items like "history" and "cookie" files which over time can take up a lots of unnecessary disk space. ![]() Cache files in X are located in a users ~/library/caches/ folder and these files can be manually removed... In this thumbnail you will see the contents of the cache generated by Shiira one of many lessor known OS X browsers. FYI Safari has an option to turn off recording the history of sites ya visit, just look under "file" then "enable private browsing" but this option defaults to off when you quit Safari. I've been using computers since the early 1980's when the c64 was trying to take market share away from the Apple II and the IBM XT with a 5 Mb harddisk was hot stuff! Back then to make computers run programs faster, graphics (if you can call them that) were turned off so that every clock cycle was used for calculations. Old habbits die hard and IMHO some the the eye candy of OS X (like the shadows) of windows and dialog boxes are a bit much. Guess there are other old school individuals out there too, who feel eye candy is fluff and were motivated enuf to code ShadowKiller which removes window and menu shadows in OS X. This changes the look of MacOS X completely, and speeds up its operation. WiFi InsecuritySince I help operate a community wireless network my Mac's pretty much are always connected to the web via a homebrew wireless bridge with a 9 dBi antenna that feeds a signal to an ethernet port. This homebrew setup is lots more sensitive than the built in MacMini radios, so I disabled the built in Airport and Bluetooth MacMini devices. This is because there are a few interesting hacks that allow knuckleheads who know a few tricks to break into a computer thru these areas. Since I'm not using wireless devices that use these paths into the computer, I figure might as well turn off these potential problems. ![]() Someone intent on stealing personal information can pick up WiFi signals with a packet sniffer so use built in OS X tools to protect your Mac from snoops! If ya have an always-on Internet connection, check out Tiger's built in anti cracker tools. Go to the Sharing preference pane and click on the Firewall tab, to see the "advanced" button. Clicking on it allows ya to check options such as Stealth Mode and Block UDP Traffic. With Stealth Mode enabled, uninvited queries to your computer will receive no acknowledgment, making it harder for someone to discover information about your Mac. Keep in mind that some applications like VoIP and online games use the UDP (User Datagram Protocol), so depending upon what application you are running UDP might need to be allowed thru. Terminal BasicsMac OS X is based on an industrial-strength UNIX foundation which has time-tested security protocols and uncompromising performance (the same can not be said for windows). Geeks can access OS X commands at any time from the Terminal application. Since this page is about hacking security tips for Safari and OS X, ya might find the following basic commands useful... ssh - or Secure Shell provides users with a secure, encrypted mechanism to log into systems and transfer files and is included in every version of Mac OS X. If you wish you enable Mac OS X’s built in SSH server you can do so by opening your System Preferences, clicking on ifconfig - is a quick and easy way to figure out what ip address your Mac is using. To use ifconfig, open up Terminal.app, and type sudo ifconfig en0 lladdr aa:bb:cc:dd:ee:ff - spoofing a mac address is handy for network testing. Basically this command allows a user to spoof the MAC address of the built in ethernet connection (en0) where aa:bb:cc:dd:ee:ff is the new MAC address you want to set. Note: this "mac address" hack is good until your next reboot. Removing the non-english language packsOS X has localised support for many different languages, it includes a ton of *.lproj files that are used to translate the OS and applications to the correct language. If you don't plan on using any other language, you can delete those files and save yourself a couple hundred Mb of disk space. Monolingual is a program for removing unnecessary language resources from Mac OS X or for those who want to use the command line interface in terminal, type:
The find and delete operations will take a couple of minutes and will free up couple hundred Mb of disk space. Here's a quick explanation of the various parts of the command: find / - executes the 'find' command, and tells it to start at the root ( / ) level of the system \! -name "English.lproj" -name "*.lproj" - tells find to look for any file that ends in '.lproj' except files with the full name of 'English.lproj' -type d - tells find only to look at directories (all the .lproj 'files' are actually directories) -exec rm -rf -- { } \; - tells find to run the 'rm' command on the results of its search (-rf tells rm to recursively delete through the directory tree wihout confirmation, -- tells rm that anything following that is not an argument, I don't completely understand what the brackets do, and the \; signals the end of the 'exec' statement) -prune - tells find not to look further into a directory once a match has been made; this prevents the rm command from trying to remove a directory inside a directory that's already been removed. Safari startup screenSafari 2.x and OS 10.4 are now very mature and stable, but I still like using a workaround I used in Safari 1.x to place a book mark of my site on the bar (look at the left hand side) to act like a "home" key. You can also add a single line of JavaScript: javascript:window.print() which I placed on the right hand side of the bookmark bar with a title "print button" to improve the Safari interface. ![]() The Safari 1.x User Interface did not have a "home" or "print" button, so my work around was to use the bookmark bar. As shipped Safari does not show a status bar, to change this option check View/Show Status Bar... you can also select View/Customize Address Bar... to change the default settings. Safari "Debug" menuAnother shareware program ya might find useful is TinkerTool. This utility allows users to enable the DEBUG mode in Safari. Essentially the DEBUG mode in Safari allows users to tweak browser settings with an easy to use interface. The KISS philosophy of design and security states ya eliminate as many options as possible so as to minimize potential problems and security issues. Poking around the Safari DEBUG menu I discovered that it is possible to disable RSS, so I did because I visit the sites I find interesting on a regular basis and do not see the need to have site feeds. With the Debug menu ya also can change the user agent (i.e. ya can make web sites think you are using another browser, a windows machine using explorer for example). The debug menu has lots of options so check it out!!!! FYI an alternative method to enable the DEBUG mode in Safari is to launch Terminal, enter defaults write com.apple.Safari IncludeDebugMenu 1 at the command prompt and press return... Blocking AdsOne other reason I like using OS 9 is how well filtering the direct TCP/IP stream works for ad blocking. I've tried a few of the methods of blocking ads in X, like using CSS and tweaking the hosts file, but these methods were not as nice or effective as the OS 9 solution. Thus far the best solution I have found to block ads using Safari is a PlugIn called SafariBlock which allows a user to block a graph image. Version 1.1.4 of SafariBlock works pretty good, but I do not like the built in user interface to edit the sting of text that specifies where the graphic is located, so my work around to this problem is to use a text editor on: ~/Library/Preferences/SafariBlockFilters.plist to fine tune specific settings. I was kind of curious to see if SafariBlock would work with other OS X browsers, so I tried it with Shiira, but it did not work out. ![]() There are several methods to block ads, with Shiira, another OS X browser, I used a CSS method. Looking at the HTML source, I've discovered that ad blocking techniques like SafariBlock and an ad blocking CSS file do not eliminate graphical references in the HTML. Basically SafariBlock and CSS methods do not allow browsers to display specific graphic images like ads, but images are still in the cache. In OS 9 when I blocked ads using theWebFree extension, the HTML code did not include have calls to include graphical ad images (i.e. graph ads were treated as comments in HTML), and therefore saved lots of bandwidth. If you use the FireFox browser, ad blocking is possible using one of the Firefox Add-ons Adblock Version 0.5.3.043. If you switch between browsers, you might consider importing/exporting ad blocking lists which is what I did by using a editor (in my case I made a duplicate of the SafariBlockFilters.plist which is the list of sites used by the ad blocker in Safari, removed all the HTML like tags, and imported the text file into the FireFox ad blocker). AcidSearchAcidSearch is a search enhancement for Safari. It adds unlimited "Search Channels" to Google or any other web based search field. Channels can be customized in a nearly infinite variety of ways. For individuals who do not know how to write cgi scripts or know HTML, AcidSearch can be be used to complement any personal search tool you use so ya do not have to write something custom like this... PDF's in SafariOne thing I do not like with Safari 2.x is the way it treats PDF's (in Safari 2.x Apple included a built in simple PDF reader). Doing some checking I found ya can make Safari 2.x treat PDF's just like Safari 1.x did (that is, save them to your default download folder) by downloading a PDF Browser PlugIn. One browser |