Posted on 03-01-2018 06:43 AM
I have a policy that installs Google Drive File Stream, and add the dock item to the dock (the .pkg also add the icon to the desktop). I noticed that the dock icon does not work but the desktop icon does work.
When I drag the icon to the 'volumes' section of the dock, it then works, finder window opens to the google drive file stream folder.
how do i get the dock item into that 'volumes' section of the dock? and have it display as a 'folder'? because if it displays as a 'stack' users will not be able to tell as easily that it is google drive folder
and what is the best command to delete the icon that gets created on the desktop?
Posted on 03-01-2018 08:07 AM
Have a look at Dockutil to deploy the Icon to the Dock. To delete the File from the Desktop you can use the rm command. This would be a example to delete from the Desktop of the current user.
#!/bin/bash
currentUser=$(python -c 'from SystemConfiguration import SCDynamicStoreCopyConsoleUser; import sys; username = (SCDynamicStoreCopyConsoleUser(None, None, None) or [None])[0]; username = [username,""][username in [u"loginwindow", None, u""]]; sys.stdout.write(username + "
");')
echo "${currentUser}"
rm "/Users/${currentUser}/Desktop/FILENAME"
exit 0
Posted on 03-01-2018 09:06 AM
i'm not dealing with that dockutil
Posted on 03-01-2018 11:42 PM
Why not? It's a great tool. Have a look at the examples here: https://github.com/kcrawford/dockutil