fvwm-menu-directory

I am experimenting a strange issue with the following function (derived from Taviso’s configuration) in fvwm-crystal:

[code]DestroyFunc FuncFvwmMenuPicDirectory
AddToFunc FuncFvwmMenuPicDirectory

  • I PipeRead ‘case “$0” in
    “/mnt/usb/dom/Pictures”) myexec=“comix”;;
    “/home/dom/Pictures”
    ) myexec=“comix”;;
    esac;
    test -f “$0”/.icontitle.png && mytitle="$0"/.icontitle.png;
    test -f “$0”/.media.png && mypng="$0"/.media.png;
    fvwm-menu-directory --func-name “FuncFvwmMenuPicDirectory” --icon-title “${mytitle:-22x22/categories/directory.png}” --icon-file “${mypng:-22x22/categories/Graphics.png}”
    –icon-dir 22x22/categories/directory.png --dir “$0” --links --exec-title “^${myexec} ‘$0’”
    –exec-file “^${myexec}”’[/code]

With some directories, all is working fine, but with other not. As examples, from “/mnt/usb/dom/Pictures/Art/Abrupt Clio Team - Ressources Histoire”, the menu will launch the viewer both from the title and from a file.

From “/mnt/usb/dom/Pictures/Art/Abrupt Clio Team - Ressources Histoire/1886-1986 Dessin Presse France”, I get the menu but fvwm launch a term from the title and nano from a filename, with the file open in nano.

From “/mnt/usb/dom/Pictures/Art/Abrupt Clio Team - Ressources Histoire/1896-1960 Affiches cinéma français” or “/mnt/usb/dom/Pictures/Art/Abrupt Clio Team - Ressources Histoire/1901-1906 France”, I don’t get the menu but get the following errors again and again:

sh: -c: line 0: unexpected EOF while looking for matching `"' sh: -c: line 1: syntax error: unexpected end of file

So it’s likely you’re suffering from an encoding issue – do any of these paths have any accented characters in them? Try renaming the problematic directories to use other names.

– Thomas Adam

Yes, I have some such accented characters. But it is very strange because even some directories without such characters are failing. I try to move all the subdirs into “/mnt/usb/dom/Pictures/Art/Abrupt Clio Team - Ressources Histoire/” to “/mnt/usb/dom/Pictures/ tmp/” and all was working beside one : " /mnt/usb/dom/Pictures/ tmp/XIX°-XX° - Florilèges photos d’enfants". I guess that fvwm doesn’t like the “’”. I remplaced it by a space and it work.

So I moved back all the other subdir, but the problem remain the same.

I also try to have only one subdir: “/mnt/usb/dom/Pictures/Art/Abrupt Clio Team - Ressources Histoire/1901-1906 France” and doesn’t get any menu. And it is no accented characters in the path. I also removed all the files but one in order to be sure that this was no accented characters.

Last, I also have some files with japanese characters into their names and the same menu do not have any troubles with them.

So I guess, like fvwm-menu-directory is doing the whole menu structure before to display it, that it must be confused by some characters (like ’ ) into the names. Bug or not?

No bug – there’s just something at the shell which is causing oddities.

Narrow it down by replacing your complex commands by simple echo commands to some file so you can see what the shell is trying to parse.

– Thomas Adam