Subject: FVWM: placement of windows from another host ???

From: Albrecht Kadlec <[email-masked]>
Date: 15 Apr 1996 14:12:01 +0200

hullo all,

I have a single 3x2 desktop (I don't like many desktops, since I
can't just cross the borders with the mouse).
I frequently work on more than one host (different accounts on
different hosts).

I end up starting e.g emacs on java.vlsivie, wait for the mapping and
then continue to work on vta_host.auto, while emacs initializes itself.

Or I read News with emacs on java, stumble over an url, have emacs
open netscape for me. When netscape is mapped, I move it to the next
page.

I'd very much like to have this done by fvwm.
One would use StartsOnDesk/Page and SkipMapping in the styles.

I could even specify that the "[email-masked]" would 
"StartOnPage 1" (emacs sets the title in a clever way on startup).

But how do I specify, that all emacses from any host in vlsivie
StartOnPage 1 in the lower row of pages and all netscapes from that
domain on Page 2, while I use the upper row of pages for my primary
account ?

I suspect sth like 
	style "emacs@*.auto" StartsOnPage 1, Skipmapping
	style "emacs@*.vlsivie" StartsOnPage 3, Skipmapping
	style "netscape@*.vlsivie" StartsOnPage 4, Skipmapping
might be the right direction, when StartsOnPage is up & working.

But: netscape & others don't set it's title to 'argv[0]@host.domain' on
startup. (only emacs seems to do this.)

So it would be great to have fvwm2 handle this.
Does fvwm know the host of the connecting client? Or is this info only
present in the X server?

If fvwm knows the address, it could automatically split off the
@host.domain part of the style string and use it for matching.

The other possibility is to add a  -T $0@`hostname` wrapper to all
commands at the shell level, rendering the builtin titles useless.

Am I on the right way?
Any comments?

albrecht
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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: Kai Grossjohann <[email-masked]>
Date: 15 Apr 1996 15:37:47 +0200

>>>>> On 15 Apr 1996 14:12:01 +0200, Albrecht Kadlec
>>>>> <[email-masked]> said:

  Albrecht> But how do I specify, that all emacses from any host in
  Albrecht> vlsivie StartOnPage 1 in the lower row of pages and all
  Albrecht> netscapes from that domain on Page 2, while I use the
  Albrecht> upper row of pages for my primary account ?

That's what resource names are for.  You can start
    emacs -name bla
and Fvwm will recognize it under the name of bla (amongst others).

Let's just hope that Netscape obeys the rules and recognizes this
command line option, too.

kai
--
There ain't no cure for the summertime blues.

---

From: [email-masked] (Albrecht Kadlec)
Date: Mon, 15 Apr 96 15:59:24 +0200

>>>>> Kai Grossjohann writes:

K> That's what resource names are for.  You can start
K>     emacs -name bla
K> and Fvwm will recognize it under the name of bla (amongst others).

K> Let's just hope that Netscape obeys the rules and recognizes this
K> command line option, too.
:-)

I don't think all X software will recognize this one (though it SHOULD).

And I don't like the idea of mangling the class name:
who knows what is depending from that info.

and they're both still emacses of the class 'Emacs', so why name one emacs
'vi' on one domain ?

also it's a kind of pain to alias ALL X commands on one host to have -name
sth-else and then duplicate all style commands in .fvwm2rc on order to add
StartsOnPage.

I don't know what commands I'll start on that host, but I want EACH to show
up on my lowest left page, and netscapes on the left but one page.

so in fact I'd like to use sth like
	style "*@*.auto" StartsOnPage X
	style "*@*.vlsivie" StartsOnPage Y

and still have other style options under their normal names, since all
matching options are ORed together.

cheers,
albrecht
-- 
You learned your lesson far too late  from the links in a chemist chain.
								-- Marillion

---

From: Kai Grossjohann <[email-masked]>
Date: 15 Apr 1996 16:07:09 +0200

>>>>> On Mon, 15 Apr 96 15:59:24 +0200, [email-masked]
>>>>> (Albrecht Kadlec) said:

  Albrecht> And I don't like the idea of mangling the class name: who
  Albrecht> knows what is depending from that info.

You're not mangling the CLASS, you're mangling the NAME.  By default,
X uses the name of the excutable as NAME.  Thus, try cp xterm bla,
then call bla and you'll see that it's still got XTerm as class but
now bla as name.

  Albrecht> also it's a kind of pain to alias ALL X commands on one
  Albrecht> host to have -name sth-else and then duplicate all style
  Albrecht> commands in .fvwm2rc on order to add StartsOnPage.

You could use the same NAME for all of them so that you only have one
entry in .fvwm2rc.

  Albrecht> I don't know what commands I'll start on that host, but I
  Albrecht> want EACH to show up on my lowest left page, and netscapes
  Albrecht> on the left but one page.

I admit that this is less than perfect.

kai

---

From: [email-masked] (Albrecht Kadlec)
Date: Mon, 15 Apr 96 16:25:22 +0200

K> You're not mangling the CLASS, you're mangling the NAME.  By default,
K> X uses the name of the excutable as NAME.  Thus, try cp xterm bla,
K> then call bla and you'll see that it's still got XTerm as class but
K> now bla as name.

ok, class, name, title these are the options for quick & dirty hacks.
As soon as StartsOnPage is working I was planning to do sth like this
anyway, BUT:

K> You could use the same NAME for all of them so that you only have one
K> entry in .fvwm2rc.

K> I admit that this is less than perfect.

Well I just wanted to put in my 2 Groschen, as the StartsOnPage style is
still to be implemented, and also before TGSFR.

So maybe it could be held in mind that someone might want to specify flags
upon WHERE the client connected from while hacking the style thingie.

That alone could change A LOT ;^)

It's some sort of having two -or many- different X Terminals connected to
different hosts, knowing that an emacs on "X terminal 1" is from host1, but
still being able to move windows from one 'X terminal' to the other, since
it's the same virtual desktop (for StartsOnPage) / X server (for
StartsOnDesk)  on the machine in front of you. 

most things can be made better with some hacking, but proper designing /
programming is far better in the long run.

I wouldn't have posted, if I thought I was the only one with X applications
from two hosts mixing....

(You always have to bear in mind, WHERE the application/ host ist, when
pressing the PRINT button.)

albrecht
-- 
Oooo  You cannot reach me now,
Oooo  No matter how you try.
Goodbye cruel world, it's over.
Walk on by.			-- Pink Floyd
--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
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].