Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Log out background users after time limit System
Fast User Switching has a lot of benefits, but one of its downsides is that it is easy to end up with multiple users in the background wasting system resources and needlessly degrading performance. This hint shows how to implement a system to log out users automatically if they have been sent to the background for a specified period of time.

In order to keep the benefits of Fast User Switching while avoiding the situation where multiple users remain logged in unnecessarily, it is necessary to have a way to cause users to log out automatically after being in the background for a period of time. Unfortunately, Mac OS X does not provide a way to do this. (There is a setting in the Security preference pane for logging out automatically after a certain amount of idle time, but it logs out all users and only does so when no one uses the computer for the specified period of time; so long as anyone is using the computer, all background users stay logged in.)
read more (305 words)   Post a comment  •  Comments (19)  
  • Currently 3.55 / 5
  You rated: 1 / 5 (22 votes cast)
 
[13,615 views] Email Article To a Friend View Printable Version
Manually remove the newly found OSX/OpinionSpy spyware System
[crarko adds: OK, there are some serious questions raised about the procedure described below. I suggest waiting for further corroboration before trusting it.]

Here is some background on the recent announcement about a piece of malware which has been found to affect Macs. The spyware in question is called OSX/OpinionSpy and it’s a new variant of Windows spyware that has existed since 2008.

This link (to The Guardian) offers a manual method to remove the spyware which was installed with the screen savers from 7art, or other infected applications which may have been installed.

To see if you're affected, run Activity Monitor (in /Applications/Utilities) and set it to show All Processes in the dropdown menu. Look for a process called 'PremierOpinion' which will be owned by root. If it's there, you've been affected.

To summarize the removal procedure:
  • Go to the /Applications folder in the Finder.
  • Find the PremierOpinion folder.
  • [crarko adds: Possible dangerous step removed.]
  • Move the PremierOpinion folder to the Trash and empty the Trash; if won't delete, choose 'Empty Trash' while holding the Option key. You may need an administrator password. Reboot the Mac after doing this.
  • Check again in Activity Monitor to be sure the process 'PremierOpinion' is no longer there.
The submitter expresses thanks to Paul Mortgaat on the X4U mailing list for pointing out this tip.

[crarko adds: Thankfully, I haven't tested this one. I've removed one step in this procedure until it can be verified as not making the problem worse. And take a look at the procedure mentioned in this comment as a more comprehensive operation.]
  Post a comment  •  Comments (22)  
  • Currently 2.40 / 5
  You rated: 2 / 5 (15 votes cast)
 
[16,213 views] Email Article To a Friend View Printable Version
Change the creation date of files using relative dates System
I was looking for a way to change the creation date of a file and I found this hint, and through that, the ChangeFileDates command line tool at hamsoftengineering.com. I noticed that ChangeFileDates will accept some pretty vague relative dates as valid inputs!
read more (377 words)   Post a comment  •  Comments (5)  
  • Currently 2.92 / 5
  You rated: 4 / 5 (12 votes cast)
 
[7,617 views] Email Article To a Friend View Printable Version
Spotlight indexing may hang if Finale is installed System
Some '.mdimporter' files in the Spotlight folder may cause problems.

There is another reason Spotlight may hang - if you are a musician and have Finale 2010 installed, the file 'Finale.mdimporter' causes endless Crash Reporter entries in Console, and the indexing will either show a completion time of several days, or simply not ever finish. Removing this file and restarting Spotlight (using a utility or CLI command, or just restarting) fixes the problem. The file is found in /Library/Spotlight (note this is the root level Library, not the one inside System or Users folder).

There are several other '.mdimporter' files in that folder, to evidently assist Spotlight, and I have not had a problem with any except this one from MakeMusic.

[crarko adds: I haven't tested this one.]
  Post a comment  •  Comments (3)  
  • Currently 2.35 / 5
  You rated: 5 / 5 (20 votes cast)
 
[5,532 views] Email Article To a Friend View Printable Version
Spotlight searching customization tips System
You can search your computer using Spotlight using search options like other search engines.

Not sure how long spotlight has been this way, but I found it very helpful when searching. You can enter a search query just like you would on Google, use a dash or minus in front of word(s) that you don't want to see in the results.

Example: apple store receipt -itunes kind:pdf

Would find all PDF documents that don't contain iTunes info and that were an Apple Store receipt that are on your computer.

Example: happy kind:mp3

Would find all MP3 files on your computer with the word happy in the file name or meta tags.

Example: happy kind:mp3 -"and you know it"

Finds all MP3 files on your computer like above but omits the kids song if "your happy and you know it clap your hands" while returning all other results like above.

[crarko adds: I tested this, and it works as described. There is an earlier hint describing other tips for customizing Spotlight searches using Terminal.]
  Post a comment  •  Comments (11)  
  • Currently 3.50 / 5
  You rated: 2 / 5 (24 votes cast)
 
[11,596 views] Email Article To a Friend View Printable Version
AppleScript: Using Unicode the Sneaky Way System
In my daily workflow, I often use AppleScript. Sometimes I need to use symbols in, say, TextEdit. Usually, you would open the Character Palette. But I found an interesting way to use AppleScript's power to insert Unicode characters using the «data» format in AppleScript.
read more (130 words)   Post a comment  •  Comments (11)  
  • Currently 2.37 / 5
  You rated: 3 / 5 (19 votes cast)
 
[7,956 views] Email Article To a Friend View Printable Version
A possible fix for Spotlight re-indexing problems System
This tip might be handy if Spotlight seems to take forever to re-index. I re-indexed Spotlight, and it started showing the spinning wheel. I was unable to pinpoint an obvious reason for this.

Some weeks later I decided to get rid of most of the DYLD errors from the Console log. As a step in doing I booted the machine into safe mode, and cleaned all the system caches. After having done that Spotlight started working as it should again, reading the indices when performing searches.

[crarko adds: I tested this, and it works as described. I posted it as much as anything as a reminder that clearing the system caches should be a part of any regular maintenance plan, and often an early step in a troubleshooting procedure.]
  Post a comment  •  Comments (5)  
  • Currently 2.47 / 5
  You rated: 2 / 5 (17 votes cast)
 
[19,993 views] Email Article To a Friend View Printable Version
'Open Recent' setting in System Prefs also affects programs System
The setting for 'Number of recent items' in the Appearance System Preferences pane affects some other apps, in addition to the Recent Items in the Apple menu.

It wasn't obvious to me until now, but the number of items shown in the Open Recent menus in AppleScript Editor, Preview, TextEdit (and probably other apps) is controlled by this setting. That is, changing the 'Number of recent items' for Documents in System Preferences doesn't just affect the Apple menu, it also affects some of Apple's apps. (Note that if you increase the limit, your apps won't show any recent Documents -- as you open new documents, the menu will populate to the new limit.)

There's a related hint on overriding this on a per-app basis.

[crarko adds: I tested this, and it works as described. This setting affects a number of Cocoa applications; personally I consider this to be a bug. It should not be a global setting. I believe this behavior was introduced in 10.6, but I'd be interested to know if anyone sees it in 10.5.x as well.]
  Post a comment  •  Comments (6)  
  • Currently 2.18 / 5
  You rated: 3 / 5 (11 votes cast)
 
[9,018 views] Email Article To a Friend View Printable Version
Create symbolic links from multiple sets of source folders System
I have a ridiculously large media library, spread across multiple drives. By way of example: drive X, drive Y and drive Z all contain TV Shows directories, and trying to remember which drive's TV Shows directory contains which actual television show is a hassle I'm too lazy to put up with.

I wanted a global TV Shows folder containing the content of each individual drive's own TV Shows folder. Using Smart Folders or aliases presented a few drawbacks, as a lot of applications (not to mention other operating systems) don't understand them, so creating symbolic links (symlinks) was the best option.
read more (572 words)   Post a comment  •  Comments (3)  
  • Currently 2.00 / 5
  You rated: 3 / 5 (10 votes cast)
 
[7,014 views] Email Article To a Friend View Printable Version
Sleep displays via AppleScript System
This hint allows you to sleep the display via AppleScript and the Active Screen Corners feature of Exposé. It is based on the script in this blog entry, which allows you to move the mouse cursor to the top left corner of the screen.

First of all, you need to set the Exposé functionality (in the Active Screen Corners section) of the top left corner to Sleep Display. Having done that, the following AppleScript will sleep the display:
(*
Source for the shell script:
http://hubionmac.com/wordpress/2009/09/maus-zeiger-in-applescript-via-python-bewegen/
*)

do shell script "python -c \"import objc;bndl = objc.loadBundle('CoreGraphics', globals(), '/System/Library/Frameworks/ApplicationServices.framework');objc.loadBundleFunctions(bndl, globals(),[('CGWarpMouseCursorPosition', 'v{CGPoint=ff}')]);CGWarpMouseCursorPosition((0, 0));\""

tell application "Finder" to activate
[robg adds: I tested this in 10.6, and it worked as described. This much older hint sleeps the displays via AppleScript, but only after a one-minute delay; this one uses a couple of third-party tools and AppleScript to sleep the displays with password protection; finally, if you're just interested in quickly sleeping the displays (not necessarily via script), this hint points out that Shift-Control-Eject will do just that.]
  Post a comment  •  Comments (11)  
  • Currently 2.60 / 5
  You rated: 4 / 5 (10 votes cast)
 
[9,910 views] Email Article To a Friend View Printable Version