Search code examples
pythonmacosdaemon

Get rid of the Python launcher icon - OS X


When I launch a daemon on my Macbook Pro, for 'daemonize" a python script, a python launcher icon popup in the Dock.

I would like to know if there is any ways to disable it / remove it

This icon : http://osx.wdfiles.com/local--files/icon:python/Python.png


Solution

  • To strictly answer your question, the application icon can be removed by setting LSUIElement to YES in the Info.plist for the Python application wrapper.

    sudo defaults write /System/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Info "LSUIElement" -string "1"
    

    Should do it, but it will hide it for any Python applications. The changes can be reverted by substituting the 1 for a 0.

    I also had to chmod the Info.plist file afterwards for some reason, not sure if that was just my configuration or what.