Jump to content

Show only one disk drive on Desktop


5 posts in this topic

Recommended Posts

Does anybody know how to show only one disk drive on the OS X desktop? I am multi-booting with XP x86, x64, Server 2003 x86, x64, Vista x64 and all the disk drive icons show on the desktop. I just want one disk drive icon on the desktop -> Macintosh HD.


I notice its a case of all or nothing.


Thanks for any help you can provide.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

I figured out a way to accomplish this with a login script.


create a login script similar to :


umount /Volumes/drive1

umount /Volumes/drive2

exit 0

where drive1 and drive2 are the names of the partitions you don't want mounted.


I created a folder for shell scripts and keep them all in /Library/scripts, however location doesn't really matter. You do need to ensure that the script is executable.


In a terminal :

sudo chmod u+x /path/to/your/scripts/loginscript.sh


Then just add the script to run as a loginhook.


in Terminal

sudo defaults write com.apple.loginwindow LoginHook /path/to/your/scripts/loginscript.sh


Close the terminal, logout and back in and the drives should be gone.

Link to comment
Share on other sites

DucPilot1, Your how-to is the second one I can confirm that works. I think yours is the easiest to implement. Can you please start a new thread over at the the Tutorial Forum with your instructions. I have seen far too many of these posts.




And might I suggest instructing the read to create a new script using nano or pico? eg.


sudo nano /Library/scripts/umount


Before you continue with the rest of your how-to.




Link to comment
Share on other sites


  • Create New...