Subject: FVWM: "Problem" Swallow:ing XCosnole in FvwmButtons

From: Johan Svedberg <[email-masked]>
Date: Mon, 30 Jun 2003 19:03:04 +0200

Hi, all!

I've bumped into somewhat of a problem when I Swallow XConsole in my
FvwmButtons. The problem lies in the fact that on some systems where I
use this setup the display manager (XDM) has already started an XConsole. So
when I use a this line:

        *FvwmButtons: (1x1-0+0, Padding 0 0, Swallow "XConsole" 'Exec exec xconsole -bg black -fg white -fn 5x7 -file /dev/console -verbose &')

...the XConsole doesn't even get swallowed. Now I know that I can use
Swallow (UseOld) to make it swallow the existing XConsole, but then I
have the problem that I can't customize XConsole the way I want.

So I guess what I'm looking for is a way to get the running XConsole out
of the way and swallow my own process, is there a clean way to do this?

Regards,

-- 
Johan Svedberg, [email-masked], http://www.acc.umu.se/~winkle
--
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: Johan Svedberg <[email-masked]>
Date: Mon, 30 Jun 2003 19:12:02 +0200

> of the way and swallow my own process, is there a clean way to do this?

Looking at the existing flags to Swallow, maybe KillOld would be an idea
to implement?

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 30 Jun 2003 17:23:43 +0000

> Looking at the existing flags to Swallow, maybe KillOld would be an idea

Do:

  *FvwmButtons: (1x1-0+0, Padding 0 0, Swallow "XConsole" 'Exec killall xconsole; xconsole -bg black -fg white -fn 5x7 -file /dev/console -verbose')

If your system has no killall, replace it with kill/pidof or whatever
else your system has.

Or alternativelly use (Swallow "XConsole" RestartConsole) with:

  AddToFunc RestartConsole
  + I All (XConsole) Close
  + I Exec exec xconsole -bg black -fg white -fn 5x7 -file /dev/console -verbose

Regards,
Mikhael.

---

From: Johan Svedberg <[email-masked]>
Date: Mon, 30 Jun 2003 19:27:47 +0200

>   + I Exec exec xconsole -bg black -fg white -fn 5x7 -file /dev/console -verbose

Thanks Mikhael.

---

From: Johan Svedberg <[email-masked]>
Date: Mon, 30 Jun 2003 20:07:30 +0200

[...]

>   + I Exec exec xconsole -bg black -fg white -fn 5x7 -file /dev/console -verbose

Hmmm, I had to go with the alternative since root owns the initial
process, so I don't have permission to kill it. Although when going with
the second choice everything freezes (Wait:ing for something I guess)
for about ~30sec before I get control back. Is there anything I can do
about this other than pressing Ctrl-Alt-Esc?

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 30 Jun 2003 18:37:24 +0000

> about this other than pressing Ctrl-Alt-Esc?

I can't reproduce any freeze if I use the second approach (I started
xconsole as root before starting my minimally configured FvwmButtons).
Try to make it reproduceable and report this back.

In the mean time you may simply do:

  All (XConsole) Close
  FvwmButtons [alias]

Regards,
Mikhael.

---

From: Johan Svedberg <[email-masked]>
Date: Mon, 30 Jun 2003 20:53:05 +0200

* Jun 30 20:38 Mikhael Goikhman <[email-masked]>:

[...]

> Try to make it reproduceable and report this back.

I see now that this was not related. Your sulution works flawless,
thanks again.