Skip to main content
Solved

Script Parameters and Web Clips in Dock

  • October 2, 2013
  • 1 reply
  • 1 view

Forum|alt.badge.img+9

I'm trying to add a web clip to the dock that holds the address of an smb share. I'd like to do folder rather than a web clip but the icon doesn't change from a question mark to a folder, even when the share gets mounted. The share I want to mount is in the following format:

smb://files/labarea/'$site'/Labarea

My thought was to create a web clip and use a script parameter to enter the school site designation like this:

smb://files/labarea/$4/Labarea

For some reason when using dockutil to add a web clip with this address, the $4 parameter doesn't get accepted. If I put HH as the parameter in Casper Remote, the dock.plist just shows the url as it sits in the script, with the $4 rather than HH. If I use dockutil to create a folder pointing to the share like this:

//files/labarea/$4/Labarea

The parameter works fine (but the icon stays as a question mark rather than a folder icon). If I drag my dock item out and manually put it in from the mounted share, the format looks like this in the dock.plist

file://localhost/Volumes/labarea/HH/Labarea

Suggestions?

Best answer by mm2270

I could be wrong but I think the only way to get this to work using dockutil would be to mount the share first, then run the dockutil command to add an item with /Volumes/labarea/HH/Labarea as the parameter, or whatever it needs to be.
The way dockutil works is, if the item doesn't exist in the location you specify, in this case in the /Volumes/ directory, then it adds in a non functional "?" in the Dock.
But if the share is mounted, and then you add it in, it shows up as a server share icon and works to navigate through it directly from the Dock in grid, fan or list view, and even mounts the share afterwards if its not there by simply clicking on it. If using Kerberos in your environment, it just mounts the share with the current users credentials.

There are probably other, better ways to achieve this, or other similar functionality. I recall another thread here that discussed some ways of manipulating the dock.plist to add Server shares into it. You might want to search around.

View original
Did this topic help you find an answer to your question?

1 reply

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • 7882 replies
  • Answer
  • October 2, 2013

I could be wrong but I think the only way to get this to work using dockutil would be to mount the share first, then run the dockutil command to add an item with /Volumes/labarea/HH/Labarea as the parameter, or whatever it needs to be.
The way dockutil works is, if the item doesn't exist in the location you specify, in this case in the /Volumes/ directory, then it adds in a non functional "?" in the Dock.
But if the share is mounted, and then you add it in, it shows up as a server share icon and works to navigate through it directly from the Dock in grid, fan or list view, and even mounts the share afterwards if its not there by simply clicking on it. If using Kerberos in your environment, it just mounts the share with the current users credentials.

There are probably other, better ways to achieve this, or other similar functionality. I recall another thread here that discussed some ways of manipulating the dock.plist to add Server shares into it. You might want to search around.


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings