Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

Because a problem of compatibility between Mac OS X 10.6 and 10.7 (the problem was that the computer with Mac OS X 10.6 and 10.7 were both synchronized with the same Mobile Me account), I see an icon the desktop in the sidebar of Finder, even if the icon is not selected to appear.

screenshot

I even tried to remove it dragging it off the sidebar, or clicking it with the right button and selecting "Remove from Sidebar," but the icon is still there.

The problem is that the dialog box to open files shows two icons for the Desktop, in some applications.

screenshot

I think that the only solution is to manually edit the preference file containing the information about the icons that appear in the sidebar. Which file is it? Is there any alternative for to removing that icon, or a tool that helps with these problems?

share|improve this question
    
It is much easier to just set asid the affected preference file and set things up from the defaults than worrying about editing them - you learn more editing them, but for some it's better to start over. –  bmike Aug 27 '11 at 20:45
    
It works too, but the main problem is resetting the preference file for three different Macs, and then restore the preferences how I had them before. It's quite boring. :-) –  kiamlaluno Aug 27 '11 at 20:52
    
I put that in for general use by anyone - it is far superior to go in with a surgeon's precision and having that skill, you can save serious time. –  bmike Aug 27 '11 at 21:08
    
this post was mentioned on The Talk Show: 5by5.tv/talkshow/63-skyping-a-deuce (7m50s in) –  Kyle Cronin Oct 20 '11 at 3:32

1 Answer 1

up vote 6 down vote accepted

The Finder Sidebar is defined in ~/Library/Preferences/com.apple.sidebarlists.plist. It may be stored in binary. If you have a property list editor, this won't matter; if you don't, you'll want to convert it to XML first:

plutil -convert xml1 ~/Library/Preferences/com.apple.sidebarlists.plist

Then, open it in a text editor. There's probably an entry like so in there:

<dict>
    <key>Icon</key>
    <data>…</data>
    <key>CustomItemProperties</key>
    <dict>
        <key>com.apple.LSSharedFileList.TemplateSystemSelector</key>
        <integer>1935819892</integer>
    </dict>
    <key>Name</key>
    <string>Desktop</string>
    <key>Alias</key>
    <data>…</data>
</dict>
</plist>

(Note the key Name with string value Desktop.)

Delete that whole <dict> node, and save.

share|improve this answer
4  
Or you can simply delete the com.apple.sidebarlists.plist file and let Mac OS X create a new, default one. You will lose any favorite icons you have stored in the sidebar, but it is quite easy to drag your favorite folders back into the sidebar and re-create the set. –  Wheat Williams Aug 27 '11 at 19:44
1  
A big +1 to wheat here. Moving a suspected preference file to the desktop and relaunching the affected app is a time honored procedure for testing if a specific file is the source of an issue. You can move it back or delete it later as the situation dictates without needing time machine to restore an older version. –  bmike Aug 27 '11 at 20:43
    
In the preference file there were three occurrences of "Desktop." Once I edited the preference file, saved it, reset the Mac, and selected the Desktop icon to appear in the Finder's sidebar, all returned to normality; even the file dialog box shows now a Desktop icon, and not two as before. –  kiamlaluno Aug 27 '11 at 20:56
    
Thanks for the info on where to find that file. I've been looking online for ages to try and find a way of copying your sidebar links over to a new computer. I used the PLIST file and dragged it into the same folder on my new mac and it asked to 'replace file', restarted the computer and hey presto! Saved me and my team a whole load of time when we got our mac upgrades! (We all use the sidebar to use as a quick reference for past jobs we have individually worked on). –  user72356 Mar 7 at 15:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.