3
0

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 1 year has passed since last update.

WindowsからUbuntu22.04へのリモートデスクトップ:セカンドモニターが原因で接続できない問題の解決

Posted at

はじめに

Ubuntu22.04(デスクトップ版)にリモートデスクトップ接続を試みた。しかし、セカンドモニターを接続したWindowsPCからだと、リモートデスクトップの接続に失敗する問題が発生した。なお、セカンドモニターを使用しない場合は正常に接続できた。

解決策

GSettingsの値を変更して、リモートデスクトップ接続したWindowsPCがサブモニターとして認識されるようにした。具体的には、org.gnome.desktop.remote-desktop.rdpのscreen-share-modeを変更した。

前提条件

screen-share-modeの設定値が反映されるのは、Wayland環境だけだそう。Xorg環境では正常に機能しない。(参考: https://blog.be-dama.com/2022/11/30/ubuntu-22-04_sub-display/)

Wayland環境かどうかの確認方法:
echo $XDG_SESSION_TYPE

上記コマンドを実行し、"wayland"が表示されることを確認。
waylandでなければ、ログイン画面に戻って、右下の歯車から"Ubuntu"を選択して、ログインする。

設定値の確認

まず、現在の設定値を確認する。

gsettings get org.gnome.desktop.remote-desktop.rdp screen-share-mode

上記のコマンドを実行すると、"mirror-primary"という設定が表示された。

設定値の変更

次に、以下のコマンドで設定値を変更する。

gsettings set org.gnome.desktop.remote-desktop.rdp screen-share-mode extend

これにより、"extend"モードが選択され、サブモニターを有効にする。

無事に解決

rdp.png

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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?