Right – the “StartsOn{Desk,Page}” stuff can only be done via style lines (although re-read the thread that Johan pointed you at, as I have explained it enough there).
Yes, these are the lines that you want – but remember that in this instance, the LAST style line as you have it there will get used. Remember that a “Desk” is just a container for a number of “Pages” (again, the main FVWM FAQ explains the difference between them.)
In the first instance, yes – but the second number will also switch to that specified PAGE as well.
Because you’re misunderstanding how things relate. Take Firefox (I have explained this in another thread, BTW). That will either have a class of:
Firefox-bin
or:
Gecko
The reason you want to match on a window’s class in this instance is that it’s more specific, and less ambiguous than the title of the window, which might be something like this:
“Fvwm Forums :: Post a reply - Mozilla Firefox”.
Of course, some people would naturally match by title, and try a command such as:
Style *Firefox* StartsOnPage 0 4
… but this has some issues with it. Since you’re matching firefox anywhere in the title, it could match erroneous windows, or ones you don’t want. So the next thing to try is to match by “Class”. To obtain a specific window’s class, you can use a few methods. Perhaps the preferred option is using the module “FvwmIdent”. Although window manager agnostic commands such as “xwininfo” and “xprop” can also be used. Hence, you’d replace the previous style command with:
Style Gecko StartsOnPage 0 4
… you can be fairly well assured that the Class of a window tends to be unique to that application (the exceptions are things like RXVT which sometimes have been known to set their class to that of Xterm.)
Indeed, you might be wondering how style lines know in which order to match. Truth is, they don’t really know how to match, however FVWM defaults to cycling through a known series of window attributes. Hence, FVWM will match your window name in a style command thus:
Title --> Class --> Resource
So it checks the title of a window first, and if a match is unsuccessful, it will then look at the class, and if that fails, it will then look at the resource of that window for a match. By and large, where wildcards are used in style lines – it’s normally the window’s title that gets matched in the first instance.
One thing I’d love to see in a future version of FVWM is something like:
Style (class=Xterm, title=foo) StartsOnPage 0 4
… which would really be quite powerful.
I hope this helps.
– Thomas Adam