デスクトップ環境構築 - 共通事項 - メニュー - MenuMaker - 表示を冗長に

クラウディア 
1. 概要
2. -v を重ねるのだ
3. 実行

1. 概要

 これは、後述の「日本語化」や「トラブルシュート」の過程でわかったことなのですが・・・。  「MenuMaker」のオプションに「-v」というのが、あります。  これ、表示を冗長にするオプションで、「-v」なしだと

> mmaker -f --no-legacy --no-debian FluxBox
  no terminal emulator specified; will use the default
 てな表示のみなのですが、「-v」をつけると

> mmaker -f --no-legacy --no-debian FluxBox -v
* scanning
  desktop... 26 apps found
  skipping legacy
  skipping Debian
* merging... 6 coincidings detected
* generating
  no terminal emulator specified; will use the default
  using Xterm as terminal emulator
* writing to ~/.fluxbox/menu
* done
 てな感じで、動作を読むことができます。  ところが、「.desktop」に何をとりこんでいるかを見るには、「/usr/local/share/menumaker/Prophet/Desktop/__init__.py」の

def scan():
    """Scan through all containers and return a list of found valid entries"""
    global _kws
    result = []
    msg("  desktop...", newline=False)
    for c in dirs:
        for w in os.walk(c):
            _kws = _dir2kws(w[0])
            if verbose > 1:
                msg("\nentering " + w[0])
            for x in fnmatch.filter(w[2], "*.desktop"):
                if verbose > 1:
                    msg("parsing %s..." % x, newline=False)
                try:
                    result.append(App(os.path.join(w[0], x)))
                    if verbose > 1:
                        msg("ok")
                except (NotDesktop, Prophet.NotSet) as e:
                    if verbose > 1:
                        msg("REJECTED : " + str(e))
                except UnicodeDecodeError:
                    if verbose > 1:
                        msg(".desktop UTF-8 decode issue in " + desktop)

    msg(" %d apps found" % len(result))
    return result
 例えば、154行目あたりのログが出れば、「ok」とかって出力されるはずなんですよね・・・。  ところが、はて・・・「verbose > 1」って?

2. -v を重ねるのだ

 答えは、「/usr/local/share/menumaker/MenuMaker/CLI.py」の中にありました。

vStr = "be verbose"


def vOpt(option, opt, value, parser):
    v = MenuMaker.verbose
    if v < 3:
        v += 1
        MenuMaker.verbose = Prophet.verbose = v
 「-v」は、複数、2個までは書けるのだ。

3. 実行

 実際にやってみます。

> mmaker -f --no-legacy --no-debian FluxBox -v -v
* scanning
  desktop...
entering /usr/local/share/applications
parsing gtk3-icon-browser.desktop...REJECTED : NoDisplay is True
parsing gtk3-widget-factory.desktop...REJECTED : NoDisplay is True
parsing gvim.desktop...ok
parsing gtk3-demo.desktop...REJECTED : NoDisplay is True
parsing vim.desktop...ok
parsing mate-about.desktop...REJECTED : NoDisplay is True
parsing xterm.desktop...ok
parsing fcitx-skin-installer.desktop...REJECTED : NoDisplay is True
parsing fcitx.desktop...ok
parsing mate-color-select.desktop...ok
parsing fcitx-configtool.desktop...ok
parsing mate-disk-usage-analyzer.desktop...ok
parsing mate-panel.desktop...REJECTED : NoDisplay is True
parsing mate-screenshot.desktop...ok
parsing octopkg.desktop...ok
parsing mate-search-tool.desktop...ok
parsing mate-system-log.desktop...ok
parsing org.gnome.Nautilus.desktop...ok
parsing gksu-properties.desktop...ok
parsing mate-dictionary.desktop...ok
parsing chromium-browser.desktop...ok
parsing nautilus-autorun-software.desktop...REJECTED : NoDisplay is True
parsing gksu.desktop...ok
parsing clamtk.desktop...ok
parsing claws-mail.desktop...ok
parsing xdgmenu.desktop...ok
parsing libreoffice-calc.desktop...ok
parsing libreoffice-draw.desktop...ok
parsing libreoffice-impress.desktop...ok
parsing libreoffice-math.desktop...ok
parsing libreoffice-startcenter.desktop...ok
parsing libreoffice-writer.desktop...ok
parsing libreoffice-xsltfilter.desktop...REJECTED : NoDisplay is True
parsing libreoffice-base.desktop...ok

entering /usr/local/share/applications/RCS
 26 apps found
  skipping legacy
  skipping Debian
* merging... 6 coincidings detected
* generating
  no terminal emulator specified; will use the default
  using Xterm as terminal emulator
* writing to ~/.fluxbox/menu
* done
 「.desktop」取り込み過程がわかりますね。  「.desktop」ファイルがあって、メニューに、取り込まれないのは、何故かまで、納得できます。
ハイスピードプラン