zeroconfの場合
./pharo-ui -compositioninput Pharo.image
で起動してください。-compositioninput
がミソです。
これはCogVMのオプションなので、Squeakでも同様です。
PharoLauncherの場合
現状のPharo LauncherではVMへのオプションを設定できないので、PharoLauncherに手を入れてみました。VMのキャッシュのスリプトを編集する手もありますが、VMが更新されるたびに編集するのは面倒臭いので、とりあえずPharoLauncherに unix系だったら -compositioninput
オプションを付けてPharoを起動するようにしました。
gistにパッチを置きました。
wget https://gist.githubusercontent.com/tomooda/c70abc3efdea398b80137a111e5a919b/raw/64658e381f2ee74008e1abb0b6da8767d115fcf2/PhLImage-launchCommandWithuseSettings.st
をコマンドシェル上で実行して、LinuxをGUIで使っている人は、できたファイルを 既に開いているPharoLauncher 上にドロップしてください。
すると、メニューが出るので、Install into new change setを選んでください。
CUIで使っている人は、PharoLauncherで日本語を使えるようにする3つの方法を参考にして、開発者モードにして、上記ファイルをfileinしてください。
そして右下のQuitボタンで、一旦PharoLauncherを終了してください。
ウィンドウマネージャの「閉じる」ボタンで終了すると修正が保存されない場合があったり色々面倒なので、必ず Pharo Launcherの右下のQuitボタン を使ってください。
なお、パッチの内容は以下の通りです。決め打ちのハックにすぎないので、そのうち一般化してPharoLauncherにPRします。
launchCommandWith: vmCommand useSettings: usePharoSettings
| imagePath vmDirectoryPath command basicCommand |
imagePath := file pathString.
vmDirectoryPath := vmCommand asFileReference parent fullName.
command := String
streamContents: [ :cmd |
cmd << 'cd ' << file parent pathString surroundedByDoubleQuotes << ' && '.
Smalltalk os isUnix
ifTrue: [ cmd << (self exportLDLibraryPathCommandWith: vmDirectoryPath) << ' && export SQUEAK_PLUGINS="" && ' ].
cmd << vmCommand surroundedByDoubleQuotes.
Smalltalk os isUnix ifTrue: [ cmd << ' -compositioninput'].
cmd << ' ' << imagePath surroundedByDoubleQuotes.
usePharoSettings ifFalse: [ cmd << ' --no-default-preferences End of statement list encountered ->' ] ].
basicCommand := self class launchInALoginShell
ifTrue: [ Smalltalk os isWindows
ifTrue: [ 'cmd /C ' , command ]
ifFalse: [ 'bash -l -c ''' , command , '''' ] ]
ifFalse: [ command ].
^ basicCommand utf8Encoded asString