デスクトップ環境 : GNOME リモートデスクトップ2025/10/24 |
|
GNOME リモートデスクトップサービスを設定して、クライアントコンピューターからリモート接続できるようにします。 |
|
| [1] | GNOME デスクトップ インストール済みの場合は依存関係ですでにインストールされていますが、未インストールの場合は以下のようにしてインストールします。 |
|
dlp:~ # zypper -n install gnome-remote-desktop
|
| [2] | Firewalld を有効にしている場合は、RDP サービスの許可が必要です。 |
|
dlp:~ # firewall-cmd --add-service=rdp success dlp:~ # firewall-cmd --runtime-to-permanent success |
| [3] |
各ユーザー自身でリモートデスクトップを有効にする場合は、デスクトップにログインして以下のように設定します。
[設定] - [システム] - [リモートデスクトップ] を開くと以下の画面になります。 ログインユーザーとパスワードは、RDP 接続用のユーザー名とパスワードを設定します。 |
|
| [4] | クライアントコンピューターからの接続です。Windows 11 を例にします。 リモートデスクトップ接続を起動して接続すると、ユーザー名とパスワードの入力画面になります。 ここで、[3] で設定したユーザー名とパスワードを入力します。 |
|
| [5] | 認証に成功すると、リモートデスクトップの画面が表示されます。 |
|
| [6] | root 権限でリモートデスクトップを有効にする場合は以下のように設定します。 この場合、リモートデスクトップサービスに接続するユーザー名とパスワードは共通で、接続後に通常のログイン画面が表示され、各ユーザーは自身の OS ユーザー名とパスワードでログインします。 |
|
# 証明書作成 dlp:~ # mkdir -p /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop dlp:~ # cd /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop dlp:/var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop # openssl req -new -x509 -nodes -newkey ec:<(openssl ecparam -name secp384r1) -keyout tls.key -out tls.crt -days 3650 ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [XX]:JP State or Province Name (full name) []:Hiroshima Locality Name (eg, city) [Default City]:Hiroshima Organization Name (eg, company) [Default Company Ltd]:GTS Organizational Unit Name (eg, section) []:Server World Common Name (eg, your name or your server's hostname) []:dlp.srv.world Email Address []:root@srv.world
dlp:/var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop #
chown -R gnome-remote-desktop:gnome-remote-desktop /var/lib/gnome-remote-desktop/.local dlp:/var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop # # RDP を有効にする # [Init TPM credentials ***] メッセージは問題ない # TPM デバイスを搭載していない古いコンピューターでは表示される dlp:~ # grdctl --system rdp set-tls-key /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.key Init TPM credentials failed because No TPM device found, using GKeyFile as fallback. dlp:~ # grdctl --system rdp set-tls-cert /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.crt dlp:~ # grdctl --system rdp set-credentials Username: rdpuser # 任意の RDP 接続ユーザー名を設定 Password: # RDP 接続ユーザーのパスワードdlp:~ # grdctl --system rdp enable dlp:~ # grdctl --system status
Init TPM credentials failed because No TPM device found, using GKeyFile as fallback.
Overall:
Unit status: active
RDP:
Status: enabled
Port: 3389
TLS certificate: /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.crt
TLS fingerprint: db:58:99:7c:75:27:7c:d8:76:73:04:8c:07:55:69:87:76:8e:51:dc:ee:ae:af:a0:29:84:80:e2:66:c8:f4:c0
TLS key: /var/lib/gnome-remote-desktop/.local/share/gnome-remote-desktop/tls.key
Username: (hidden)
Password: (hidden)
dlp:~ # systemctl daemon-reload dlp:~ # systemctl start gnome-remote-desktop dlp:~ # systemctl disable --now pcscd.service pcscd.socket # * pcscd (PC/SC Smart Card Daemon) が起動していると接続の度に管理者認証を求められるため停止
|
| [7] | クライアントコンピューターからの接続です。Windows 11 を例にします。 リモートデスクトップ接続を起動して接続すると、ユーザー名とパスワードの入力画面になります。 ここで、[6] で設定した RDP 接続ユーザーとパスワードを入力します。 |
|
| [8] | リモートデスクトップ接続に成功すると、ログイン画面が表示されます。 ここで、自身の OS ユーザーでログインします。ログイン後は通常のリモートデスクトップ操作と同じです。 |
|
|
| Sponsored Link |
|
|