XDMCP
古い仕様だけど結構便利.
「ssh -X」でXアプリが表示されるけどうまく表示されない時がある. その代替案の一つ. コンソールのGUI画面を丸ごと持ってくる.
xrdpも代替手段の範疇かな
XDMCPとしては、Xming内のxlaunch、MobaXtermにその機能が入っている.
ここでは各種OSでXDMCPの設定を施して、xlaunchとMobaXtermで利用できるか調べてみた.
xlaunch †
有償版 Xlaunch 7.7.0.72 を使ってます.
設定欄の「Additional parameters for Xming」には「-screen 0 1024x768 -xkblayout jp -xkbmodel jp」を入れてます.
MobaXterm †
無償版 MobaXterm v23.0 を使ってます.
RHEL7系/8系/9系 †
nvidiaのA2000が搭載されて nvidiaドライバーがロードされている環境です.
「/etc/gdm/custom.conf」を修正します
# GDM configuration storage
[daemon]
# Uncomment the line below to force the login screen to use Xorg
#WaylandEnable=false
[security]
[xdmcp]
Enable=true
MaxSessions=30
DisplaysPerHost=30
[chooser]
[debug]
# Uncomment the line below to turn on debugging
#Enable=true
その後にこの設定を反映させます
systemctl restart gdm.service
あとfirewallが機能していれば、そこに穴をあけます
firewall-cmd --add-service=xdmcp --zone=public --permanent
firewall-cmd --reload
これで XLaunch、MobaXterm の両方使えます.
*注意: CentOS7では XLaunch の「AIGLX」(Accelerated OpenGL with WGL)を有効にすると画面がでない.
ubuntu20.04 †
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でもだめみたい.
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 でも使えた
Authentication Requeired... †
「Authentication is requeired to create a color managed ...」と言われることがある.
その際は「/etc/polkit-1/localauthority/50-local.d/45-allow-colord.pkla」に下記を書く
[Allow Colord all Users]
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
ResultAny=no
ResultInactive=no
ResultActive=yes