TKinter windows do not appear when using multiprocessing on Linux TKinter windows do not appear when using multiprocessing on Linux tkinter tkinter

TKinter windows do not appear when using multiprocessing on Linux


This discussion could be helpful.

Here's some sample problems I found:

  1. While the multiprocessing module follows threading closely, it's definitely not an exact match. One example: since parameters to a process must be pickleable, I had to go through a lot of code changes to avoid passing Tkinter objects since these aren't pickleable. This doesn't occur with the threading module.

  2. process.terminate() doesn't really work after the first attempt. The second or third attempt simply hangs the interpreter, probably because data structures are corrupted (mentioned in the API, but this is little consolation).


Maybe calling the shell command xhost + before calling your program from that same shell will work?

I am guessing your problem lies with the X-server.