21
27

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

cygwin/x で Windows を X 端末として使う

Last updated at Posted at 2016-04-12

(2018/04/16)追記
現在は本家の下記手順のみで動作するようです。
https://x.cygwin.com/docs/ug/using-remote-apps.html
追記終わり

Windows 7 pro に cygwin/x をインストールして、Linux の GUI アプリを Windows 上で使えるようにします。
今回利用した Windows7 は 64bit 版です。

セットアップ

  1. まずは cygwin をダウンロードします。
    下記 URL から setup-x86_64.exe をダウンロードします。
    https://www.cygwin.com/
    今回ダウンロードした cygwin DLL のバージョンは 2.5.0 でした。

  2. setup-x86_64 を実行します。
    最低限必要なパッケージは以下です。

    • xorg-server
    • xinit
    • openssh
  3. インストール直後の状態だとうまく動かないので、以下を編集します。

    • XWin Server のショートカットのリンク先
      (変更後)
      C:¥cygwin64¥bin¥run.exe --quote /usr/bin/bash.exe -l -c "cd; /usr/bin/Xwin.exe :0 -multiwindow -listen tcp"

    • 環境変数 DISPLAY の設定

      /etc/skel/.bashrc

if [ -n "{$DISPLAY}" ]; then
export DISPLAY='localhost:0.0
fi


以上でセットアップは完了です。

# 使用方法 #

1. XWin Server と Cygwin64 Terminal を起動します。

2. Cygwin64 Terminal で Linux サーバへ ssh 接続します。
X 転送に -Y オプションを使用します。
例) $ ssh -Y user@host

3. X アプリを起動します。
例) [user@host~]$ gimp

アプリが起動すれば OK です。
21
27
2

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
21
27

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?