kterm に日本語出ない病を治療した。
なんのことはない。 昔からひきずってるイロイロへんてこな設定をやめたら、普通に動いた。 アホじゃん?
ちゅーか俺、じゃるき無さ過ぎ。 ちゅーかワシ、じぇーーーーーーんじぇん、じゃるきナイけんネ。
バカにソックシ
netscape 時代にはプロセス間通信によってブラウザに URI を読み込んでもらう という機能があったのだが、もじらでどうなってんのかわかんなかったので、 そのまま放置してたんだけど、 最近、まじめに仕事してていろいろ便利悪いのでこれもちょっと調べてみた。
とりあえず gnu ライクな作りなんで、 --help でナンか出るだろ、 と思ったら、出ました。
Usage: /usr/bin/mozilla-bin [ options ... ] [URL]
where options include:
GTK options
--gdk-debug=FLAGS Gdk debugging flags to set
--gdk-no-debug=FLAGS Gdk debugging flags to unset
--gtk-debug=FLAGS Gtk+ debugging flags to set
--gtk-no-debug=FLAGS Gtk+ debugging flags to unset
--gtk-module=MODULE Load an additional Gtk module
X11 options
--display=DISPLAY X display to use
--sync Make X calls synchronous
--no-xshm Don't use X shared memory extension
--xim-preedit=STYLE
--xim-status=STYLE
--g-fatal-warnings Make all warnings fatal
Mozilla options
-height <value> Set height of startup window to <value>.
-h or -help Print this message.
-installer Start with 4.x migration window.
-width <value> Set width of startup window to <value>.
-v or -version Print /usr/bin/mozilla-bin version.
-CreateProfile <profile> Create <profile>.
-P <profile> Start with <profile>.
-ProfileWizard Start with profile wizard.
-ProfileManager Start with profile manager.
-SelectProfile Start with profile selection dialog.
-UILocale <locale> Start with <locale> resources as UI Locale.
-contentLocale <locale> Start with <locale> resources as content Locale.
-remote <command> Execute <command> in an already running
Mozilla process. For more info, see:
http://www.mozilla.org/unix/remote.html
-splash Enable splash screen.
-jsconsole Start with Javascript Console
-edit <url> Start with editor.
-chrome <url> Load the specified chrome.
さすが unix 版ですね。 膨大なオプションがあるようです。 このうち、今回使いそうなのは、
-remote
これですな。 こいつに関してはhttp://www.mozilla.org/unix/remote.html これを参照せよとあるので行ってみると、
mozilla -remote "openurl(http://www.mozilla.org)"
Command syntax is case-insensitive, but will be listed here as they were in 4.x.
List of commands that seem to work:
openURL ( ) and openFile ( )
Prompt for a URL with a dialog box. openURL (URL) and openFile(URL)
Opens the specified document without prompting. openURL (URL, new-window)
Creates a new window displaying the specified document. openURL (URL, new-tab)
Creates a new tab displaying the specified document. (Available in 1.0.1, 1.1 and beyond) mailto ( )
pops up the mail dialog with the To: field empty. mailto (a, b, c)
Puts the addresses "a, b, c" in the default To: field. xfeDoCommand (openBrowser)
Opens a new browser window xfeDoCommand (openInbox)
Opens a new Mail & Newsgroups Window xfeDoCommand (composeMessage)
Opens a new Message Compose window ping()
こういうことらしい。 そこで、 kde のパネルに載せるランチャとしてこういうスクリプトを書いた。
#!/bin/sh
export LANG=ja_JP.eucjp
XMODIFIERS="@im=kinput2"
export XMODIFIERS
if [ -z $1 ] ; then
/usr/bin/mozilla &
else
if [ -f $1 ] ; then
/usr/bin/mozilla -remote "openFile ($1, new-window)"
else
/usr/bin/mozilla -remote "openURL ($1, new-window)"
fi
fi