#StackBounty: #ubuntu #python #gdm #polkit #gdm3 Python tkinter GUI is being pushed behind GDM3 polkit password window

Bounty: 50

It seems that my Python PAM RFID solution development has come to an end 🎉 and I finally finished developing kind of working GUI solution as well.


But, of course I ran into one final issue 😑 – my GUI is being forced behind all GDM run windows – password window, login and lock screen window. I’ve double checked – YES the GUI runs without errors and shows up when needed – BUT it doesn’t show on top of windows being run by GDM.

How it works

  1. Python PAM module listens for RFID card on NFC scanner
  2. Once card present – it auto-fills user credentials and starts authentication process via remote server
  3. Server responds with status codes
  4. Python PAM module shows tkinter window (PIN, Register, Error) according to received state
  5. User interacts with form and actions are being done on user behalf in background as well as reply status are being send to remote server.

Example of an error

Here is a screenshot how it looks on password window (:
enter image description here

I made password window little bit more opaque, so you could see that the GUI is there.

Whatever I do (ALT+TAB, TAB anything that could bring the window up) doesn’t work.

The same happens on login/lock screen – only those are not opaque and it seems that they are not working, however, when I enter password and log back in, I see my previously (on login/lock screen) triggered GUI like so:
enter image description here

My tries to fix it

  • I tried to add these attributes to my tkinter root:
    tk_root.attributes('-topmost', True)
    tk_root.call('wm', 'attributes', '.', '-topmost', '1')

    but obviously gdm3 is being forced on top of everything and this won’t simply do the trick.😑


How can I fix this? What would be the best and safest way to force my tkinter or any other Python GUI script/app on top of gdm3 GUIs?

At this point I’m open to anything – it can be something other than tkinter that will work on top of the GDM3 windows. Out of the box solutions are welcomed as well.

Thank you in advance, 🙏🏻


Get this bounty!!!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.