Subject: FVWM: FVWM and FireFox browser

From: Lucio Chiappetti <[email-masked]>
Date: Tue, 29 Mar 2005 11:15:17 +0200 (MET DST)

I'm trying to configure fvwm (2.5.10 unde SuSE Linux) with two desktops.
Desktop 0 should be the main (local) work desktop, desktop 1 should host
some permanent "outer world" applications started at login, like e.g. a
VNC viewer to connect to another machine, or a web browser.

I've chosen Mozilla Firefox as web browser because of its lightness.

However I'm unable to convince it to start in the designated desktop and
page (I'm also unable to convince it to start with the window geometry I
want, it looks like it ignores any standard X style resource specification
on the command line ... and also those regarding initial desktop
location).

This is an extract from my .fvwm2rc. The part on the VNC viewer works, the
part on firefox does not.

AddToFunc InitFunction
 ...
 + "I"   Exec exec vncviewer -name OldPoseidonVNC -passwd myfile myhost:1
 + "I"   Exec firefox http://myhomepage

I tried (for firefox) also "Exec exec" or a -name directive, but with no
avail.

Style OldPoseidonVNC StartsOnPage 1 1 0, SkipMapping
Style firefox Page 1 0 0, SkipMapping, NoPPosition

The style for the specific VNC viewer works nicely, but the one for
firefox does not (I tried also without NoPPosition, with a -name matching
the one in InitFunction, with a name of firefox or firefox-bin ... but all
with no avail. Firefox insists in starting in desktop 0.

I also noticed that firefox creates a bunch of .gnome related directories.

Is there any known incompatibility between firefox and fvwm, or, better,
any known trick to start firefox under fvwm in a given desktop ?

Thanks in advance

----------------------------------------------------------------------------
Lucio Chiappetti - INAF/IASF - via Bassini 15 - I-20133 Milano (Italy)
For more info : http://www.mi.iasf.cnr.it/~lucio/personal.html
----------------------------------------------------------------------------

--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Thomas Adam <[email-masked]>
Date: Tue, 29 Mar 2005 11:54:28 +0100

On Tue, Mar 29, 2005 at 11:15:17AM +0200, Lucio Chiappetti wrote:
> However I'm unable to convince it to start in the designated desktop
> and page (I'm also unable to convince it to start with the window
> geometry I want, it looks like it ignores any standard X style

Firefox, alas, doesn't have a -geometry option.  But it does (albeit
loosely) try to remember its position when it next loads up.  There are
a few ways around it to try and coerce it into a fixed position, which
I'll discuss below.

> This is an extract from my .fvwm2rc. The part on the VNC viewer works,
> the part on firefox does not.
>
>
> AddToFunc InitFunction ... 
> I tried (for firefox) also "Exec exec" or a -name directive, but with
> no avail.

Use the Resource of firefox (Gecko) as a more precise match.

> firefox Page 1 0 Style 0, SkipMapping, NoPPosition

Style Gecko  StartsOnPage 1 0, SkipMapping

works for me.

I mentioned earlier about geometries.  Using a module called FvwmEvent,
you can get Fvwm to do things when a condition happens.  So for example,
you might want to move the firefox window somewhere.  Here's what
you could do:

DestroyModuleConfig Event-FF: *

*Event-FF: Cmd  Function
*Event-FF: PassId
*Event-FF: new_window MoveFireFox

Whenever a new window is created, fvwm will then call the "MoveFireFox"
function which we can declare as this:

DestroyFunc MoveFireFox
AddToFunc MoveFireFox
+ I Any (CurrentDesk !Iconic !AcceptsFocus) \
  ThisWindow ("Gecko") Move 120p +0p

AddToFunc StartFunction I Module FvwmEvent Event-FF

For instance.  This would then take FireFox and move it to the location
specified in pixels.  Slightly OTT, but it's possible.  :)

-- Thomas Adam

--  
"One of us is a cigar stand, and one of us is a lovely blue incandescent
guillotine" -- Stephen Malkmus, "Type Slowly" from "Brighten The Corners"
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Lucio Chiappetti <[email-masked]>
Date: Tue, 29 Mar 2005 18:58:32 +0200 (MET DST)

I'm not sure what are the "customs" of the FVWM Mailing List, both as
"general education" (do people normally reply to the list, reply
individually and cc: the list, reply individually and the original poster
has a duty to post a summary) and as "software id" (I mean, how do I
recognize a mail as coming from the list to avoid to filter it as spam, or
to filter a personal reply as spam ).

Any how I've received a couple of replies to my question on firefox (and
one on Suse), so I do an interim summary. One reply was not in cc: to the
list but essentially agreed (in a nutshell here it is ...

On Tue, 29 Mar 2005, Nick Fortune wrote:

> Well, Style commands match on name class or resource.  On my machine,
> that would be "firefox-bin" "gecko" and "<web page title> - Mozilla
> Firefox". So your style command is probably not matching your firefox
> window on any of these categories.

> Style *Firefox* Page 1 0 0, SkipMapping, NoPPosition

This agrees with the other suggestion below

> Style Gecko  StartsOnPage 1 0, SkipMapping

Yes thanks, now it works fine those ways ...

Coming to my other issue, i.e. how to coerce firefox to use a fixed size,
I started from Thomas Adam's suggestions.

> *Event-FF: new_window MoveFireFox

new_window event is not recognized by my version, I had to use add_window

>   ThisWindow ("Gecko") Move 120p +0p

The above syntax (the way to combine conditions) was not fully clear to
me, I had to remove all the second line to make it work. I ended with the
following :

# for firefox special

*Event-FF: Cmd Function
*Event-FF: PassId
*Event-FF: add_window ResizeFireFox

DestroyFunc ResizeFireFox
AddToFunc   ResizeFireFox
 + "I" (!Transient) ThisWindow ("Gecko") Resize 850p 980p

I had to introduce the (!Transient) condition otherwise all the popups by
the browser came out as big as my 850x980 page !

I tried a (PlacedByFvwm !Transient) since I may not want my size to apply
to firefox windows not created at window manager startup), but
PlacedByFvwm, although documented, gives error. Or I'm doing something
silly with the syntax for condition concatenation.

... hmm, actually I'm not sure that my (!Transient) works. I mean, in
practice it works (popups are OK) but my .xsession-errors is full of
errors "No such command (!Transient) ... the same which occurred with
PlacedByFvwm.

This is why I consider this an interim summary.
Any further clue ?

---

From: Thomas Adam <[email-masked]>
Date: Tue, 29 Mar 2005 18:06:07 +0100

On Tue, Mar 29, 2005 at 06:58:32PM +0200, Lucio Chiappetti wrote:
> individually and cc: the list, reply individually and the original
> poster has a duty to post a summary) and as "software id" (I mean, how
> do I recognize a mail as coming from the list to avoid to filter it as
> spam, or to filter a personal reply as spam ).

One replies to the list, unless someone explicitly requests to be CCed
in which case, that's usually honoured.

> new_window event is not recognized by my version, I had to use

That was a mistake on my part -- there never has been an "new_window"
directive -- always "add_window".  Glad you know about the man page,
though.  :)

> DestroyFunc ResizeFireFox AddToFunc ResizeFireFox + "I" (!Transient)
> ThisWindow ("Gecko") Resize 850p 980p

> I had to introduce the (!Transient) condition otherwise all the popups
> by the browser came out as big as my 850x980 page !

Heh.  It was just a quick suggestion:

+ I ThisWindow ("Gecko" !Transient) Resize 850p 980p

> errors "No such command (!Transient) ... the same which occurred with

Indeed.  See above.  It's "ThisWindow" which needs to know about a)  The
name/resource/class of the window, and  b)  Any conditions to apply to
it.

-- Thomas Adam

---

From: Nick Fortune <[email-masked]>
Date: Tue, 29 Mar 2005 19:33:53 +0100

> in which case, that's usually honoured.

Whoops! I didn't notice the reply was just going to Lucio. It's been a while
since I last paricipated in one of these lists. I'll try not to do it again.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].