• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to add a URL-tile to the Dock from an Installer?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to add a URL-tile to the Dock from an Installer?


  • Subject: Re: How to add a URL-tile to the Dock from an Installer?
  • From: Gregory Clarke <email@hidden>
  • Date: Thu, 30 Dec 2004 18:13:07 -0800

The script works great when executed from the command line, though naturally the hard-coded user path needs to scoot. Here's the script:

----
#!/bin/bash

defaults write /Users/jay/Library/Preferences/com.apple.dock persistent-others -array-add '<dict><key>tile-data</key><dict><key>label</key><string>http://www.heynow.com</string><key>url</key><dict><key>_CFURLString</key><string>http://www.heynow.com</string><key>_CFURLStringType</key><integer>15</integer></dict></dict><key>tile-type</key><string>url-tile</string></dict>'

killall -HUP Dock
----

The problem I'm running into is when I try to use the above within my PackageMaker's postinstall script. What occurs is the entire com.apple.dock.plist file gets reset to the factory default.

I have seen this before when exploring a script to add to the Dock. I don't remember the details, but I recall that there was a big difference if the script was executed as the user compared to root. I think if the same command is done using sudo then the users dock plist gets replaced with the factory default. My gut tells me that the clue to your problem is in this somewhere.


Good luck,
Gregory Clarke
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to add a URL-tile to the Dock from an Installer?
      • From: Gwynne <email@hidden>
References: 
 >How to add a URL-tile to the Dock from an Installer? (From: Jay Koutavas <email@hidden>)

  • Prev by Date: Re: How to add a URL-tile to the Dock from an Installer?
  • Next by Date: Re: Embedding a custom view within NSScrollView
  • Previous by thread: Re: How to add a URL-tile to the Dock from an Installer?
  • Next by thread: Re: How to add a URL-tile to the Dock from an Installer?
  • Index(es):
    • Date
    • Thread