Re: FVWM: Style ... SkipMapping
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
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
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
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
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
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)