2013-05-04 06:02:20 +0000 2013-05-04 06:02:20 +0000
16
16
Advertisement

PuTTYとXmingを使ってWindowsでX11 Forwardingを動作させるにはどうすればいいですか?

Advertisement

X11 Forwarding を PuTTY で動作させたいとずっと思っていましたが、私が使用している X Window System は Xming です。Xming を起動していて、サーバへの新しい接続を確立すると、コマンドの後に以下のようなメッセージが表示されます。

$ firefox
PuTTY X11 proxy: wrong authentication protocol attemptedPuTTY X11 proxy: wrong authentication protocol attemptedError: cannot open display: localhost:10.168

$ google-chrome
PuTTY X11 proxy: wrong authentication protocol attempted
(google-chrome:7083): Gtk-WARNING **: cannot open display: localhost:10.168

$ gedit
PuTTY X11 proxy: wrong authentication protocol attempted
**(gedit:6990): WARNING**: Could not open X display
PuTTY X11 proxy: wrong authentication protocol attemptedCannot open display:
Run 'gedit --help' to see a full list of available command line options.

$ gnome-system-monitor
PuTTY X11 proxy: wrong authentication protocol attempted
**(gnome-system-monitor:7024): WARNING**: Could not open X display
PuTTY X11 proxy: wrong authentication protocol attempted
(gnome-system-monitor:7024): Gtk-WARNING **: cannot open display: localhost:10.168

これらのエラーを修正して、X11 Forwardingが全体として動作するようにするにはどうしたらいいですか?

Advertisement
Advertisement

回答 (2)

16
16
16
2015-06-01 13:27:12 +0000

私は2つの問題を抱えていて、この質問は私の問題に最も近い問題を持っていたので、私の解決策が私と同じ問題を解決しようとしている他の人に役立つだろうと思いました。私のシステムにはCygwin/X (xinit 1.3.4-5)とPuTTY (0.64)があります。ローカルのstartxbinに–listen tcpの両方を設定し、.Xauthorityへのパスをputtyに渡すことでなんとか解決しました。

まず、「PuTTY X11 proxy: cannot to connect to forwarded X server. ネットワークエラーです。Connection refused」エラーの件ですが、Xセッションに接続をリッスンさせる必要があります。cygwinターミナルを開き、/usr/bin/startxwinを編集して、次の行を見つけてください。

defaultserverargs="-multiwindow"

に変更してください。

defaultserverargs="-multiwindow -listen tcp"

次に、"Authorization required, but no authorization protocol specified “というエラーに対応して、puttyに正しいxauthトークンを使わせる必要があります(puttyの内部で何か変なことが起こっているようで、ローカルでxauth listを渡しても転送された接続で使えるトークンが与えられないので、xauth add <token>で渡しても転送された接続で使えるトークンが与えられません。)
(cygwin ターミナルで再度)

cd ~
explorer .

0x1&

.Xauthority ファイルのプロパティをチェックアウトして、そのファイルの場所をメモしておきます (選択して CTRL+C を押してクリップボードに入れます)。

上の例のようにPuTTYを起動( http://www.math.umn.edu/systems_guide/putty_xwin32.html からコピー)

「Options controlling SSH X11 forwarding」のページで、「Enable X11 forwarding」にチェックを入れ、プロトコルとして「MIT-Magic-Cookie-1」を設定しておく。
‘X authority file for local display’ フィールドで、Browse をクリックし、Location to the .Xauthority file を使って、先ほどメモした .Xauthority ファイルを探します。開く]をクリックしてフィールドを入力し、[セッション]に戻って(PuTTY設定で)セッションを保存します。その後、Openをクリックします。

これで接続できるようになるはずです。

9
9
9
2013-05-06 18:23:38 +0000

コピー元: http://www.math.umn.edu/systems_guide/putty_xwin32. html

Puttyの設定

  • Unixホスト名の追加
  • プロトコルをSSHに切り替える
  • 保存されたセッションにセッション名を入力
  • ‘Save'をクリック

  • 'Category'リストから'SSH'タブを展開
  • 'SSH'リストから'X11'を選択
  • Check 'Enable X11 Forwarding’

  • Choose ‘Session’ from ‘Category’ list
  • Click ‘Save’

Starting the X Server on the Windows

Configuring Xming

“All Programs > Xming Xming Xming” を実行するだけで、PuTTY が設定されていれば動作するはずです。

接続

  • Xming を起動
  • Putty を起動
  • 保存したセッションをダブルクリック

  • 要求されたユーザ名とパスワードを入力
  • これでローカルデスクトップ上のホストから X アプリケーションを実行できるようになるはずです

EDIT. wrong authentication protocol attempted エラーを修正するには、/etc/ssh/sshd_config ファイルで “ForwardX11Trusted yes” を有効にしてから OpenSSH サーバを再起動してください。

Advertisement

関連する質問

16
7
4
3
5
Advertisement
Advertisement