PDA

View Full Version : need help with shell script




lynkynpark86
Sep 23, 2010, 05:52 PM
I am trying to make a simple script to change an application's info.plist file. The application is called Spacesuit, and I want to add "LSUIElement" with a string of "1". The only problem is i don't know how to use defaults write on a plist that is not in the preferences folder. Basicly what I'm asking is what would be the terminal command to edit the plist of an application on the desktop? Please help me with this.



chown33
Sep 23, 2010, 07:21 PM
defaults write ~/Desktop/Spacesuit.app/Contents/Info LSUIElement 1

lynkynpark86
Sep 24, 2010, 12:26 PM
defaults write ~/Desktop/Spacesuit.app/Contents/Info LSUIElement 1


Thanks, I can't believe I didn't think of that. I am used to using defaults write for apple preferences (com.apple.mail, etc.), so I forgot I could enter a file path. Thanks again.

chown33
Sep 24, 2010, 12:48 PM
I remember being in the same place. The key thing is "pathnames omit .plist". Otherwise you get path/to/thing/Foo.plist.plist.