Showing posts with label Mac. Show all posts
Showing posts with label Mac. Show all posts

Wednesday, 26 March 2014

Spotlight not working on Mac (OSX)

On a hackintosh with OSX 10.8.2 Spotlight suddenly stopped working with these symptoms:

  • It was possible to enter search term but did not show anything other than Web or Wikipedia.
  • In preferences it was set to show all and the privacy pane was empty.
  • In terminal (terminal commands in blue, terminal response in red)
    "sudo mdutil -i off /" (to turn off service),
    "sudo mdutil -i on /", (to turn on service)
    "sudo mdutil -E /" (to delete meta data)
    all produced the result 'Spotlight Server is disabled' i.e. the usual command seem to have no effect.
The following terminal command seemed to produce some results, time will tell if it is temporary
  • "sudo rm -rf /.Spotlight-V100" removed the index but had no effect on above commands
  • "sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist " produced 'com.apple.metadata.mds Already loaded'
  • "sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist" seemed to work.
  • "sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist" then seemed to work also [using the reverse has also been required i.e unload load unload and then reload]
  • Restarting Spotlight then with "sudo mdutil -i on /" produced \
    /:  Indexing enabled.
    /Volumes/MacDell435TMBU: Indexing enabled

There are multiple descriptions of problems with Spotlight and it is unlikely there is one common cause but a number do describe the issue of the Server disabled command when usual terminal commands are used trying to reset it. This may help in some circumstances.








Tuesday, 7 January 2014

OS X Mac asking for password when moving files to Trash

Credit for this solution to:
http://www.fixkb.com/2012/09/mac-asking-for-password-when-moving-files-to-trash.html#comment-72799
This started after Mavericks upgrade. When dragging files to the trash you are prompted for a password this is result of sometimes when moving files or folder the permission are not carried over or permissions on trash can have become corrupted. Ownership corruption of trash can can also manifest itself as Trash always shows empty but Terminal can identify files present. You will need to re-take ownership of the trash folder or reapply permissions to folders. 

Method 1

  1. Click on the Spotlight (magnifying glass in top right), type “Terminal” and press enter.
  2. Type the following command replacing “your_user_name” with your user name.
    sudo chown your_user_name ~/.Trash
  3. You will need to enter your password and press Enter.
    • It won’t show any characters when you type.
    • If you do not have a password then set one first.
If you are presented with the following error:  “No such file or folder” then do the following:
  1. Type the following command:
    mkdir ~/.Trash

Method 2

Check your permisions are correct on your user files.
  1. Navigate to your main hard drive (usually Macintosh HD) and select your /Users folder.
  2. Press  “Cmd+I” to bring up the Get Info window.
  3. Expand the “Sharing and Permissions” arrow.
  4. Next to your username you should see “Read & Write”.
  5. Click the small Gear icon  and then click “Apply to enclosed items…”