Select and Position Disks on OSX Desktop

Is there any way to Select and Positon Disks on a Users OSX Desktop

– This use to be easy in OS9, but OSX does things differently.

I know that the Desktop Disks are not ‘Disks’ but some sort of short cut.

I really want to be able to reposition these disks under program control
(since thay move about so much on their own).

Sure there are. But as with OSX the user is able to decide not to place any mounted volume on the desktop (prefering to keep them in the Finder’s sidebar) your script might end up with a lot of errors trying to access and move around these disks…


Hi chebfarid

In this case I know for certain that they will be on the Desktop.

Also if there is a way to select them, then I could also preseumably detect whether they are in fact there or not.

If there is a way to do this perhaps you would be kind enought to tell me “how”.

  • Since at the moment I can’t see how (what property) of the Desktop or other mechanism trhat I could use to do this.

– So far I haven’t found a way to address these Desktop Disk enterties. :rolleyes:

Sorry Zoz, I think I didn’t understand your question correctly.
You are right, the desktop of OSX is quite different from the OS9 desktop - first of all because every user has its own.
If you just want to select the mounted disks you can use something like this:

tell app "Finder"
set desktopItems to every item of desktop
repeat with i from 1 thru count of desktopItems
if kind of item i of desktopItems is "volume" then
select item i of desktopItems
end if
end repeat
end tell

But if you want to change their position on the desktop unfortunatedly this is not easy as it was under OS9. You can change by script the view options for the folder desktop, change the sort order and so on, but I don’t know any trick to move the icon of the startup disk 50 pixels to the left…
May be someone else got an idea?


Hi, Thanks Farid

I tried your script. While it does select disks, it doesn’t select these enterties on the Desktop. (It selects them at the ‘computer level’ instead)

Actually I am not sure what these things are

  • (The Disks that appear on the Users Desktop in the OSX Finder that is)
  • since those enterties are not Disks, but more like a short cut to the actual disks.
    (except that they are not aliases, or links, they don’t appear in ~/Desktop in Terminal for instance. Using Terminal they appear under /Volumes)

The Finder sems to be “pulling a trick” by making them appear on the users Desktop
which is why I am having a problem addressing that thing that represents them.

– Thanks for your suggestion though.
This should more than satisfy this post, which is to say, X is TOTALLY DIFFERENT THAN 9 when it comes to icon positioning on the desktop. You can no longer directly set the position.