Subject: FVWM: FVWM changing $DISPLATY env variable??

From: David Sun <[email-masked]>
Date: Tue, 15 Mar 2005 15:32:55 -0500

Hi all,
I am meeting problem with FVWM with the configuration:

XFree86 4.3.0 with dual display --not Xinerame, so that I can move mouse
back and forth to switch between 2 independent screens 

FVWM 2.4.18, in which I bound the CTRL-ALT-SHIFT-X to xterm:
Key X A CMS Exec /usr/X11R6/bin/xterm

Short description:
I need the $DISPLAY env variable always be :0.0 once FVWM is up, but
FVWM will occasionally change it to :0.1 on startup

Long description of my situation:

1. At system startup two screens show up, with mouse on the primary
screen :0.0, and I do a CTRL-ALT-SHIFT-X for an xterm, the xterm window
will occasionally appear on the secondary screen :0.1, which annoys me 
since it's expected to appear on the primary screen.

2. For debug purpose, I bound CTRL-ALT-SHIFT-M to a message box to tell
the current $DISPLAY:
Key M A CMS Exec xmessage "`echo $DISPLAY`"

And it occasionally shows ":0.1" after startup if I press the key
conbination, even if I set $DISPLAY to :0.0 immediately before FVWM
starts.

3. So it turns out that FVWM is changing $DISPLAY sometimes, but not
always

Any help is appreciated

-- 
thanks & regards
David Sun

--
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: Mikhael Goikhman <[email-masked]>
Date: Tue, 15 Mar 2005 19:25:15 +0000

> FVWM will occasionally change it to :0.1 on startup

I think (can't check) that fvwm ignores screen part of $DISPLAY, i.e. it
behaves as if you have DISPLAY=:0 and spawns 2 instances if needed.

To make it only manage :0.0, start fvwm as:

  fvwm -s -d :0.0

I don't understand your setup fully, but if you do need 2 instances and
you do not trust fvwm to do the right thing, one of the ways would be:

  fvwm -s -d :0.0 &
  fvwm -s -d :0.1 &
  xmessage "Close me to end X"

P.S. I only speak from what I see in the code and the man page,
I never actually had multi-head displays.

There is a complex logic of when/how fvwm spawns instances on multi-head
displays and how it sets $DISPLAY, but I think this logic is mostly ok.
Synchronizing 2 instances may be however problematic on Restart and Quit.

Regards,
Mikhael.