![]() ![]() Add the following lines just before the final near the end of the file, LSUIElement (Obligatory responsible adult advice: if you don’t know what sudo is, you probably shouldn’t be doing any of this.) You’ll be asked for an administrator password with the first sudo. If your text editor isn’t as smart as BBEdit, you can do the conversion from binary to text with this command: sudo plutil -convert xml1 istĪnd you can change the file’s permissions so you can edit it with this: sudo chmod 666 ist ![]() BBEdit is also smart enough to ask you for an administrator password so you can edit and save the file. This is a binary file, but some text editors, like BBEdit, are smart enough to be able to edit even binary plist files, presumably by running plutil in the background. If you go folder-by-folder in the Finder, you’ll have to right-click on Python.app and choose Show Package Contents from the popup menu. If you do this from the Terminal, you can just cd to that directory. Navigate to /System/Library/Frameworks/amework/Versions/2.7/Resources/Python.app/Contents/ So here’s the complete set of instructions for stopping the Python rocketship icon from appearing in the Dock. I decided to do the same with LSUIElement. The mailing list talks about setting LSUIElement to 1, but when I opened ist, I noticed that Booleans looked like this LSRequiresCarbon I say “almost” because apparently Boolean settings in plist files have changed since 2009. Eventually, I found this thread on the Pythonmac-SIG mailing list, which had the answer. 2 So I Googled for the answer, and it took a while because I couldn’t remember the name of the attribute- LSUIElment-I was searching for. Unfortunately, that page has been removed or its URL has changed-either way, I couldn’t find it yesterday. I thought I’d been clever when I wrote the post with the Dark Sky script, because I’d included a link to a Stack Overflow page that described how to change ist to prevent the icon from appearing. When I updated my office computer to Mavericks yesterday, the update wiped out my changes and I started seeing the rocketship again. The addition sets the LSUIElement attribute, which tells OS X that the app shouldn’t appear in the Dock. I’ve solved this in the past by making an addition to the ist file that’s in Python.app bundle. So every ten minutes, the rocketship pops up in my Dock for a second or so and then disappears. This is particularly vexing to me, because I use GeekTool on my office computer to display a Dark Sky precipitation plot on the Desktop, and the plot is created and updated by a Python/Matplotlib script that runs every ten minutes. In particular, the icon appears up whenever a Python script uses the Matplotlib library. Too often, Python thinks there’s GUI stuff going on when there isn’t, so the icon appears for no reason. The rocketship itself isn’t so bad, but the intertwined snakes are just dropped on top of it with no attempt to match the curvature of the ship. There are a couple of things wrong with this: The stock version of Python that ships with OS X has one very annoying habit: when it thinks it’s doing something involving a graphical user interface, it puts a rocketship icon in the Dock. Next post Previous post Stopping the Python rocketship icon ![]()
0 Comments
Leave a Reply. |