Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I check with Python which Window Manager is running?

I want to check which Window Manager the user is using (like GNOME or KDE etc.). How do I do that?

like image 715
Jay Avatar asked Apr 27 '26 03:04

Jay


1 Answers

You can't. There is no central place where a program registers itself to say "hi, I'm the window manager".

For instance, I'm running xmonad. I simply start this by calling xmonad in my ~/.xsession file along with a couple of other programs to have it start when I login. You cannot really detect that.

like image 103
Daniel Egeberg Avatar answered Apr 29 '26 16:04

Daniel Egeberg