LoginSignup
1
0

More than 3 years have passed since last update.

ubuntu16.04 LTS remote-desktop (Windows10)

Last updated at Posted at 2020-03-11

Why

  • 構築メモ
  • 既存の記事でいろいろハマったので忘備録として

How

基本的は以下を参考にさせてもらいました。
変えたのはほんの少しだけ
Windows10からのRDP接続(ubuntu16.04 LTS)

デスクトップ環境セットアップ

$ sudo apt-get update&&upgrade

$ sudo apt-get -y install ubuntu-desktop

$ sudo reboot

xrdp

上記の筆者も書かれていますが、

apt-get使って最新のxrdpをインストールしたいところですが、
16.04の場合は古いバージョン(v0.61)がインストールされます。
ワタクシはLTSが使いたいのです!

記事に従って下準備のinstall
$ sudo apt-get install build-essential devscripts git autoconf libtool pkg-config gcc g++ make libssl-dev libpam0g-dev libjpeg-dev libx11-dev libxfixes-dev libxrandr-dev flex bison libxml2-dev intltool xsltproc xutils-dev python-libxml2 g++ xutils libfuse-dev libmp3lame-dev nasm libpixman-1-dev xserver-xorg-dev

以下にアクセスして入れるバージョンを確認
xrdp package in Ubuntu

記事にあったバージョンは0.9.4
今回入れたのは0.9.5

ver2.PNG

ダウンロード
$ sudo wget https://launchpad.net/ubuntu/+archive/primary/+files/xrdp_0.9.5.orig.tar.gz
$ sudo wget https://launchpad.net/ubuntu/+archive/primary/+files/xrdp_0.9.5.orig-xorgxrdp.tar.gz
適当なディレクトリで解凍
$ sudo tar -zxvf xrdp_0.9.5.orig.tar.gz
$ sudo tar -zxvf xrdp_0.9.5.orig-xorgxrdp.tar.gz
インストール
cd ~ 
cd xrdp-0.9.5
sudo ./bootstrap
sudo ./configure --enable-fuse
sudo make
sudo make install
sudo ln -s /usr/local/sbin/xrdp{,-sesman} /usr/sbin
cd ~
cd xorgxrdp-0.2.5
sudo ./bootstrap
sudo ./configure
sudo make
sudo make install

デスクトップ環境構築

後は記事と同じです

$ sudo apt-get install xfce4 xfce4-goodies

$ echo xfce4-session > ~/.xsession
$ sudo vi /etc/xrdp/startwm.sh

  # suse
  if [ -r /etc/X11/xdm/Xsession ]; then
    # since the following script run a user login shell,
    # do not execute the pseudo login shell scripts
#    . /etc/X11/xdm/Xsession 
        xfce4-session
    exit 0
  fi

/etc/X11/xdm/Xsession # コメントアウト
xfce4-session # 追加

$ systemctl restart xrdp
$ systemctl status xrdp

# Activeを確認
● xrdp.service - xrdp daemon
   Loaded: loaded (/lib/systemd/system/xrdp.service; disabled; vendor preset: enabled)
   Active: active (running) since 水 2020-03-11 14:47:39 JST; 46min ago

リモデができます

After

CentOS7でもリモデ環境を構築していたので、Ubuntuでもサクッといけるだろうと思っていたのが
思っていたよりハマりました。「ubuntu16.04 リモデ」でググってみても同じように皆さんハマっていて、
かつ解決できていないパターンも見かけました。

ubyntu18.04なら結構楽にできそうな感じっぽいので、今度試してみようかと。
AWS上のインスタンスにリモデするパターンもやっておきたい。

追記


AWS EC2インスタンス(Ubuntu16.04)のGPUインスタンスタイプにて、
機械学習における学習モデル構築のためのサーバを立てました。

リージョン:東京
OS:Ubuntu16.04LTS
タイプ:p2.xlarge

スポットインスタンスを利用して、
0.45$/hほどで使えました。

インスタンスの容量が足りなくなった

オフィシャルを参考に
https://aws.amazon.com/jp/premiumsupport/knowledge-center/extend-linux-file-system/

環境構築途中でインスタンスのボリュームサイズがショートしたので、追加で増量(増量はできるが、減量はできない)

image.png

機械学習用環境構築後、リモデができなくなった

0.9.x バージョンの時の対処例
https://diary.app.ssig33.com/280

これでリモデ復活した

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