Tech Musings

Saturday, April 30, 2016

Tracking Changes to the OS X File System

I was troubleshooting a problem today related to the use of parental controls in OS X 10.5 Leopard and form post-processing in Firefox when I made use of some rare (for me) but helpful set of UNIX terminal commands used to detect and view modifications to system files.

To offer context, we learned today that Firefox "bonks out" when parental controls are enabled in Leopard. People logged in under our limited student account were unable to authenticate to various Web sites, post text in blog spaces, etc. using Firefox. Not surprisingly, everything worked just peachy in Safari (isn't that a hoot?). After knocking our heads against the wall we determined the issue is probably related to the way Leopard's parental controls handle access to proxy services, and there is no fix (as of this post) except to use the Safari browser (yuck), manage everything using Workgroup Manager (not practical in our case), or disable Parent Controls altogether. Lovely.

Anyway, this exercise in futility was not a total loss because I re-learned how to search and find system files accessed (i.e. modified or read) during a specific time period.

For example, to see all the files that changed during a process (such as installing an application), create a timestamped file to use as comparison in the Terminal using touch and run the following find command:
$ touch ~/Desktop/Before.txt
do something...
$ sudo find / ~type d -cnewer ~/Desktop/Before.txt > ~/Desktop/After.txt
This creates a file named "After.txt" on the Desktop that lists all changes made to system files since you created the file "Before.txt."

Or, you can use the following command to search for files in your home directory that were modified exactly 2 minutes ago (or any time since):
$ find ~ -mmin -2 \! -type d
Pretty nifty! There is also a command-line program available called logGen which can be used to track changes to OS X system files modified during package installs. This tool comes in handy when creating personal .pkg installations using IceBerg or Apple's PackageMaker developer tool. I've had better luck creating successful package installations with Iceberg than with PackageMaker. Since I'm on the subject, I should mention another essential tool every Mac "techie" should be familiar with named Pacifist, a great little shareware application created by CharleSoft that can be used to peek inside Mac OS X packages, extract individual files and folders, and find missing or altered installation files.

Thursday, April 07, 2016

Show Scroll Position Firefox Extension

I created a Firefox extension this week to display the (X,Y) scroll coordinates of the browser window in the status bar. I'm pretty proud of myself, actually! This article written by Justin Huff was a big help. I'm planning to eventually add it to the Firefox Add-on extension Web site after I test it on multiple platforms and Firefox versions. So far, I've only had a chance to test it on Mac OS X with Firefox 2.0.x.

Yesterday, I was trying to decide where to place the vertical Y scroll position in a javascript scrollTo function and decided to look for a Firefox extension that would show me the window coordinates in real time. Amazingly, I couldn't find one. I was so surprised someone hadn't yet created this easy add on that I decided to create it myself!

In the meantime, feel free to test it out on your platform and let me know if it works for you!! This is still an experimental add-on which means you will need to create an account on the mozilla site to download it.

Show Scroll Position Extension (.xpi).