nmtysh.log

Tech系のネタや日々の独り言などを書いています。

Mac 10.8 で GIMP 2.8.2 を動かす

Mac 10.8 で GIMP を実行しようとしたら、嵌っていたので備忘録的に。

GIMPをそのまま実行しようとしても以下なエラーがでて起動せず。どうやらフォント周りで問題が起きている模様。

$ /Applications/GIMP.app/Contents/MacOS/GIMP
GIMP
/Applications/GIMP.app/Contents/MacOS
/Applications/GIMP.app/Contents/Resources/bin:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Cannot spawn a message bus without a machine-id: Unable to load /var/lib/dbus/machine-id or /etc/machine-id: Failed to open file '/var/lib/dbus/machine-id': No such file or directory
(GIMP-bin:24768): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(GIMP-bin:24768): GLib-GObject-CRITICAL **: g_object_get_qdata: assertion `G_IS_OBJECT (object)' failed
(GIMP-bin:24768): GLib-GObject-CRITICAL **: g_object_set_qdata_full: assertion `G_IS_OBJECT (object)' failed
(GIMP-bin:24768): Pango-CRITICAL **: pango_fontset_foreach: assertion `PANGO_IS_FONTSET (fontset)' failed
(中略)
(GIMP-bin:24768): Pango-CRITICAL **: pango_fontset_foreach: assertion `PANGO_IS_FONTSET (fontset)' failed
(GIMP-bin:24768): Pango-WARNING **: failed to choose a font, expect ugly output. engine-type='PangoRenderCoreText', script='common'
(GIMP-bin:24768): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(GIMP-bin:24768): Pango-WARNING **: couldn't load font ".Aqua Kana Not-Rotated 12px", modified variant/weight/stretch as fallback, expect ugly output.
(GIMP-bin:24768): GLib-GObject-CRITICAL **: g_object_ref: assertion `G_IS_OBJECT (object)' failed
(GIMP-bin:24768): Pango-ERROR **: Could not load fallback font, bailing out.
Trace/BPT trap: 5


1. App Language Chooser をインストールします。
2. GIMP.app を App Language Chooser のウィンドウにドラッグアンドドロップします。
3. 起動言語に"English"を選択して、「Set as default language for this app」にチェックを入れます。
4. GIMP が起動したら、一旦終了します。
5. GIMP の起動スクリプトを修正します。

$ vim /Applications/GIMP.app/Contents/MacOS/GIMP

83行目ぐらい

$EXEC "$bundle_contents/MacOS/$name-bin"

LANG=ja_JP.UTF-8 $EXEC "$bundle_contents/MacOS/$name-bin"

に修正します。

これで日本語で起動できます。

参考:
GIMP - The GNU Image Manipulation Program
Mac App Store - App Language Chooser
X11 なし GIMP for Mac を日本語環境で起動するには « Ari's Blog