After upgrading to MacOS Seqouia all python process show in dock

Hi! After upgrading my Macbook Pro M1 Pro to MacOS Sequoia 15.0 when I run my python backend code i show in dock all python process as Exec Icon. Now work with backend so hard, because all my dock in this icons( How I can fix this? Support dont help me, because resinstall and e t c dont work for me.

Answered by DTS Engineer in 805334022

Python processes showing up in the Dock is a pretty common pathology. It’s typically caused by the Python program using GUI frameworks, either directly or indirectly. Those establish a connection to the window server [1] which is what causes the program to appear in the Dock.

There are two ways to get around this:

  • If you want the program to run outside of a GUI context, you need to track down what’s connecting to the window server and stop it from doing that. Programs running outside of the GUI context — for example, a launchd daemon — can’t safely use the window server.

  • If you’re happy with the program being restricted to use within a GUI context, you can package it in a bundle and add the LSBackgroundOnly property to its Info.plist. This will prevent the program from showing up in the Dock, even after it’s connected to the window server.

For a more detailed explanation of this stuff, and specifically the concept of how execution contexts work on macOS, see Technote 2083 Daemons and Agents.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Well, it’s more complex than that, but I’m explaining this in terms of the old school terminology that’s in TN2083.

when I run my python backend code

Is this code you wrote?

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

I have the same issue here. It happens with all the terminal python process and also those started by pycharm. In the Terminal I'm running saltstack master, minion and api process that spawn other python process so for those I'm getting around 14 process in my dock. Just upgrade yesterday Sept 22 and before the upgrade wasn't an issue

Python processes showing up in the Dock is a pretty common pathology. It’s typically caused by the Python program using GUI frameworks, either directly or indirectly. Those establish a connection to the window server [1] which is what causes the program to appear in the Dock.

There are two ways to get around this:

  • If you want the program to run outside of a GUI context, you need to track down what’s connecting to the window server and stop it from doing that. Programs running outside of the GUI context — for example, a launchd daemon — can’t safely use the window server.

  • If you’re happy with the program being restricted to use within a GUI context, you can package it in a bundle and add the LSBackgroundOnly property to its Info.plist. This will prevent the program from showing up in the Dock, even after it’s connected to the window server.

For a more detailed explanation of this stuff, and specifically the concept of how execution contexts work on macOS, see Technote 2083 Daemons and Agents.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

[1] Well, it’s more complex than that, but I’m explaining this in terms of the old school terminology that’s in TN2083.

Sorry but this answer doesn't solve any problem at all It's just a way to diminish what it's really happening with the dock that right now it's not usable at all

This it's not something that we as users are doing new now. It's something that started to happen with the upgrade to Sequoia. In my case with completely server process that uses no GUI at all and also aren't been running as a service, I manually run it in my terminal. Hope for a new MacOs update that fix this issue

OK. I was under the misapprehension that you were asking a coding question; that’s kinda what we do here on the Apple Developer Forums. If you just want to request a fix, you should file a bug about this issue.

Please post your bug number, just for the record.

Share and Enjoy

Quinn “The Eskimo!” @ Developer Technical Support @ Apple
let myEmail = "eskimo" + "1" + "@" + "apple.com"

Try running this on the terminal: killall Dock

After upgrading to macos 15.0.1 problem dont solved. Apple does not respond to bag reports. and this bug is sequoia, it appeared for the first time only after upgrading to 15. i'm desperate

Any news for this problem?

I was having the same issue. Basically I followed the instructions here: https://leancrew.com/all-this/2014/01/stopping-the-python-rocketship-icon/ and that fixed it!

Here's a quick guide:

  • On the terminal, navigate to where the python installation files are: In my case, I installed python via homebrew. So the path to the Info.plist file is: /opt/homebrew/Frameworks/Python.framework/Versions/3.9/Resources/Python.app/Contents . On the link provided, it is using the Python that is backed in macOs. But I use this version for development.
  • We need to modify the Info.plist file. But first, chmod it: sudo chmod 666 Info.plist
  • I just used vscode to edit the file. In the post I provided, it is using a software to convert the file. But in my case I didn't need it.
  • Add the following lines just before the final </dict> near the end of the file:
<key>LSUIElement</key>

<true/>
  • Not needed, but you can change the permissions back to what they were: sudo chmod 644 Info.plist

  • Done! re-execute your app and no more python process on the dock.

After upgrading to MacOS Seqouia all python process show in dock
 
 
Q