LoginSignup
0
0

More than 5 years have passed since last update.

Deep learning AMIのUbuntu 16.04.6 LTSにデスクトップ環境を構築してMacから繋ぐ

Last updated at Posted at 2019-05-03

はじめに

基本的に、AWS EC2上のUbuntu16.04にデスクトップ環境を構築してMacからつなぐと同じですが、
2019/05/03現在、同様のプロセスでいくつか躓いたので、情報共有です。

やりたいこと

  • AWSのDeep learning AMIUbuntu 16.04.6LTSにデスクトップ環境を構築してMacから繋ぐこと
  • Deep Learning AMI (Ubuntu) Version 22.0:ami-06868a6ddab784c28

うまくいかなかった点

  1. その1
$ sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config

とすると、

sudo: unable to resolve host ip-●●●-●●-●-●●●

となってしまった。解決するためには、

$ sudo sh -c 'echo ●●●.●●.●.●●● $(hostname) >> /etc/hosts'

とすればよい。ただし、ip-●●●-●●-●-●●●ではなく、●●●.●●.●.●●●とすることに注意です。

ご参考:
- https://tech.librastudio.co.jp/index.php/2017/03/09/post-1322/
- https://qiita.com/ogomr/items/89e19829eb8cc08fcebb
- https://stackoverflow.com/questions/33441873/aws-error-sudo-unable-to-resolve-host-ip-10-0-xx-xx/33443018

  1. その2
$ sudo apt install xrdp xfce4 xfce4-goodies tightvncserver

とすると、

E: Could not get lock /var/lib/dpkg/lock-frontend - open (11: Resource temporarily unavailable)
E: Unable to acquire the dpkg frontend lock (/var/lib/dpkg/lock-frontend), is another process using it?

となってしまった。解決するためには、

$ sudo killall apt apt-get

とすれば良い。詳細は参考リンクをご確認ください。

ご参考:
- https://askubuntu.com/questions/1109982/e-could-not-get-lock-var-lib-dpkg-lock-frontend-open-11-resource-temporari

まとめ

以上をまとめると、AWS EC2上のUbuntu16.04にデスクトップ環境を構築してMacからつなぐで紹介されているプロセス
に2行だけ追記して、上から実行していくだけ。素晴らしい記事を書いていただいてありがとうございます、、、!

sudo apt update && sudo apt upgrade

sudo sh -c 'echo ●●●.●●.●.●●● $(hostname) >> /etc/hosts'

sudo sed -i 's/^PasswordAuthentication no/PasswordAuthentication yes/' /etc/ssh/sshd_config

sudo /etc/init.d/ssh restart

sudo passwd ubuntu

sudo killall apt apt-get
sudo apt install xrdp xfce4 xfce4-goodies tightvncserver

echo xfce4-session> /home/ubuntu/.xsession

sudo cp /home/ubuntu/.xsession /etc/skel

sudo sed -i '0,/-1/s//ask-1/' /etc/xrdp/xrdp.ini

sudo service xrdp restart

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