How to check if Fvwm is running?


I have an advanced GUI application which i want to run on Fvwm. I have set the application window property to have the window without any Window title and window frame. When i run my application in GNOME, KDE or MWM, the application is displayed properly without any frame and window frame or resize handles but when i run the same application in Fvwm, the application is displayed with the default Fvwm window title and frame.

Now i think i have to first check in my code that “if Fvwm is running, then set the window decoration hints appropriately”. Now my queries are:

  1. How to detect using C Code that Fvwm is running? (In my code, i detect Mwm by checking the “_MOTIF_WM_INFO” property)

  2. How to set-up window decoration hints for Fvwm?

I am new to Fvwm, so please help me!!!

Thanks in advance!!!


[color=red]Edited by theBlackDragon:
I can barely follow this, guess it doesn’t really belong in basic questinos then :wink:
–> Moved from Basic questions[/color]

Yes, of course. FVWM reparents the window when it is mapped. You have to configure FVWM to ignore that, typically you can just use a style line for that:

Style myApplication !Title, !Borders, HandleWidth 0, BorderWidth 0


– Thomas Adam

Thanks for a quick reply.
I’ll surely try the mentioned option.

Still, please answer my other queries:

  1. How to detect using C Code that Fvwm is running? (In my code, i detect Mwm by checking the “_MOTIF_WM_INFO” property)

  2. How to set-up window decoration hints for Fvwm?


FVWM doesn’t define (AFAIK) an XAtom to denote itself in that way – this is because applications don’t need to bother detecting it. The only reason MWM does this is for legacy purposes and most likely because its embedded upon its own toolkit.

That’s not something you do programatically – again, because the window is reparented into a frame of its own (see add_window.c in the FVWM source) it’s down to the user to decide if/when such things are visible.

– Thomas Adam

I tried the above option in the system.fvwm2rc file. While the option worked with native X applications like “xcalc”, it didn’t work with my application even when my application is in the the correct path. I even pasted the full path of the executable. I tried the regular expression “*” which worked, but this affected all the applications open in Fvwm.
How can i specify a particular application in the Style option?

My application also supports Mwm, GNOME, KDE etc. The user can specify various characteristics of our application like Window title, frame, resize handles, window mode (modal/non-modal) etc. In case of Mwm or other window managers, we detect which window manager is running and then we set the appropriate window decoration hints using “XChangeProperty” X11 API.

Now, I want to achieve the same functionality in Fvwm i.e. detect if Fvwm is running and then set the various hints based on the options specified by the user. So, basically we want the window decoration code to be controlled by our application instead of being specified by the end-user using “Style” Fvwm property in system.fvwm2rc.

Kindly, help me in getting started with the above…

Thanks in advance!!!

You have to use the window Class, Resource or Name specified by the application to X.


There is no real way of doing this, since everything can be overridden by applications. To only way to have full control over fvwm is though the config files or a module. You may however detect fvwm by checking the Name or class of the window referred to by the _NET_SUPPORTING_WM_CHECK property on the root window. – give that a read.

– Thomas Adam

I used the “Window” name with style statement and it worked properly.
I’ll try checking _NET_SUPPORTING_WM_CHECK property.
Thanks for the link also, it was really useful.

I’ll keep this thread updated if my issue is not resolved by using the Style options.

Thanks for ur help!!!


Have you tried settings

BugOpts ModailtyIsEvil True

in your fvwm2rc file. That will enable fvwm to create the _MOTIF_WM_INFO property.

Obviously, given how to turn this on, this is not the preferred way to use fvwm.

Actually, applications set that XAtom themselves – and the window manager then decides whether or not it will react to it. Of course, this is really only applicable for Motif apps – it’s quite rare that this option will be any good for applications written this side of the 21st century. :stuck_out_tongue:

– Thomas Adam