0
1

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 3 years have passed since last update.

MacからX11Forwardingを利用してLinux上のGUIアプリケーションを利用する方法

Last updated at Posted at 2021-08-17

IBM CloudのVPC環境およびClassic Infrastructure環境で確認。
OSはCentOS7。

OSバージョン
[root@myvpc ~]# cat /etc/redhat-release
CentOS Linux release 7.7.1908 (Core)

1. MacにXQuartzを導入。

2. Linux上の設定

sshd_configの確認(デフォルトのままで特に何もする必要はない)
[root@myvpc ~]# grep X11 /etc/ssh/sshd_config
X11Forwarding yes
# X11DisplayOffset 10
# X11UseLocalhost yes
#	X11Forwarding no
xauthの導入。およびテスト用GUIアプリとしてxeyesを導入。
[root@myvpc ~]# yum install -y xauth
[root@myvpc ~]# yum install -y xeyes

3. テスト

ssh接続時に"-X"オプションをつける
cccc@MacBook-Pro ~ % ssh -X vpcgen2
[root@myvpc ~]# echo $DISPLAY
localhost:10.0
[root@myvpc ~]# xeyes

これで、Mac上にxyesが起動してくる。
image.png

0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?