Cadence のインストーラー (installScape) を sudo で起動しようとすると,X11 に繋がらないと怒られる.
- % sudo /usr/cadence/iscape.04.23-s012/bin/iscape.sh [~]
- Initializing InstallScape using JVM at /usr/cadence/iscape.04.23-s012/runtime/LNX86/bin/java. This might take some time...
- X11 connection rejected because of wrong authentication.
- Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using 'localhost:19.0' as the value of the DISPLAY variable.
- at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
- ...
- Failed with InstallScape JVM.
- Now loading System JVM...
- X11 connection rejected because of wrong authentication.
- Exception in thread "main" java.awt.AWTError: Can't connect to X11 window server using 'localhost:19.0' as the value of the DISPLAY variable.
- at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
- ...
- Error:
- /bin/java
- Could not use JVM packaged with Installcape. The Java in your path did not work or could not find Java in your path. Ensure that Java 1.6 or later is in your PATH environment variable and restart InstallScape.
sudo で X11 を有効にするためには,xauth を用いてユーザーの X サーバ接続権限情報を sudo に与えてしまう.ユーザー名が [user] だとすると以下のような感じ.
/root/.Xauthorityが無いと怒られる場合は空のファイルを作ってから再実行.
- % sudo xauth add $(xauth -f ~[user]/.Xauthority list|tail -1)
- xauth: file /root/.Xauthority does not exist
- % sudo echo " " > /root/.Xauthority
- % sudo xauth add $(xauth -f ~[user]/.Xauthority list|tail -1)
まあ,オチとしては,installScape は root で実行するものではないという事なのですけどね.インストール先のパーミッションを適当な管理者にしてユーザー権限でインストールすべし.