Subject: dual head fvwm restart problem on solaris

From: "Nils Lohner" <[email-masked]>
Date: Tue, 09 Jan 2001 17:46:39 +0100

fvwm crashes (well, exits when it shouldn't) when using 'Restart' on a 
dual headed display.

I start fvwm from the ~/.xinitrx (exec fvwm2) with
openwin -dev /dev/fb0 -dev /dev/fb1
Is there a better way to start a multi-head system?

and my restart function from the menu is simply:

AddToMenu FvwmCommands  "Fvwm Commands" Title
+                       "Refresh"       Refresh
+                       "Recapture"     Recapture
+                       "Restart Fvwm"  Restart fvwm2

Here are the error messages I get.  the XPM ones are normal because its 
compiled without xpm support for the moment.

Regards,
Nils.

Default Font Path: /usr/openwin/lib/X11/
[FVWM.1][scanForPixmap]: <<WARNING>> Couldn't find pixmap 
mini-display.xpm
...
[FVWM.1][scanForPixmap]: <<WARNING>> Couldn't find pixmap mini-news.xpm
[FVWM.0][scanForPixmap]: <<WARNING>> Couldn't find pixmap 
mini-display.xpm
...
[FVWM.0][scanForPixmap]: <<WARNING>> Couldn't find pixmap mini-news.xpm
[FVWM.1][SetupICCCM2]: <<ERROR>> another ICCCM 2.0 compliant WM is 
running, try -replace
[FVWM.0][SetupICCCM2]: <<ERROR>> another ICCCM 2.0 compliant WM is 
running, try -replace

--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 9 Jan 2001 12:24:53 -0600

> +                       "Restart Fvwm"  Restart fvwm2

It should be 'Restart', not 'Restart fvwm2'.

On dual headed display FVWM spawns itself with -s and -display added
unless you yourself start it with -s and -display.

If you use 'Restart fvwm2' all command line arguments are lost, while
on Restart without arguments or with --pass-args, they are preserved.
Here are some cases when 'Restart fvwm2' will cause troubles:

  * running FVWM in a multi headed environment
  * running FVWM under a session manager (only 'Restart' supported here)
  * using command line arguments, like -f themes-rc or -cmd
  * if the first fvwm2 in the $PATH is not the same as the current one

Generally, you should always use Restart with no paramaters unless you
really know what you are doing. I think I may add a warning when Restart
is used with fvwm2 parameter suggesting to remove it, or specify a full
path and args if a user means "start another window manager instead"
rather than restarting the same one.

> [FVWM.0][SetupICCCM2]: <<ERROR>> another ICCCM 2.0 compliant WM is 

Regards,
Mikhael.

---

From: Nils Lohner <[email-masked]>
Date: Tue, 09 Jan 2001 19:37:48 +0100

...
>rather than restarting the same one.

Thanks for the info... I think a warning would be a good idea, or even 
better a nice entry in the man page under Restart with the details (and 
pitfalls) from your mail.

Thanks,
Nils.

---

From: Nils Lohner <[email-masked]>
Date: Tue, 09 Jan 2001 19:47:08 +0100

...
>  * if the first fvwm2 in the $PATH is not the same as the current one

I shouldn't send 'thanks' mails until having tried it... :)  I still 
get the same error.  THe behavior is that the WM on the display kills 
itself (fvwm borders etc. disappear) and the one on the other display 
doesn't, then the WM and server die.  Any other suggestions?

Nils.

---

From: Mikhael Goikhman <[email-masked]>
Date: Tue, 9 Jan 2001 17:14:49 -0600

> >It should be 'Restart', not 'Restart fvwm2'.

This is correct regardless of anything else.

> >unless you yourself start it with -s and -display.

This is not quite correct, FVWM only does this under SM. Otherwise it uses
fork() in this situation.

The problem is that we detect Restarting (fvwm.c, +602 block) after fork().
If only it would be possible to move this prior to +389 block. Seems hard.

Ok, I tried to fix this differently. Can you try the latest cvs?
I have no multi-headed setup to test this myself. If this does not help
(it should if you restart on :0.1), can you see if uncommenting lines
424-425 helps? If not, I pass the torch to someone with multi-head. :)

> doesn't, then the WM and server die.  Any other suggestions?

The current feature is that Restart on one screen does not affect at all
fvwm's on other screens. Of course, without multi-head I can only guess.

Here is a solution which should work even without my latest fix.
Instead of exec fvwm2 you may use commands (the last is without ampersand):

  fvwm2 -s -d :0.0 [other args] &
  fvwm2 -s -d :0.1 [other args]

In this case, Restart (not 'Restart fvwm2') will work on every screen.

Regards,
Mikhael.

---

From: Dominik Vogt <[email-masked]>
Date: Sat, 13 Jan 2001 00:01:24 +0100

> In this case, Restart (not 'Restart fvwm2') will work on every screen.

I do have a multi head setup, and fvwm does not exit with the
latest CVS.  I don't know if it exited before.  But it does not
work properly either:

(with two screens, 0 and 1)

 1) "Restart" on screen 0: Only the wm on screen 0 is restarted.
    All fvwms on all screens should be restarted.

 2) "Restart fvwm2" on screen 0: The fvwm on screen 0 is restarted.
    A new fvwm is started on screen 1, but the old one is not
   killed generating said error message:

     [FVWM.1][SetupICCCM2]: <<ERROR>> another ICCCM 2.0 compliant WM is running, try -replace

Bye

Dominik ^_^  ^_^

--
Dominik Vogt, [email-masked]
Reply-To: [email-masked]
--
Visit the official FVWM web page at <URL:http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm-workers" in the
body of a message to [email-masked].
To report problems, send mail to [email-masked]

---

From: Dominik Vogt <[email-masked]>
Date: Tue, 16 Jan 2001 23:24:50 +0100

On Sat, Jan 13, 2001 at 10:24:34PM -0600, Mikhael Goikhman wrote:
> On 13 Jan 2001 00:01:24 +0100, Dominik Vogt wrote:
> > 
> > latest CVS.  I don't know if it exited before.
> > But it does not work properly either:
> > 
> I don't see this logic in 2.2. The man page also only speaks about Quit as
> brodcasting its operation to all screens (using SIGTERM), not Restart.
> 
> I think this is correct and does not need to be fixed. A user should
> restart using "Restart", or if he so wants, "Restart fvwm2 -s".
> 
> I will update the man page and add a warning when I have a chance.

Okay.  I'll enter this as an enhancement request some day.

Bye

Dominik ^_^  ^_^