Lazy Diary @ Hatena Blog

PowerShell / Java / miscellaneous things about software development, Tips & Gochas. CC BY-SA 4.0/Apache License 2.0

リモートの X アプリケーションが起動できない (1)

エラーの種類をチェック。

$ ssh remote.example.com /usr/X11R6/bin/kterm -display local.example.com:0
username@remote.example.com's password: 
/usr/X11R6/bin/kterm Xt error: Can't open display: local.example.com:0
  • リモート側の DISPLAY 環境変数か、あるいは -display 引数に続くホスト名とディスプレイ名が指定されているか、指定されていれば正しいかどうか確認する
  • リモート側の /etc/ssh/sshd_config で X11Forwarding yes が指定してあるか確認する
  • ローカルの /etc/X11/xinit/xserverrc で X(7) の引数に -nolisten tcp が指定されていたら外して X を再起動