====== Сервис X терминалов ======
[[http://ru.wikipedia.org/wiki/XDM]]
[[http://www.linux.org.ru/books/HOWTO/XDM-Xterm.html]]
===== Установка компонентов сервера X терминалов =====
==== FreeBSD ====
[gate:~] # pkg_add -r xorg-libraries
[gate:~] # pkg_add -r xauth
[gate:~] # pkg_add -r xorg-fonts
[gate:~] # fetch http://koi8.pp.ru/dist/msttcorefonts.tgz
[gate:~] # cd /usr/local/lib/X11/fonts/
[gate:lib/X11/fonts] # tar -xvf ~/msttcorefonts.tgz
[gate:~] # pkg_add -r xeyes
==== Ubuntu ====
root@gate:~# apt-get install xauth x11-apps xfonts-base xfonts-75dpi xfonts-100dpi xfonts-cyrillic
===== Использование MS Windows в качестве X терминала (X сервера) =====
==== Устанавливаем ПО ====
[[http://sourceforge.net/projects/xming/]]
Xming
==== Запускаем X-сервер ====
Start->Run->c:\Progra~1\xming\xming.exe -ac
==== Запускаем приложение ====
$ xeyes -display 192.168.X.254:0.0
-C
$ DISPLAY=192.168.X.254:0.0
$ export DISPLAY
$ xeyes
-C
===== Использование ssh для подключения к серверу X терминалов =====
==== Настройка сервера X терминалов ====
SSH вместо XDM ([[Сервис SSH]])
==== Подключаем X терминал к серверу X терминалов ====
Start->Run->c:\Progra~1\xming\xming.exe
Start->Run->c:\Progra~1\putty\putty.exe -X user1@gate
$ echo $DISPLAY
localhost:10.0
$ opera
==== Использование свойства shell пользователя для автоматического запуска приложений ====
=== FreeBSD ===
[gate:~] # pkg_add -r firefox
[gate:~] # pkg_add -r firefox-i18n
[gate:~] # cat /etc/shells
...
/usr/local/bin/firefox
...
[gate:~] # pw usermod inetuser -s /usr/local/bin/firefox
=== Ubuntu ===
root@gate:~# apt-get install firefox
root@gate:~# cat /etc/shells
...
/usr/bin/firefox
root@gate:~# chsh inetuser
Changing the login shell for inetuser
Enter the new value, or press ENTER for the default
Login Shell [/bin/bash]: /usr/bin/firefox
===== Использование менеджера дисплеев для подключения к серверу X терминалов =====
==== Установка ПО ====
=== FreeBSD ===
[gate:~] # pkg_add -r xdm xterm sessreg xrdb
[gate:~] # pkg_add -r xfce4
[gate:~] # cd /usr/local/lib/X11/xdm/
=== Ubuntu ===
root@gate:~# apt-get install xdm
root@gate:~# apt-get install xfce4
root@gate:~# apt-get install xterm
root@gate:~# cd /etc/X11/xdm/
==== Настройка xdm ====
gate# cat xdm-config
...
!DisplayManager.requestPort: 0
gate# cat Xaccess
...
*
LISTEN intgate
gate# cat Xservers
...
#:0 local /usr/local/bin/X :0
#:0 local /usr/bin/X :0 vt7 -nolisten tcp
==== Настройка запуска оконного менеджера ====
gate# cat ~student/.xsession
/usr/local/bin/xfce4-session
==== Запуск xdm ====
gate# xdm -debug 1
=== FreeBSD ===
[gate:~] # grep xdm /etc/ttys
ttyv8 "/usr/local/bin/xdm -nodaemon" xterm on secure
[gate:~] # kill -1 1
=== Ubuntu ===
root@gate:~# /etc/init.d/xdm start
==== Подключаем X терминал к серверу X терминалов ====
Start->Run->c:\Progra~1\xming\xming.exe -query intgate
===== Управление оконными менеджерами в менеджере дисплеев =====
==== FreeBSD ====
gate# pkg_add -r xfce4
==== Ubuntu ====
gate# apt-get install xfce4 xfce4-terminal
==== FreeBSD/Ubuntu ====
gate# cat ~student/.xsession
/usr/local/bin/xfce4-session
===== Использование xlaunch для конфигурации X сервера Xming =====
==== Запуск в режиме NoClient с дополнительными параметрами русификации клавиатуры ====
C:\>notepad config.xlaunch
==== Запуск в режиме XDMCP ====
C:\>notepad config.xlaunch
===== Установка и настройка font сервера =====
==== FreeBSD ====
[gate:~] # pkg_add -r xfs
[gate:~] # cat /usr/local/etc/X11/fs/config
clone-self = on
use-syslog = off
catalogue = /usr/local/lib/X11/fonts/msttcorefonts/,/usr/local/lib/X11/fonts/cyrillic/,/usr/local/lib/X11/fonts/misc/,/usr/local/lib/X11/fonts/TTF/,/usr/local/lib/X11/fonts/Type1/,/usr/local/lib/X11/fonts/CID/,/usr/local/lib/X11/fonts/100dpi/,/usr/local/lib/X11/fonts/75dpi/
error-file = /var/log/xfs.log
default-point-size = 120
default-resolutions = 75,75,100,100
[gate:~] # /usr/local/etc/rc.d/xfs rcvar
xfs_enable=YES
==== Ubuntu ====
root@gate:~# apt-get install xfs
root@gate:~# cat /etc/X11/fs/config
...
#no-listen = tcp
# paths to search for fonts
catalogue = /usr/share/fonts/X11/cyrillic/,/usr/share/fonts/X11/misc/,/usr/share/fonts/X11/100dpi/,/usr/share/fonts/X11/75dpi/
...
Компонент Xming-fonts на windows клиенте можно деинсталлировать
C:\>notepad config.xlaunch