#author("2024-12-28T17:55:07+00:00","default:sysosa","sysosa") #author("2024-12-28T17:55:28+00:00","default:sysosa","sysosa") XDMCP(X Display Manager Control Protocol) UDP ポートの 177 を使います. 古い仕様だけど結構便利. コンソールのGUI画面をリモート先に持ってくる. XDMCPは、Xming内のxlaunch、MobaXtermにそのクライアント機能が入っている. ここでは各種OSでXDMCPの設定を施して使ってみる. ***RockyLinux8でXDMXPを有効にしてみる [#v925afdf] OSインストールで「Server with GUI」が選んでいれば、「/etc/gdm/custom.conf」の追記と gdm の再起動、あとfirewallを調整すれば行ける. #code(nonumber){{ [root@rockylinux8 ~]# vi /etc/gdm/custom.conf : [xdmcp] Enable=true MaxSessions=30 DisplaysPerHost=30 [root@rockylinux8 ~]# [root@rockylinux8 ~]# systemctl restart gdm.service [root@rockylinux8 ~]# firewall-cmd --add-service=xdmcp --zone=public --permanent [root@rockylinux8 ~]# firewall-cmd --reload }} これで MpbaXterm で接続すると下記のように「&color(red){Authentication is Requeired};」と言われる. &size(10){XmingのXlaunch接続でも同様に言われる}; &ref(2024y12m28d_213618653.png,nolink,70%); カラープロファイルを作る必要があるようで、そのためのアクセス権限が必要ってな感じ. その権限を不要にする修正を施して回避させる 下記のように2つのファイルを作ります #code(nonumber){{ [root@rockylinux8 ~]# vi /etc/polkit-1/localauthority/50-local.d/colord.pkla [Remove colord dialogs in remote session] Identity=unix-user:* Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;(*** 注意:意図的に改行してます.下記の行を連結してください****) org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile;org.debian.pcsc-lite.access_pcsc;org.freedesktop.packagekit.system-sources-refresh ResultAny=no ResultInactive=no ResultActive=yes [root@rockylinux8 ~]# vi /etc/polkit-1/localauthority/50-local.d/repos.pkla [Allow Package Management all Users] Identity=unix-user:* Action=org.freedesktop.packagekit.system-sources-refresh ResultAny=yes ResultInactive=yes ResultActive=yes [root@rockylinux8 ~]# }} その後に所有権らを変更して、polkitを再起動します #code(nonumber){{ [root@rockylinux8 ~]# chmod 644 /etc/polkit-1/localauthority/50-local.d/colord.pkla [root@rockylinux8 ~]# chmod 644 /etc/polkit-1/localauthority/50-local.d/repos.pkla [root@rockylinux8 ~]# chown root:root /etc/polkit-1/localauthority/50-local.d/colord.pkla [root@rockylinux8 ~]# chown root:root /etc/polkit-1/localauthority/50-local.d/repos.pkla [root@rockylinux8 ~]# systemctl restart polkit.service }} これで「&color(red){Authentication is Requeired};」は表示されなくなります ***gdmでなくlightdmにして、かつXfceディスクトップ環境で。 [#t7fd97a0] #code(nonumber){{ [root@rockylinux8 ~]# systemctl disable gdm.service [root@rockylinux8 ~]# dnf --enablerepo=epel install lightdm [root@rockylinux8 ~]# vi /etc/lightdm/lightdm.conf : [XDMCPServer] enabled=true : [root@rockylinux8 ~]# dnf groupinstall Xfce [root@rockylinux8 ~]# firewall-cmd --add-service=xdmcp --zone=public --permanent [root@rockylinux8 ~]# firewall-cmd --reload [root@rockylinux8 ~]# reboot }} lightdm/Xfce構成なら「&color(red){Authentication is Requeired};」は表示されない ただ、このままではGNOMEディスクトップ環境も選べてしまう. これを「xfce session」しか選べないようにしてみる. &ref(2024y12m29d_015911126.png,nolink,70%); 一応「/etc/lightdm/lightdm.conf」で「user-session=xfce」とすればそれが既定値になる. その他の選択肢を消すには「/usr/share/xsessions/」と「/usr/share/wayland-sessions/」の「*.desktop」を改名する #code(nonumber){{ [root@rockylinux8 ~]# cd /usr/share/xsessions/ [root@rockylinux8 xsessions]# mv com.redhat.KioskWithKeyboard.desktop com.redhat.KioskWithKeyboard.desktop_ [root@rockylinux8 xsessions]# mv gnome-classic.desktop gnome-classic.desktop_ [root@rockylinux8 xsessions]# mv gnome-custom-session.desktop gnome-custom-session.desktop_ [root@rockylinux8 xsessions]# mv gnome.desktop gnome.desktop_ [root@rockylinux8 xsessions]# mv gnome-xorg.desktop gnome-xorg.desktop_ [root@rockylinux8 xsessions]# mv xinit-compat.desktop xinit-compat.desktop_ [root@rockylinux8 xsessions]# cd /usr/share/wayland-sessions/ [root@rockylinux8 wayland-sessions]# [root@rockylinux8 wayland-sessions]# mv gnome-classic-wayland.desktop gnome-classic-wayland.desktop_ [root@rockylinux8 wayland-sessions]# mv gnome.desktop gnome.desktop_ [root@rockylinux8 wayland-sessions]# mv gnome-wayland.desktop gnome-wayland.desktop_ }} こうすると選択肢は「Xfce」のみになる &ref(2024y12m29d_021512605.png,nolink); ***ユーザ選択をリストアップさせない [#l1f871a9] セキュリティー的な意味合いもありますが、ユーザを一覧させずにユーザ名もinputさせるには「/etc/lightdm/lightdm.conf」で #code(nonumber){{ [Seat:*] : greeter-hide-users=true : }} と「greeter-hide-users」を有効にします. GNOMEではdconfを弄る....&size(10){windowsのレジストリっぽいもの...}; #code(nonumber){{ [root@rockylinux8 ~]# vi /etc/dconf/db/gdm.d/01-custom-gdm-settings [org/gnome/login-screen] disable-user-list=true [root@rockylinux8 ~]# dconf update [root@rockylinux8 ~]# systemctl restart gdm }} っでこうなる. &ref(2024y12m29d_025503216.png,nolink); ***xlaunch [#v78dac08] 有償版 Xlaunch 7.7.0.72 を使ってます. 設定欄の「Additional parameters for Xming」には「-screen 0 1024x768 -xkblayout jp -xkbmodel jp」を入れてます. ***MobaXterm [#vc180912] 無償版 MobaXterm v23.0 を使ってます. ***ubuntu20.04 [#j8de1969] #code(nonumber){{ root@ubuntu:~# grep "VERSION=" /etc/os-release VERSION="20.04.5 LTS (Focal Fossa)" root@ubuntu:~# cat /proc/driver/nvidia/version NVRM version: NVIDIA UNIX x86_64 Kernel Module 525.89.02 Wed Feb 1 23:23:25 UTC 2023 GCC version: gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1) root@ubuntu:~# vi /etc/gdm3/custom.conf : [xdmcp] Enable=true : root@ubuntu:~# systemctl restart gdm.service }} この設定ではMobaXtermでもXmingでもだめみたい. #code(nonumber){{ root@ubuntu:~# apt install lightdm -y <--- 途中「Default display manager:」と問われるが「lightdm」を選択 root@ubuntu:~# vi /etc/lightdm/lightdm.conf [LightDM] start-default-seat=false [XDMCPServer] enabled=true root@ubuntu:~# systemctl disable gdm root@ubuntu:~# systemctl stop gdm root@ubuntu:~# systemctl enable lightdm root@ubuntu:~# systemctl start lightdm root@ubuntu:~# apt install firewalld root@ubuntu:~# firewall-cmd --add-service=xdmcp --zone=public --permanent root@ubuntu:~# firewall-cmd --reload }} この設定で一応 Xming でも MobaXterm でも使えた