LoginSignup
46
47

More than 5 years have passed since last update.

MacにサーバーのGUIアプリを表示する

Last updated at Posted at 2014-05-26

Mac初期化するとxserverに繋がらない!なんてことになったので記録.

  • OSX 10.9.3

xquartz導入

最近のOSXにはX11がデフォルトで入っていないそうです.
homebrew-caskで

brew update
brew cask install xquartz

DISPLAY環境変数を設定

xquartzをインストールすればxtermからsshでxserverに接続出来ました.

でもterminalやitermからだと上手くいかない...
xtermのenvとterminalのenvを比べてみると, 環境変数DISPLAYが足りないようだったので

export DISPLAY=:0.0

としました.

(追記)XQuartzをインストールして再起動したところ, itermでDISPLAY環境変数が正しく設定されていました.
*環境変数は不要のようです. *

接続

open /Applications/Utilities/XQuartz.app
# ~/.Xauthorityを作成してくれます
ssh -Y ユーザ名@ホスト

xeyesが表示されればOK

ついでにマウスクリックが使えるように
X11 > X11 Preferences > Windows > Click-through Inactive Windows
をenableとしました.

46
47
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
46
47