Open3

GCPのVMインスタンスに Ubuntu22.04 から Chrome Remote Desktop を使用して接続する

PINTOPINTO
  • VM インスタンスへの Chrome リモート デスクトップのインストール
sudo apt update
curl -L -o chrome-remote-desktop_current_amd64.deb \
    https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo DEBIAN_FRONTEND=noninteractive \
    apt-get install --assume-yes ./chrome-remote-desktop_current_amd64.deb
  • X Windows System デスクトップ環境のインストール
sudo DEBIAN_FRONTEND=noninteractive \
    apt install --assume-yes xfce4 desktop-base dbus-x11 xscreensaver

sudo bash -c 'echo "exec /etc/X11/Xsession /usr/bin/xfce4-session" > /etc/chrome-remote-desktop-session'

sudo systemctl disable lightdm.service

curl -L -o google-chrome-stable_current_amd64.deb \
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install --assume-yes ./google-chrome-stable_current_amd64.deb
PINTOPINTO
  • sshでローカルPCからVMインスタンスに接続する
  • ローカルPCのブラウザで https://remotedesktop.google.com/headless にアクセスする
  • [別のパソコンを設定] ページで、[開始] をクリックする
  • [承認] をクリックする
  • コマンドラインをコピーする
  • VMインスタンス側のコンソールで、コピーしたコマンドを実行する
  • プロンプトが表示されたら、6 桁の PIN を入力する
    Enter a PIN of at least six digits: 
    Enter the same PIN again:
    
  • ローカルPC側のブラウザで https://remotedesktop.google.com/access/ にアクセスしてリモート接続を開始する