Monitor Your Mac with Folder Actions
TMO Quick Tip - Monitor Your Mac with Folder Actions
by , 7:30 AM EST, February 20th, 2006
Some application installers add items to your Library folder that you may not want to have, and there is the possibility that someone could try to trick you into installing something you would rather not have on your computer. With a little help from Mac OS X Folder Actions, you can take a proactive approach to defending your system and files.
Let's add a folder action to your StartupItems directory, so we'll know if any application installers add anything that will launch automatically when your Mac is turned on.
If Folder Actions hasn't already been enabled, we need to do that first. Here's how:
-
- Launch Folder Actions Setup. It's in Applications > AppleScript > Folder Actions Setup.
- Click the Enable Folder Actions check box.
- Quit Folder Actions Setup.
![]() Make sure Folder Actions are enabled. |
|---|
Now let's attach the Folder Action to the StartupItems folder:
-
- Navigate to your StartupItems folder. It's in the Library folder on your hard drive.
- Control-Click (Right-Click on a two button mouse) the StartupItems folder and select Attach a Folder Action.
- Select add - new item alert.scpt (The script should be at the top of the list.), and click the Choose button.
![]() Use the StartupItem's contextual menu to add a folder Action. |
|---|
Any time an item is added to your StartupItems folder, you'll see an alert dialog that can open the folder and highlight any new items.
![]() The Folder Action Alert dialog. |
|---|
Feel free to monitor other folders, too. If your Library folder has an InputManagers folder, that's a good one to attach this Folder Action to. Check the Library folder that's in your Home Directory. If you have an InputManagers folder there, be sure to attach this action to it as well.
Observer Comments
Mon Feb 20, 2006 9:18 am Subject: Contextual Menu "Attach" Does Nothing
Mon Feb 20, 2006 9:37 am Subject: Re: user specific or system wide?
It can be applied to ANY folder you want to watch. The example is targetting the /Library/StartupItems folder, but you could just as easily attach it to ~/Library/StartupItems (if it exists).
If you want to protect against the recent trojan, also apply it to your ~/Library/InputManagers folder and /Library/InputManagers. If those folders don't exist, create them first.
FYI, the tilde "~" indicates your home folder in Unix speak, while paths starting with just a slash "/" are paths beginning from the root of your system.
Nice but there are more ways than that to make items start with start up.
You need also to monitor your ~/library/loginwindow.plist, and maybe
also /library/preferences/com.apple.loginwindow.plist
and the same file in the ~library/preferences.
HP sticks a start up item in one of those last 2, I've forgotten which, and
it took me a LONG time to find out where it was.
Quotemadgunde wrote:
It can be applied to ANY folder you want to watch.
Sorry, I'll be more specific...it was the action, not the folder I was asking about...if I put a watch on the /library/Input Managers folder, would this flag up a change to whoever was logged in (system wide), or do I have to login and configure the action for each user to get it to do that (user specific)?
Mon Feb 20, 2006 3:48 pm Subject: Monitoring startup items
QuoteGuest wrote:Quotemadgunde wrote:
It can be applied to ANY folder you want to watch.
Sorry, I'll be more specific...it was the action, not the folder I was asking about...if I put a watch on the /library/Input Managers folder, would this flag up a change to whoever was logged in (system wide), or do I have to login and configure the action for each user to get it to do that (user specific)?
There is a startup items folder for each user, so you'd have to monitor each one.
Quotegslusher wrote:QuoteGuest wrote:Quotemadgunde wrote:
It can be applied to ANY folder you want to watch.
Sorry, I'll be more specific...it was the action, not the folder I was asking about...if I put a watch on the /library/Input Managers folder, would this flag up a change to whoever was logged in (system wide), or do I have to login and configure the action for each user to get it to do that (user specific)?
There is a startup items folder for each user, so you'd have to monitor each one.
?
OK, I guess that could still be seen as ambiguous, so I'll try to be more specific...if I, logged in as me, put a watch on the [root] /library/Input Managers folder would this show an alert to whoever happened to be logged in at the time something changed in this folder, or would I need to get each of the users separately to put their own watch on this same folder?
Comments are currently closed. Please email the author instead.
Recent Headlines - Updated July 3rd
- Fri, 10:29 AM
- News - Apple Warns of Learning Interchange Security Breach
- 7:30 AM
- News - Happy Fourth of July!
- Thu, 6:07 PM
- TMO Scoop - Psystar Moves to Drop Bankruptcy Ahead of Apple Legal Battle
- 5:37 PM
- News - Uncomfirmed Reports Say Apple & Nvidia On The Outs
- 4:57 PM
- News - Microsoft Sick Over Barf Ad
- 4:09 PM
- Product News - KRK Ships R6 Passive Studio Monitor for Recording
- 3:45 PM
- John Martellaro's Blog - Particle Debris (week ending 7/2) Juiced, Joost and Goosed
- 3:12 PM
- Product News - ExactScan 2 Pro Released
- 1:56 PM
- Deal Brothers - Apple TV with 160GB Hard Drive: $324.00 Delivered
- 12:46 PM
- TMO Appearances - TMO Appearances Jeff Gamet Shares iPhone Apps on MacJury
- 10:41 AM
- Product News - Art Text 2.2 Adds New Templates, Layer Options
- 10:04 AM
- Hot Forum Topic - Deciphering Mac Sales
The Mac Observer Reader Specials
- Download Typestyler, still the Ultimate Styling Tool for Internet, Print and Video Graphics. Works great in Classic with a Native OS X Version on the way. Free Tryout: www.typestyler.com
OWC: Big Drives, High Performance - Not High Prices! SATA 3.5" up to 1.5TB. Notebook up to 500GB. FW up to 6.0TB. 1.0TB Drive Models from as low as $97.99 www.MacSales.com
If you're using a Mac, then you've gotta check out Full Tilt Poker for Mac. This Full Tilt Poker bonus code does the unthinkable, it actually rewards!
RamJet Memory: MacBook and MacBook Pro 4GB kits for $57.99! Mac Pro 4GB Kits $99.99! iMac and Mac mini 4GB Kits for $57.99! 1TB SATA Hard Drives for $109.99! Click hereFor the latest Apple products use Ciao, a price comparison website, to find laptops like MacBook Air. Then find the best prices on MP3 players and use our comparison tool to evaluate mobile phones like the Apple iPhone.
Laptop Hardware Provided by TechRestore - Overnight Mac & iPod Repairs.




