Subject: FVWM: fvwm-themes stalls when using root menu

From: Klaus Zeitler <[email-masked]>
Date: 22 May 2003 09:01:54 +0200

Hi,

I'm using fvwm 2.5.6 (with support for: XPM, PNG, Shape, XShm, SM, NLS)
and fvwm-themes 0.6.2 on Solaris 5.8.

I'm still playing around with the themes (really impressive I have to say),
but occasionally when I browsed in the root menu, fvwm stalled.  I found out
now that this happened when I moved the mouse pointer over the last 2 entries
in "Root Menu->System" i.e. over "Root dir" or "Home dir". The mouse pointer
changes to the little watch and fvwm stalls. I have to kill my whole session
from another workstation.

As a workaround I copied the file menus-programs to
 ~/.fvwm/themes/personal/menus-programs-extra and commented out the 2 lines
i.e. the last 4 lines:

#+ ""  Nop
#+ MissingSubmenuFunction FuncFvwmMenuDirectory
#+ "Root dir%menu/folder.xpm%"      Popup /
#+ "Home dir%menu/home.xpm%"        Popup ~

Now without these 2 entries it works, but I wonder what's causing it.

Thanks

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             [email-masked]  |
 ------------------------------------------
---
Life is too important to take seriously. -- Corky Siegel
--
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: Thu, 22 May 2003 10:19:56 +0000

> from another workstation.

You may instead kill fvwm-menu-directory process although I never saw it
may stall in many years, I don't see anything that may stall in it.

> Now without these 2 entries it works, but I wonder what's causing it.

Can you run "fvwm-menu-directory --dir /" from the shell? Does it stall?

If this is continued to be a problem for you, the correct way to fix it
is to create ~/.fvwm/themes/personal/functions-appbind-extra file
(see FAQ to read how to activate it) that looks like:

  DestroyFunc FuncFvwmMenuDirectory
  AddToFunc   FuncFvwmMenuDirectory
  + I AddToMenu "$0" "%menu/information.xpm%Disabled directory menu" Title

Regards,
Mikhael.

---

From: Klaus Zeitler <[email-masked]>
Date: 23 May 2003 08:46:35 +0200

>>>>> "Mikhael" == Mikhael Goikhman <[email-masked]> writes:
    Mikhael> 
    Mikhael> On 22 May 2003 09:01:54 +0200, Klaus Zeitler wrote:
    Mikhael> You may instead kill fvwm-menu-directory process although I never
    Mikhael> saw it may stall in many years, I don't see anything that may
    Mikhael> stall in it.

no, killing fvwm-menu-directory doesn't help.
But ps shows that the call to fvwm-menu-directory contains more parameters
than just '-d "/"'.

kzeitler 10861   794  0 14:53:40 pts/3    0:00 sh -c fvwm-menu-directory -d "/" --exec-file ^emacs --check-subdir --links --wm

seems to be from functions-appbind in default theme:

DestroyFunc FuncFvwmMenuDirectory
AddToFunc   FuncFvwmMenuDirectory
+ I PipeRead 'fvwm-menu-directory -d "$0" --exec-file ^emacs --check-subdir --links --wm-icons'

I can run the whole command (with and without the additional options) just
fine in a shell.

What amazes me is that fvwm stalls when I simply move the mouse over one of
the 2 menu entries "Root dir" or "Home dir", i.e. I don't click any of these
two entries. I'd expect fvwm to run the fvwm-menu-directory command as soon
as I select, i.e. click one of these entries.

Thanks,

Klaus

-- 
 ------------------------------------------
|  Klaus Zeitler      Lucent Technologies  |
|  Email:             [email-masked]  |
 ------------------------------------------
---
Technological progress has merely provided us with more
efficient means for going backwards.   -- Aldous Huxley
--
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: Fri, 23 May 2003 10:43:37 +0000

> I can run the whole command (with and without the additional options) just

This all is strange. Please create a minimal config ~/.fvwm/minimal that
looks like:

  DestroyFunc FuncFvwmMenuDirectory
  AddToFunc   FuncFvwmMenuDirectory
  + I PipeRead 'fvwm-menu-directory -d "$0"'

  AddToMenu MenuFvwmRoot
  + MissingSubmenuFunction FuncFvwmMenuDirectory
  + "Root directory" Popup /

Then do "Restart fvwm -f minimal" from FvwmConsole.
The default root menu should contain the last submenu.
Does it stall for you when you enter it?

If it does not stall (I think it will on your system), add this command
using FvwmConsole that is in the root menu, and enter this submenu again:

  BusyCursor DynamicMenu True, Read True

In case it does not stall (unlikely), type this into FvwmConsole:

  Restart fvwm-themes-start

> What amazes me is that fvwm stalls when I simply move the mouse over
> one of the 2 menu entries "Root dir" or "Home dir", i.e. I don't click
> any of these two entries. I'd expect fvwm to run the
> fvwm-menu-directory command as soon as I select, i.e. click one of
> these entries.

All popup submenus work on enter + optional delay, not on click, there
are some MenuStyle options to control this, try menustyle@brushedmetal.
I don't see anything to be amazed of, these 2 menus behave exactly like
other popup submenus except that they are dynamically built every time.
For example there are 2 Menu entries (not Popup) in the same System menu
labeled Browser. They are separate menus not submenus, i.e. work on click.
I hope they actually work ok for you.

Regards,
Mikhael.

---

From: Klaus Zeitler <[email-masked]>
Date: 23 May 2003 12:56:34 +0200

here's more info:

I added "Module FvwmCommand" to my startup and tried:
FvwmCommand FuncFvwmMenuDirectory "/"
Same result, fvwm stalled, but now I could still use this one xterm that
had the focus. The session error file (~/.dt/sessionlogs/sfsw51_DISPLAY=:0)
now said "Option exec-file requires an argument". Somehow it seems as if
that "^emacs" in:
+ I PipeRead 'fvwm-menu-directory -d "$0" --exec-file "^emacs" --check-subdir
vanishes into thin air.
So now I created an functions-appbind-extra with
--- snip ---
DestroyFunc FuncFvwmMenuDirectory
AddToFunc   FuncFvwmMenuDirectory
+ I PipeRead 'fvwm-menu-directory -d "$0" --exec-file "^emacs" --check-subdir --links --wm-icons'
--- snip ---
i.e. with a quoted "^emacs" and it works!

If that error log wouldn't be overwritten when I start a new session, I'd
have found this a lot easier. I think I'm going to save that at the end of my
xsession file now.

Still I have a few questions:

1. what's happening with that "^file" expression?
2. why/how is determined that emacs is used for text files? This is certainly
   not a problem for me, cause that's the only editor I've been using since
   1985, but we have other users here that despise emacs. Isn't it possible to
   use the env variable EDITOR or some such here?

Thanks

Klaus

Insanity is hereditary. You get it from your kids.

---

From: Mikhael Goikhman <[email-masked]>
Date: Fri, 23 May 2003 11:11:56 +0000

> 1. what's happening with that "^file" expression?

You may take a look at "man sh" on your system. I will quote it.

> 2. why/how is determined that emacs is used for text files? This is
>    certainly not a problem for me, cause that's the only editor I've
>    been using since 1985, but we have other users here that despise
>    emacs. Isn't it possible to use the env variable EDITOR or some such
>    here?

I would really like to use $EDITOR, but this variable is a bit useless in
X Window in that some of the editors open their own windows (weird) and
some work in the terminal as designed by $EDITOR. So to work for all
$EDITOR values you should always open xterm even for emacs. The caret
says not to open an xterm.

So the only way to customize this is to redefine FuncFvwmMenuDirectory
in functions-appbind-extra, you may redefine your own viewer, browser,
prefered image processors and so on in the same file too (see FAQ).

Regards,
Mikhael.

---

From: Gert Brinkmann <[email-masked]>
Date: Mon, 26 May 2003 14:13:01 +0200

> kzeitler 10861   794  0 14:53:40 pts/3    0:00 sh -c fvwm-menu-directory -d "/" --exec-file ^emacs --check-subdir --links --wm

It is not a problem of cyclic links somehow?

Gert

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 26 May 2003 15:44:05 +0000

On 26 May 2003 14:13:01 +0200, Gert Brinkmann wrote:
> 
> Klaus Zeitler wrote:
> 
> >kzeitler 10861   794  0 14:53:40 pts/3    0:00 sh -c fvwm-menu-directory 
> >-d "/" --exec-file ^emacs --check-subdir --links --wm
> 

There is no digging in more than depth 1 per menu, so the answer is no.

The problem is in unquoted "^" as Klaus said in another message.
Just tried on Solaris, this command tries to launch emacs, uff.
This is equivalent to "PipeRead emacs", fvwm will stall as expected.

Regards,
Mikhael.