LoginSignup
0
1

ubuntu24.04 に google chromeを インストールする

Last updated at Posted at 2024-05-07

ubuntu24.04 に google chromeを インストールする

XRDP が なぜか うまくいかないので chrome リモートデスクトップ をつかってみようという話

chrome をインストールする。

debパッケージを ダウンロードして aptコマンドで(または dpkgコマンド) で インストールする流れだ。
firefoxを 起動して chrome を 検索して ダウンロードしてもいいけど URLが わかってるなら
このほうが 手っ取り早い

wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
sudo apt install ./google-chrome-stable_current_amd64.deb

teto@antlers:~$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
--2024-05-08 08:24:01--  https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
dl.google.com (dl.google.com) をDNSに問いあわせています... 172.217.175.14, 2404:6800:4004:81c::200e
dl.google.com (dl.google.com)|172.217.175.14|:443 に接続しています... 接続しました。
HTTP による接続要求を送信しました、応答を待っています... 200 OK
長さ: 106971656 (102M) [application/x-debian-package]
‘google-chrome-stable_current_amd64.deb’ に保存中

google-chrome-stabl 100%[===================>] 102.02M  60.6MB/s    in 1.7s

2024-05-08 08:24:03 (60.6 MB/s) - ‘google-chrome-stable_current_amd64.deb’ へ 保存完了 [106971656/106971656]

teto@antlers:~$ sudo apt install ./google-chrome-stable_current_amd64.deb
[sudo] teto のパスワード:
パッケージリストを読み込んでいます... 完了
依存関係ツリーを作成しています... 完了
状態情報を読み取っています... 完了
注意、'./google-chrome-stable_current_amd64.deb' の代わりに 'google-chrome-stable' を選択します
以下のパッケージが新たにインストールされます:
  google-chrome-stable
アップグレード: 0 個、新規インストール: 1 個、削除: 0 個、保留: 5 個。
107 MB 中 0 B のアーカイブを取得する必要があります。
この操作後に追加で 343 MB のディスク容量が消費されます。
取得:1 /home/teto/google-chrome-stable_current_amd64.deb google-chrome-stable amd64 124.0.6367.155-1 [107 MB]
以前に未選択のパッケージ google-chrome-stable を選択しています。
(データベースを読み込んでいます ... 現在 152326 個のファイルとディレクトリがインストールされています。)
.../google-chrome-stable_current_amd64.deb を展開する準備をしています ...
google-chrome-stable (124.0.6367.155-1) を展開しています...
google-chrome-stable (124.0.6367.155-1) を設定しています ...
update-alternatives: /usr/bin/x-www-browser (x-www-browser) を提供するために自動モードで /usr/bin/google-chrome-stable を使います
update-alternatives: /usr/bin/gnome-www-browser (gnome-www-browser) を提供するために自動モードで /usr/bin/google-chrome-stable を使います
update-alternatives: /usr/bin/google-chrome (google-chrome) を提供するために自動モードで /usr/bin/google-chrome-stable を使います
gnome-menus (3.36.0-1.1ubuntu3) のトリガを処理しています ...
man-db (2.12.0-4build2) のトリガを処理しています ...
desktop-file-utils (0.27-2build1) のトリガを処理しています ...
N: ファイル '/home/teto/google-chrome-stable_current_amd64.deb' がユーザ '_apt' からアクセスできないため、ダウンロードは root でサンドボックスを通さずに行われます。 - pkgAcquire::Run (13: 許可がありません)

ansible playbook に するのも 簡単だ

起動して chromeリモートデスクトップ を 設定して… となるはずだが 時間切れ

chrome リモートデスクトップ を 設定する。

まずは パッケージを インストールする。

wget https://dl.google.com/linux/direct/chrome-remote-desktop_current_amd64.deb
sudo apt install ./chrome-remote-desktop_current_amd64.deb

別の端末(windowsなど)の リモートデスクトップの画面にある sshで 設定するから

debian linux 用を コピペして

実行した ログは ↓
途中で pin番号 を 入力
sudo するようで パスワードを 求められた。


teto@antlers:~$ DISPLAY= /opt/google/chrome-remote-desktop/start-host --code="4/0AdLIrYf6DeUV9zLXcqjdY5QCHN_InwKGeyptBaZlcslb_tYPl8e6mDtpR4B1qqgTyOVYg" --redirect-url="https://remotedesktop.google.com/_/oauthredirect" --name=$(hostname)
[0508/194158.561642:ERROR:host_config.cc(83)] Failed to read /home/teto/.config/chrome-remote-desktop/host#30bcf1207738a7e1218e9cc426e228b0.json
[0508/194158.561723:ERROR:usage_stats_consent_linux.cc(31)] No host config file found.
Enter a PIN of at least six digits:
Enter the same PIN again:
[0508/194234.337357:ERROR:host_config.cc(83)] Failed to read /home/teto/.config/chrome-remote-desktop/host#30bcf1207738a7e1218e9cc426e228b0.json
[sudo] teto のパスワード:
[0508/194249.866625:INFO:daemon_controller_delegate_linux.cc(98)] /opt/google/chrome-remote-desktop/chrome-remote-desktop:2526: SyntaxWarning: invalid escape sequence '\s'
  re.split('\s+', os.environ[HOST_EXTRA_PARAMS_ENV_VAR].strip())
Created symlink /etc/systemd/system/multi-user.target.wants/chrome-remote-desktop@teto.service → /usr/lib/systemd/system/chrome-remote-desktop@.service.

Host started successfully.

リモートホストに 新しいホストが 登録されたので 選択して

さっき入力した pin を 入力して接続
image.png

image.png

ここで default を 選択したら 画面が 真っ黒に・・・・orz

設定消す方法は?← いまここ

おしいところまできたんだけどなぁ

で、後日(次の日)

先人の知恵を 借りてみたんだけど

ubuntu22.04 だと chromeリモートデスクトップで 接続できた。

ubuntu24.04でも vmのコンソールは ログアウトして リモート接続してみたら 選択画面がでて Ubuntu Xorg を 選択することが できた。

しかし 画面は 真っ黒だ。

今日は ここまで

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