Subject: FVWM: applications during startup

From: calmar <[email-masked]>
Date: Tue, 17 Feb 2004 01:58:26 +0100

Hi,

I want to start some applications during startup.

I have the CVS Version of fvwm and I added this to the .fvwm2rc file: 

,----
| AddToFunc InitFunction
| + I exec fvwmsetbg -l
| + I exec emacs
| + I Wait Emacs
| + I Next (Emacs)  MoveToPage  2 0
| + I Next (Emacs) WindowStyle !Borders, NoTitle
| + I Next (Emacs)  ResizeMove 100 100 0 0
| + I exec aterm
| + I Wait aterm
| + I Next (aterm)  MoveToPage  0 0
| + I Next (aterm) WindowStyle !Borders, NoTitle
| + I Next (aterm)  ResizeMove 100 100 0 0
`----

I want the application to start on a given page (and I thought I
would try to do with with the `MoveToPage' function. 
I also want to give this app some Styles (like above !Borders,
NoTitle)

But it happens that especially the MoveToPage does not work. The
apps are showing up on the page 0 0 only. But when I invode the
MoveToPage command after all is started up, it works. (So after 2
hours of testing I'm also a little bit confused, and don't know
really what works or not ... I have to admit)

Maybe I could try to get this to work when I switch to a desk,
and just startup there the application (according the the fvwm
man page), but then I'm still wondering why this above does not
really work here.

Maybe the Wait function does not wait long enough? or has a wrong
parameter?

Maybe it's not a good idea to use the cvs version really?

Thanks for any hints!

Marco Candrian
-- 
  calmar 
           (o_         GNU/Linux is GREAT      
           //\                 
           V_/_        http://www.calmar.ws 

--
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, 17 Feb 2004 01:02:39 +0000 (GMT)

> Hi,

[..snip..]

> really what works or not ... I have to admit)

See the manpage "man fvwm". Essentially, you want to use:

StartsOnPage

style.

-- Thomas Adam

=====
"The Linux Weekend Mechanic" -- http://linuxgazette.net
"TAG Editor"                 -- http://linuxgazette.net

"<shrug> We'll just save up your sins, Thomas, and punish 
you for all of them at once when you get better. The 
experience will probably kill you. :)"

 -- Benjamin A. Okopnik (Linux Gazette Technical Editor)

___________________________________________________________
BT Yahoo! Broadband - Free modem offer, sign up online today and save £80 http://btyahoo.yahoo.co.uk
--
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: "George \"Nephrite\" Potapov" <[email-masked]>
Date: Tue, 17 Feb 2004 10:19:27 +0300

> really what works or not ... I have to admit)

You may try using StartsOnPage style. Like this

AddToFunc InitFunction
+ I Style Emacs StartsOnPage 2 0
+ I exec emacs
+ I wait Emacs
+ I Style Emacs StartsAnyWhere

here we set style for emacs to appear on page 2 0 , then wait for window to
appear and then remove the style just in case you want to launch other
emacses in current page. I didn't test it though, try on your own risk :-)

> Maybe the Wait function does not wait long enough? or has a wrong

Documentation says 'Wait' will wait until window appears, no timeouts apply.

> Maybe it's not a good idea to use the cvs version really?

I don't think they've broken this. Maybe there are some other issues.

-- 
С уважением,
Георгий "Nephrite" Потапов
Inline Technologies

---

From: stu <[email-masked]>
Date: Tue, 17 Feb 2004 09:31:17 +0200

On Tue, 17 Feb 2004 01:58:26 +0100

> really what works or not ... I have to admit)
 
I wanted to do a similar thing - see thread 'Auto-starting apps at fvwm
startup' (Date: Thu, 27 Nov 2003) for an explanation of some of your
problems. I also started with the 'Wait' and 'MoveToPage' approach, and
ended up with the following :

Style "*ylpheed*"   StartsOnPage 4 0, SkipMapping
Style "gkrellm"     StartsOnPage 5 0, SkipMapping

DestroyFunc InitFunction
AddToFunc   InitFunction I Exec exec xterm -T xterm -geometry 80x25+0+0
                       + I Exec exec sylpheed-claws
                       + I Exec exec gkrellm

The only thing I don't like about 'StartsOnPage' is that it binds the
app to a particular page, no matter where you start it from, which is a
bit limiting. 

-- 
Stuart Logie
Programmer

UNIVERSAL COMPUTER SERVICES (PTY) LTD
A member of South Africa's largest retail software vendor, the UCS Group

Tel : (011) 712 1371   Cell : 082 902 5632
Fax : (011) 339 3421
Internet : http://ucs.co.za

"I am the Unconquerable Spirit."
               -- Poet Unknown
   
Powered by Debian GNU/Linux - testing/unstable

---

From: calmar <[email-masked]>
Date: Tue, 17 Feb 2004 23:24:05 +0100

calmar <[email-masked]> writes:

Hi all,

Thanks for you hints.

So I have still an additional issue.

This is what I'm fiddling/working around with:

,----
| DestroyFunc StartFunction
| AddToFunc StartFunction
| + I Style *aterm* StartsOnPage 1 0, SkipMapping,!Borders, NoTitle
exec aterm
Wait aterm
All (*aterm*)  ResizeMove 100 100 0 0
`----

When I don't have the `+ I Wait aterm', aterm will not get
Resized. So this (probably) is easy to understand, because while
fvwm executes the ResizeMove Command, aterm is not yet loaded (in
this Window-Ring).

When I have the `+ I Wait aterm' line, ResizeMove will get the
aterm, and it will ResizeMove it, but aterm will be on page 0 0
instead on 1 0 (StartsOnPage 1 0).

So obviously when that ResizeMove  gets its action to the
aterm app, it obviously interferes with the above statement
`StartsOnPage' in some way.
Or maybe the `Wait' interferes in some way.

At least configured like above, I get an aterm on desk/page 0 0
instead of `1 0'.

When I paste this into the FvwmKonsole:

,----
| Style *aterm* StartsOnPage 2 0, SkipMapping,!Borders, NoTitle
| exec aterm
| Wait aterm
`----

The aterm is landing on 2 0 correctly.

when I paste something like this

,----
| Style *aterm* StartsOnPage 2 0, SkipMapping,!Borders, NoTitle
| exec aterm
| Wait aterm
| All (*aterm*)  ResizeMove 100 100 0 0
`----

again the aterm gets ResizeMove's _but_ on the actualy page.

In this area, I found also this:

When I open an aterm on page 2, then open an FvwmKonsole on p.e
page 1, and execute there this:

,----
| All (*aterm*)  Move 100 100 0 0  
`----

.. Then when I go again to page 2 again, there is no such window
anymore.
I can get it back when I open the WindowList and select it there.

Thanks for any hints!

Greetings
marco candrian

---

From: calmar <[email-masked]>
Date: Wed, 18 Feb 2004 00:41:13 +0100

Hi all,

 Thanks for you hints.

 ,----
 | DestroyFunc StartFunction
 | AddToFunc StartFunction
 | + I Style *aterm* StartsOnPage 1 0, SkipMapping,!Borders, NoTitle
 | + I exec aterm
 | + I Wait aterm
 | + I All (*aterm*)  ResizeMove 100 100 0 0
 `----

 ,----

 ,----

 ,----

 Thanks for any hints!

 Greetings
 marco candrian

---

From: calmar <[email-masked]>
Date: Wed, 18 Feb 2004 03:04:49 +0100

Hi all,

sorry for posting the lsat post twice, but I had an error in the
first post + (I was not sure if the 1st mail actually arrived).

Anyway, obviously emacs places itself automatically in a proper
fashion into the window. (no title bar and no Window Decoration
to see), and this without any special settings for it:
Just in case: (emacs without borders ...)
http://tinyurl.com/34v42

and this with just this setting in emacs and no setting in
.fvwmrc
,----
|  (setq initial-frame-alist '((top . 1) (left . 1) (width . 109)
|  (height . 49)))
`----

So this was 'very important' for to get this like this. Finally
without doing anything :)

I finished now my basic fvwm configuration (keys,menu,mouse), and
I can already work with it in a way I like to work (even so I
won't do any serious work actually . but I could). Well it took
me some hours to get all the keybindings and actions
'straight'. I'm was not used to read man pages, but rather tutorials
for beginners :) when I want to learn something.

I'm happy to improve this basic basis to make it even more
efficient for my taste, including maybe some eyecandy in the
future when I like to do.

Just in case someone came throught to here with reading those
boring stuff above, I have a habbit to donate something (not
really much) to products I like, as if I would buy it. About the
same price someone would have to pay for a commercial product
.. (ups:  something like fvwm would be quite expensive I could
easily imagine) so at least part of it ...

Is there anywhere a link where someone can donate something for fvwm?
Or an account.

Greetings and thanks
marco candrian