Re: FVWM: Style ... SkipMapping

2019-11-25 Thread Dr Rainer Woitok
Thomas,

On Wednesday, 2019-11-20 14:59:22 +, you wrote:

> ...
> 1.  Launch firefox.  When it's running, use FvwmIdent or xwininfo to ascertain
> the *class* of the window.  It's either going to be Firefox or something else.
> If it's not 'Firefox' then you'll understand why the Style isn't matching.

The class IS "Firefox".

> 2.  Try adding:  EWMHIgnoreStateHints

Doesn't help:

$ grep Firefox ~/.fvwm/config
Style Firefox  EWMHIgnoreStateHints, FixedPPosition, SkipMapping
Style Firefox  PositionPlacement 0p $[_WINDOW_TOP_]p, StartsOnPage 0 0 1
$ FvwmCommand 'Read config'
$ nohup firefox > /dev/null 2>&1 &
$

This still immediately leaves  the current page  and displays page "0 1"
instead, where I can watch Firefox unfolding, and never goes back to the
original page.

Regarding EMWH I found the following in "man fvwm":

   -V | --version
   Prints the version of fvwm to stderr.  Also prints an information
   about the compiled in support for readline, rplay, stroke, xpm,
   png, svg, GNOME hints, EWMH hints, session management,
   bidirectional text, multibyte characters, xinerama and Xft aa font
   rendering.

So I did

$ fvwm -V
fvwm 2.6.5 compiled on Sep 28 2019 at 11:15:46
with support for: ReadLine, XPM, PNG, SVG, Shape, XShm, SM, XRender, XCursor, 
XFT, NLS

fvwm comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of fvwm under the terms of the GNU General Public License.
For more information about these matters, see the file named COPYING.
$

but without finding any hint regarding EWMH.   So maybe it's not config-
ured in my version  of "fvwm".   But then,  Gentoo doesn't offer any USE
flags for "fvwm" which suggest having to do with EWMH support.

What next?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Thomas Adam
On Mon, Nov 18, 2019 at 06:36:13PM +0100, Dr Rainer Woitok wrote:
> And it works?   Well, I have "FixedPPosition" rather than "NoPPosition".
> Could that matter?   Or is the  relevent difference  that you  start the
> browser from  within "fvwm"  while I'm  starting it  from within a shell
> script?

If it's not working for you, then I would suggest you do the following:

1.  Launch firefox.  When it's running, use FvwmIdent or xwininfo to ascertain
the *class* of the window.  It's either going to be Firefox or something else.
If it's not 'Firefox' then you'll understand why the Style isn't matching.

2.  Try adding:  EWMHIgnoreStateHints

Kindly,
Thomas



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Lucio Chiappetti

On Wed, 20 Nov 2019, Dr Rainer Woitok wrote:


Well,  in my case it's just another page  in the same desktop.   I'm not
sure whether or not that matters.   But above of that  it's perhaps time
to compare Fvwm  and perhaps  also Firefox versions.



What versions do you use on what distribution?


On OpenSuse Leap 42.3, fvwm 2.6.6 Mozilla Firefox 60.0.2 (as I said, I do 
not routinely use FF, I vastly prefer Pale Moon !)





Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Dr Rainer Woitok
Lucio,

On Wednesday, 2019-11-20 14:23:04 +0100, you wrote:

> ...
> No, sorry, I was not clear. It is the browser which goes straight to the 
> desktop designated, but I remain in the primary desktop ! Which I guess 
> is what you'd like. And what I get.

Well,  in my case it's just another page  in the same desktop.   I'm not
sure whether or not that matters.   But above of that  it's perhaps time
to compare Fvwm  and perhaps  also Firefox versions.   On my Gentoo dis-
tribution they are:

   Fvwm:2.6.5-r3
   Firefox: 70.0.1

What versions do you use on what distribution?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Dr Rainer Woitok
Greetings,

On Tuesday, 2019-11-19 00:43:08 +, Hegel3DReloaded wrote:

> ...
> Your problem appeared trivial to me, but I have tried this in a test
> environment and found VERY interesting behaviour:

FINALLY!  It started to feel like fighting windmills ... thankyou :-)

>   Firefox is desparately
> trying to get in focus and under the mouse when started. It goes to the
> desk and page we told it, SkipMapping works, but window program is jumping
> back to you like a stray dog for a peace of meat. It is fast, so you cannot
> see it without serious throttling of the CPU and GPU. I have tried couple 
> other
> applications, but none of them exercises this behaviour. Tried even with
> InitialMapCommand style - with that, we have more freedom for experimenting.
> ...
> This works as a workaround:
> Style Firefox InitialMapCommand Schedule 500 MoveToPage 1 1

Not here,  assuming the phrase "work" refers to Fvwm at least eventually
moving back to the desktop page  where my terminal window is waiting for
input.

> This:
> Style Firefox StartsOnPage 0 1 1, SkipMapping, InitialMapCommand Schedule 500 
> MoveToPage 1 1
> 
> will produce the following funny scenario:
> 
> - Firefox appears on X server
> - Immediately mapped by FVWM on page 1 1
> - It gets back to you like a dog
> - ~ 0.5 seconds later, FVWM will kick it back where it belongs. :)

Again, not here.   Whatever I do  I always end up perpetually staring at
Firefox sitting in the desktop page I have assigned to it.

Since this apparently  being a  Firefox rather than  an Fvwm problem,  I
solved it now by removing the useless  "FvwmCommand 'Style Firefox Skip-
Mapping'" before the "nohup firefox" command and adding

   sleep 3
   FvwmCommand 'GotoDeskAndPage prev'

after the "nohup firefox" command.  This may well be regarded as an ugly
hack, bu at least it works, even though it takes 3 seconds.

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Lucio Chiappetti

On Wed, 20 Nov 2019, Dr Rainer Woitok wrote:


No idea why you start an application you always want NOT from InitFunction

Simply because I do NOT always want it :-)


of course ... your choice.

I have many things (most, editors and terminals) I do not start at login 
(these are essentially just browser, mail, plus fvwm-related things like 
pager, perfmeter etc.  ... there is even a network monitor I start at 
login but I dismiss soon)



I even tried now starting firefox (not my palemoon browser which I left
running) with /usr/bin/firefox & and it went straight to the desktop
designates for browsers (due to the vestigial style).


That's exactly  what I'm  observing here,  too,  and what I simply don't
want.   I want Fvwm NOT to change desktops  when I start  Firefox during
login.  Maybe, I just didn't yet get my point accross ...


No, sorry, I was not clear. It is the browser which goes straight to the 
desktop designated, but I remain in the primary desktop ! Which I guess 
is what you'd like. And what I get.



If you start a program using "nohup",  this command ...


I knew about it but it's a long long time since I felt the need to use it.

--
Lucio Chiappetti - INAF/IASF - via Corti 12 - I-20133 Milano (Italy)
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html

"Can you see Enrico Fermi punching a time clock? There are effective
ways to measure scientific productivity; times clocks are not the way."
(Leon M. Lederman to INFN)



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Dr Rainer Woitok
Lucio,

On Monday, 2019-11-18 19:00:56 +0100, you wrote:

> On Mon, 18 Nov 2019, Dr Rainer Woitok wrote:
> 
> >> Style Firefox   StartsOnDesk 1, SkipMapping, NoPPosition
> >>   + "I"   Test (Init) Exec exec /usr/bin/palemoon myhomepage
> >
> > And it works?

With "works" I meant it does respect "SkipMapping" and does NOT move to
desktop 1!  Does it do that?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-20 Thread Dr Rainer Woitok
Lucio,

On Monday, 2019-11-18 18:52:48 +0100, Lucio Chiappetti wrote:

> ...
> No idea why you start an application you always want NOT from InitFunction

Simply because I do NOT always want it :-)

> ...
> I even tried now starting firefox (not my palemoon browser which I left 
> running) with /usr/bin/firefox & and it went straight to the desktop 
> designates for browsers (due to the vestigial style).

That's exactly  what I'm  observing here,  too,  and what I simply don't
want.   I want Fvwm NOT to change desktops  when I start  Firefox during
login.  Maybe, I just didn't yet get my point accross ...

> ...
> If you are concerned of the runtime messages the browser may issue while 
> running (is that why you redirect stderr ?)

If you start a program using "nohup",  this command will create the file
"nohup.out" in the current directory, if both, standard output and error
are not taken care off.

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-18 Thread Hegel3DReloaded
On Monday, 18. November 2019 17:22, Dr Rainer Woitok  
wrote:

> Greetings,
>
> On Saturday, 2019-11-16 16:42:01 +, Hegel3DReloaded wrote:
>
> > ...
> > You need to leave this page.
>
> Well, when I'm there, I'll have to leave this page. But I don't want to
> get there in the first place. That's why I used the "SkipMapping" style
> which I THOUGHT would prevent exactly this.
>
> >Since this is probably in the InitFunction, then simply:
> >
>
> No, as could be clearly seen, it's not in the "InitFunction" but rather
> in a shell script named "firefox-start-up.sh" which contains the command
> "nohup firefox > /dev/null 2>&1 &".
>
> But perhaps that's the cause? Does "SkipMapping" only work for applic-
> ations started from within the "fvwm" configuration file? Could anyone
> shed some light on this?

If it is running on the same $DISPLAY, it should behave exactly the same no
matter if started from FvwmButtons, shell script or database trigger which
puts job in RabbitMQ ...

Your problem appeared trivial to me, but I have tried this in a test
environment and found VERY interesting behaviour: Firefox is desparately
trying to get in focus and under the mouse when started. It goes to the
desk and page we told it, SkipMapping works, but window program is jumping
back to you like a stray dog for a peace of meat. It is fast, so you cannot
see it without serious throttling of the CPU and GPU. I have tried couple other
applications, but none of them exercises this behaviour. Tried even with
InitialMapCommand style - with that, we have more freedom for experimenting.

This doesn't work (Firefox gets back):
Style Firefox InitialMapCommand MoveToPage 1 1

This works as a workaround:
Style Firefox InitialMapCommand Schedule 500 MoveToPage 1 1

This:
Style Firefox StartsOnPage 0 1 1, SkipMapping, InitialMapCommand Schedule 500 
MoveToPage 1 1

will produce the following funny scenario:

- Firefox appears on X server
- Immediately mapped by FVWM on page 1 1
- It gets back to you like a dog
- ~ 0.5 seconds later, FVWM will kick it back where it belongs. :)

I remember couple years ago, when 2-3 seconds after mapping Firefox moves
cca 1cm above top edge of the screen. It was the cat and mouse game between
Firefox and FVWM ... FVWM wins ... most of the time.

> > Why not something like this in InitFunction or SessionInitFunction?
> >
> > -   I Exec exec firefox
> > -   I Wait Firefox
> > -   I Next (Firefox) MoveToPage 0 1
>
> From the "fvwm" manpage I gather that "Wait ..." "causes execution of a
> function to pause until a new window matching ... appears".
>
> That's exactly what I want NOT to do! I do NOT want to watch Firefox
> waiting for the WiFi to become ready and then to reload all its tabs! I
> want to enter commands into my terminal window in another page instead!

I think you don't understand. It will last only up to the point when
Firefox window appears on the screen, after that, it will be moved from
the way, and can load it's tabs next two days if it wants.

BTW, This is the other way to acomplish certain order on workspaces after
login. It is preferred by me, so I didn't knew about Firefox agressive
behaviour until now.

> By the way: could you please explain the purpose of the "Next (Firefox)"
> clause after using "Wait Firefox" to wait until the window has mapped?
> Why not just use a plain "MoveToPage 0 1" here?

Because MoveToPage X Y will most probably be executed before Firefox appears.


In short, your best change is InitialMapCommand with Schedule X hack. Maybe
not 500, maybe it can be 200 or 50 ... practice.



... one of the main causes of the fall of the Roman Empire
was that, lacking zero, they had no way to indicate
successful termination of their C programs.
  -- Robert Firth



Re: FVWM: Style ... SkipMapping

2019-11-18 Thread Lucio Chiappetti

On Mon, 18 Nov 2019, Dr Rainer Woitok wrote:


Style Firefox   StartsOnDesk 1, SkipMapping, NoPPosition
  + "I"   Test (Init) Exec exec /usr/bin/palemoon myhomepage


And it works?   Well, I have "FixedPPosition" rather than "NoPPosition".


Sincerely I do not even remember why I have NoPPosition. I see I have it 
for all four "browser-type" entries, so it should be something dating a 
long time ago ...


... but I see I have it also globally in the front section together with 
this lot (which I can't remember when I inserted, I propagate .fvwrc from 
upgrade to upgrade)


Style * SloppyFocus
Style * DecorateTransient
Style * SmartPlacement
Style * NoPPosition
Style * ManualPlacementIgnoresStartsOnPage,
ActivePlacementIgnoresStartsOnPage

BorderStyle Inactive -- HiddenHandles NoInset

Concerning InitFunction vs started from command line I replied in the 
previous mail


--
Lucio Chiappetti - INAF/IASF - via Corti 12 - I-20133 Milano (Italy)
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html



Re: FVWM: Style ... SkipMapping

2019-11-18 Thread Lucio Chiappetti

On Mon, 18 Nov 2019, Dr Rainer Woitok wrote:

No, as could be clearly seen, it's not in the "InitFunction" but rather 
in a shell script named "firefox-start-up.sh" which contains the command 
"nohup firefox > /dev/null 2>&1 &".


No idea why you start an application you always want NOT from InitFunction


But perhaps that's the cause?   Does "SkipMapping" only work for applic-
ations started from within the "fvwm" configuration file?


But it should not matter. I sometimes have to kill my browser and then I 
restart it from a terminal, and goes straight to the desktop my .fvmrc 
(refer to my previous mail) designates for browsers,


I even tried now starting firefox (not my palemoon browser which I left 
running) with /usr/bin/firefox & and it went straight to the desktop 
designates for browsers (due to the vestigial style).


If you are concerned of the runtime messages the browser may issue while 
running (is that why you redirect stderr ?), also palemoon has that 
problem when started from a terminal. But I simply kill such terminal to 
get rid of them !


--
Lucio Chiappetti - INAF/IASF - via Corti 12 - I-20133 Milano (Italy)
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html

"Can you see Enrico Fermi punching a time clock? There are effective
ways to measure scientific productivity; times clocks are not the way."
(Leon M. Lederman to INFN)



Re: FVWM: Style ... SkipMapping

2019-11-18 Thread Dr Rainer Woitok
Lucio,

On Monday, 2019-11-18 12:03:58 +0100, you wrote:

> ...
> The only point is do you really mean "page" or "desktop" ?

As can be seen from the "Style Firefox StartsOnPage 0 0 1" line I mean a
particular page on a particular desktop.

> ...
> I have this (actually also a vestigial FF line)
> 
> Style "Pale Moon"   StartsOnDesk 1, SkipMapping, NoPPosition
> Style Firefox   StartsOnDesk 1, SkipMapping, NoPPosition
> 
> and in my StartFunction
> 
>   + "I"   Test (Init) Exec exec /usr/bin/palemoon myhomepage

And it works?   Well, I have "FixedPPosition" rather than "NoPPosition".
Could that matter?   Or is the  relevent difference  that you  start the
browser from  within "fvwm"  while I'm  starting it  from within a shell
script?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-18 Thread Dr Rainer Woitok
Greetings,

On Saturday, 2019-11-16 16:42:01 +, Hegel3DReloaded wrote:

> ...
> You need to leave this page.

Well, when I'm there, I'll have to leave this page.  But I don't want to
get there in the first place.  That's why I used the "SkipMapping" style
which I THOUGHT would prevent exactly this.

>  Since this is probably in the InitFunction, then 
> simply:

No, as could be clearly seen,  it's not in the "InitFunction" but rather
in a shell script named "firefox-start-up.sh" which contains the command
"nohup firefox > /dev/null 2>&1 &".

But perhaps that's the cause?   Does "SkipMapping" only work for applic-
ations started from within the "fvwm" configuration file?   Could anyone
shed some light on this?

> ...
> Why not something like this in InitFunction or SessionInitFunction?
> 
> + I Exec exec firefox
> + I Wait Firefox
> + I Next (Firefox) MoveToPage 0 1

>From the "fvwm" manpage I gather that "Wait ..."  "causes execution of a
function to pause until a new window matching ... appears".

That's exactly what I  want NOT to do!   I do NOT want  to watch Firefox
waiting for the WiFi to become ready and then to reload all its tabs!  I
want to enter commands into my terminal window in another page instead!

By the way: could you please explain the purpose of the "Next (Firefox)"
clause after using  "Wait Firefox"  to wait until the window has mapped?
Why not just use a plain "MoveToPage 0 1" here?

Sincerely,
  Rainer



Re: FVWM: Style ... SkipMapping

2019-11-18 Thread Lucio Chiappetti

On Sat, 16 Nov 2019, Dr Rainer Woitok wrote:


  During the login process on my laptop I want to fire up Firefox using
  a page different  from the  default page  where my terminal window is
  opened.   This way  I can start  entering commands  without having to
  wait for Firefox loading all its tabs.


I ceased using Firefox long ago (now using Palemoon) but I guess what I do 
is so similar for all browsers and was what I did in the past with FF.


The only point is do you really mean "page" or "desktop" ? I have 7 
desktops each one usually of one page (I can toggle to 2 or 4 pages to 
extend off screen but I rarely do that). All browsers should go to the 
second desktop (number 1, named "web") while the first one (number 0, 
named "mail") is the one where I usually login.


I have this (actually also a vestigial FF line)

Style "Pale Moon"   StartsOnDesk 1, SkipMapping, NoPPosition
Style Firefox   StartsOnDesk 1, SkipMapping, NoPPosition

and in my StartFunction

 + "I"   Test (Init) Exec exec /usr/bin/palemoon myhomepage

I have also a (vestigial ?) efent handler which I used to force the 
browser to a fixed non-default window size, but I guess it does not matter 
anymore. You could get my present (and some past) .fvwmrc from

http://sax.iasf-milano.inaf.it/~lucio/WWW/Opinions/window.html


3. What happens:  Firefox is starting in its own page, but this page is
   also the one shown on the screen rather than the page containing my
   terminal wind- ow.


I noticed a funny behaviour sporadically when starting libreoffice (with a 
slow splash screen) and changing desks while it is coming up. libreoffice 
may come up in the wrong desktop.



--
Lucio Chiappetti - INAF/IASF - via Corti 12 - I-20133 Milano (Italy)
For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html

"Can you see Enrico Fermi punching a time clock? There are effective
ways to measure scientific productivity; times clocks are not the way."
(Leon M. Lederman to INFN)



Re: FVWM: Style ... SkipMapping

2019-11-16 Thread Hegel3DReloaded
On Saturday, 16. November 2019 15:20, Dr Rainer Woitok 
 wrote:

> Greetings,
>
> maybe I totally misinterpret the "fvwm" manpage ...
>
> 1.  What I want:
> During the login process on my laptop I want to fire up Firefox using
> a page different from the default page where my terminal window is
> opened. This way I can start entering commands without having to
> wait for Firefox loading all its tabs.
>
> 2.  What I do:
>
> $ grep -C2 Firefox ~/.fvwm/config
>
> Always position a "firefox" window on page "0 0 1":
>
> 
>
>
> Style Firefox FixedPPosition
> Style Firefox PositionPlacement 0p $[WINDOW_TOP]p
> Style Firefox StartsOnPage 0 0 1
>
> ==
>
> $ grep -iC2 firefox firefox-start-up.sh
>
> Finally start "firefox" in its own page without going there:
>
> =
>
> FvwmCommand 'Style Firefox SkipMapping'
> nohup firefox > /dev/null 2>&1 &
>
> 3. What happens:
> Firefox is starting in its own page, but this page is also the one
> shown on the screen rather than the page containing my terminal wind-
> ow.

You need to leave this page. Since this is probably in the InitFunction, then 
simply:

+ I GoToPage 0 0

(for example, you want firefox on 0 1, and terminal is waiting for you on 0 0).

Why not something like this in InitFunction or SessionInitFunction?

+ I Exec exec firefox
+ I Wait Firefox
+ I Next (Firefox) MoveToPage 0 1

It will only flash for a part of the second and go away from your terminal.


--
... one of the main causes of the fall of the Roman Empire
was that, lacking zero, they had no way to indicate
successful termination of their C programs.
  -- Robert Firth




FVWM: Style ... SkipMapping

2019-11-16 Thread Dr Rainer Woitok
Greetings,

maybe I totally misinterpret the "fvwm" manpage ...

1. What I want:
   During the login process on my laptop I want to fire up Firefox using
   a page different  from the  default page  where my terminal window is
   opened.   This way  I can start  entering commands  without having to
   wait for Firefox loading all its tabs.

2. What I do:

   $ grep -C2 Firefox ~/.fvwm/config
   # Always position a "firefox" window on page "0 0 1":

   Style Firefox  FixedPPosition
   Style Firefox  PositionPlacement 0p $[_WINDOW_TOP_]p
   Style Firefox  StartsOnPage 0 0 1

   #
   $ grep -iC2 firefox firefox-start-up.sh
   # Finally start "firefox" in its own page without going there:

   FvwmCommand 'Style Firefox SkipMapping'
   nohup firefox > /dev/null 2>&1 &

3. What happens:
   Firefox is starting  in its own page,  but this page  is also the one
   shown on the screen rather than the page containing my terminal wind-
   ow.

4. Technical information:

   Gentoo, package x11-wm/fvwm, version 2.6.5-r3.

Cann anybody tell me what I have to do differently?

Sincerely,
  Rainer