CentOS Stream 8: GNOMEデスクトップ環境にXRDPで接続する

30日 7月 2021

XRDPをインストールして、GNOMEデスクトップ環境にXRDPで接続する手順を記載します。

1 GNOMEのインストール

Workstationグループをインストールします。

#!/bin/sh -esudo dnf groupinstall -y –nobest Workstationsudo reboot

2 XRDPのインストール

  • EPELリポジトリを有効にしてxrdpパッケージをインストールします。
  • XRDP環境だとspice-vdagentdとgeoclueがAVCにアクセス拒否されるので(アクセス拒否のダイアログが何回も出続ける)、SELinuxにルールを追加してアクセスを許可します。

#!/bin/sh -e# Enable EPEL repository.sudo dnf install -y epel-release# Install xrdp.sudo dnf install -y xrdp xorgxrdpsudo systemctl enable xrdpsudo systemctl start xrdp# Open 3389/tcp.sudo firewall-cmd –add-port=3389/tcp –permanentsudo firewall-cmd –reload# Define SELinux rules and allow it.cat <<EOF > xrdp.temodule xrdp 1.0;require { type vdagent_t; type geoclue_t; type unconfined_service_t; class dir search; class file { open read getattr };}allow vdagent_t unconfined_service_t:dir search;allow vdagent_t unconfined_service_t:file { open read getattr };allow geoclue_t unconfined_service_t:dir search;allow geoclue_t unconfined_service_t:file { open read getattr };EOFsudo checkmodule -M -m -o xrdp.mod xrdp.tesudo semodule_package -m xrdp.mod -o xrdp.ppsudo semodule -i xrdp.ppsudo rm xrdp.te xrdp.pp xrdp.mod

3 GNOMEデスクトップ環境にXRDPで接続する

セッションタイプはXorgで接続します。 Windowsのリモートデスクトップ接続で接続すると以下のようになります。

0001_xrdp-gnome.png

]]> tagPlaceholderカテゴリ: xrdp, ja, gnome, centos-8

Android | Linux | SDL - Narrow Escape