I was looking to solve the mysterious auto-creation of a file creation of profiles.bin in my Home folder. I found this hint useful for deleting the file with AppleScript. In that hint, the author attributes the file to non-English versions of Microsoft office. I did a bit of poking around and was able to find another solution and information about the source on this post on the Macitynet.it forums.
The page is in Italian, but for those of you who can't read it, clever user 'faxus' explains that Microsoft Office is most likely only part of the problem. He continues to explain that there is problem with the Display profiles being out of sync with certain applications, and profiles.bin is therfore created by necessity upon restart. User 'marcodal' notes then that creating a new Display profile on the affected machine solves the problem.
Therefore, following his example, I went to System Preferences » Displays » Color » Calibrate, and accepted all of the default settings for my MacBook Pro 2.4; this created a new Display profile called "Color LCD Calibrated." After a few restarts and running of different Office programs, I do not see the profiles.bin file being created any more.
I can't say if this is useful only for the Italian version of Office. Obviously Italians are having the issue, but my own version of Office is English language.
This previous hint showed how to set up an AppleScript droplet to modify the creation date of a file. But what if you want to sync the modified date and Creation dates instead? This AppleScript has been created to do just that. It has evolved from one Daniel A. Shockley provided in a comment to the previous hint, and has been extended to fit this purpose.
To set your files' modified date to be the same as the creation date, use the AppleScript as a droplet application. Copy and paste the text into a new script in Script Editor, and then save it as an application. Run the application to bring up a requester, or drop your files (not folders) on the application directly.
Software Update has a 'quirk' in which non-admin users will never get prompted to install updates, even if the administrator sets them automatically download. So the problem is that if you have multiple machines in a mostly unmanaged environment, updates only occur if an admin logs in or if users run Software Update manually, and in either case the process must be authenticated with an admin password
But partially no more! If you edit the sudoers file, you can allow the CLI version of Software Update (i.e. softwareupdate) to be executed by your users.
Edit the sudoers file /etc/sudoers. Use the command sudo visudo; this will drop you into the default visual editor (usually vim).
Add ALL ALL= NOPASSWD: /usr/sbin/softwareupdate to the file. Placing it at the bottom is OK. Be sure to add comments on your change by using # as the first character. Do not comment out the actual sudoers directive you just added, however. Save and exit the editor.
Run softwareupdate -ia from Terminal in a non-admin user (any) account and watch the show.
I don't think this action will prompt for a restart, so the system will be running in an indeterminate state. Be sure to restart right away if you are trying this on a reboot-needed update. You have been warned.
Real world uses
With this hurdle covered, you can now add a cron/launchd job to download updates for sure (softwareupdate -d). I have been thinking about seeing if I can work this into the logouthook function. If so, then shutdown -r now will also need to be in sudoers. It has also been suggested to use an osascript command to issue a Finder restart to allow users the normal warnings.
Trying to convert RTF-formatted text on the clipboard to plain text is a nightmare. There are many solutions out there, some of which cost money, and others which are free but don't work reliably. So here's an AppleScript that will do the job:
set the clipboard to string of (the clipboard as record)
on error errMsg
display dialog errMsg
Turn it into a run-only AppleScript, bind that AppleScript to a keyboard shorcut with a utility like Keyboard Maestro (my personal favorite), and never look back again. Note that the code above is adapted from the script "clip2pure_text" found at the bottom of this blog post.
[robg adds: In the comments to this older hint, an alternative method was provided -- just do a pbpaste | pbcopy, if you happen to be working in Terminal when you need this done.]
So you've bought a new Mac, but your old Mac is up-to-date with the latest software updates from Apple. Or you're doing a fresh install from your older install disk to a new drive, and plan on migrating from your old drive. Chances are your new Mac may NOT have all the current Mac software updates on it. Certainly your fresh install won't. Here's how to do migration sanely.
When asked if you are going to migrate your stuff from another Mac or partition, say no, and proceed to enter your user information -- make sure that your shortname is the same as on your other Mac or existing install. When you finish that, create a temporary account via System Preferences » Accounts.
Next run Software Update to bring the new Mac or install up to date. Run it again until it says there are no more updates, as some updates rely on others being installed before they will be available. Then log out of your account and into the temporary one. Now you are ready to migrate your original user and applications, and stuff from your old Mac or drive. Migration Assistant is located in /Applications » Utilities. Take the family out to dinner or a movie while your files are copied to the new Mac.
If you like to use the random screen saver option in the Desktop & Screen Saver System Preferences panel, you might find the .Mac screen saver somewhat annoying: unless you've configured slide shows in its Options panel, the default view is a bunch of Apple products fading in and out of your screen -- and when in random mode, the .Mac screen saver can appear at any time.
Someone on the Macworld forums asked about disabling it, and I thought of two possible solutions. First, you could go into the Options screen for the .Mac screen saver and uncheck the Public Slide Show option. This will cause the saver panel to show a message stating you need to pick at least one public show before using the .Mac screen saver. However, I don't know if this will prevent the .Mac screen saver from showing in the random rotation -- it's not an easy thing to test!
The second solution, and one that's guaranteed to work, is to remove the .Mac screen saver from the list. Screen savers are stored in the /System » Library » Screen Savers folder, but if you look there in the Finder, you won't see the .Mac saver listed. That's because its name starts with a period, which means the Finder believes it to be invisible.
So instead, quit System Preferences, open a Terminal, and execute these two commands, pressing Return after each and providing your admin password when asked:
$ cd "/System/Library/Screen Savers"
$ sudo mv .Mac.slideSaver .Mac.slideSaver.old
That's it; the .Mac screen saver is now disabled. To get it back in the future, just use these two commands:
$ cd "/System/Library/Screen Savers"
$ sudo mv .Mac.slideSaver.old .Mac.slideSaver
I did test this solution, and it works -- as one would expect, since we're just renaming a file.
PocketMod is an origami-like manipulation of an 8½" by 11" piece of paper into an eight-page booklet. The output of the standard OS X print dialog box is manipulated using Multivalent to create the PocketMod format. This technique replaces the Flash-based version from the PocketMod website, and the stand-alone PagePacker application. The basics of the process are:
Create an Automator workflow with the following Run Shell Script action:
When everything is seemingly lost, your Finder has crashed, Mirror Agent refuses to quit, and you're just about to pull out your eyebrows ... just calm down, as I have a hint for you. What you need, if you're in that predicament, is Activity Monitor. A wonderful little app that resides in your Utilities folder.
"But wait," you say, "I can't use the Finder! How am I supposed to get to the Activity Monitor?" Right you are, but luckily the Dock almost always works. And if you have Apple's Mail application in your dock, you're in business. First, open Mail if it isn't open already. Then click the New button and then the Attach button. In the resulting dialog, choose the Activity Monitor (from Applications » Utilities). When you see the attachment in the new message, right-click (or control-click) on the attachment. In the menu that appears, choose Open With » Other, and choose the Activity Monitor again. When Mail prompts you, choose the Open button.
When Activity Monitor launches, choose All Processes from the drop-down menu at the top of the window. Type the name of the offending app in the Filter field. Click on the app in the list box and press the Quit Process button then, when prompted, press the Force Quit button. This fixes many problems that may arise from a frozen Finder, so don't forget it.
[robg adds: The interesting thing here, to me anyway, is using Mail to launch pretty much any program on your machine. In the generic version, just attach any tiny document to the new email, control-click on it, then pick the application you'd like to run from the Other option in the Open With menu. In my testing, this worked with everything I tried. Interesting...]
There are times when it is desirable to prevent sleep mode, screen saver activation, etc. For example, during Software Update activity. However, it is inconvenient to temporarily change settings in System Preferences temporarily. There are other hardware and software solutions to keep your machine awake, such as Mouse Jiggler.
I offer a simple solution for those with an optical mouse: a watch or clock with a sweep second hand. Simply place the mouse on the face of the watch in such a way that the eye of the mouse can see the second hand pass beneath it. Every 60 seconds (like clockwork -- oof!), the cursor will move a few pixels, refreshing the display.
Every night, I put my computer to sleep. Some mornings, I find that, for no discernible reason, my computer has turned itself on. It's not scheduled to turn on, and I don't know of any program that could be doing it. There's nothing in the system log that gives any hint; it shows essentially the same thing that it shows when I wake up my computer manually.
After scouring the net for an explanation, I found reports from people with similar problems. Somebody pointed out that you can sometimes (always??) wake up a computer by plugging in or unplugging a USB device. My keyboard is plugged in through a cheap hub; a loose connection might cause intermittent disconnects. One user on a forum somewhere (I've lost track of the original location) claims that his computer wakes up whenever he uses his microwave or other high-power device! He says that his electrical system is rather old, and suspects that the sudden power drain causes his computer to temporarily reduce power to his USB peripherals, which wakes the computer.
[robg adds: I had this issue with my old G5 and a really cheap USB hub, too. One night I disconnected all the USB peripherals and it slept just fine. The next day, I replaced the USB hub, and the machine no longer woke randomly overnight. (It was awake one morning when I went into the office, but the cat sleeping nearby on the desk told me exactly why the Mac had woken up!)]