Set XDM

zhaozj2021-02-16  47

Set xdm saturday, september 01, 2001 by ron hume translation: fenng fdh@163.net 2001.12.23

XDM provides a useful way to manage X tasks, convenient and flexible. ~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Have you ever visited your workstation desktop environment? How to access your desktop on one server? This is exactly what I need to solve recently. I am responsible for installing and managing a group of Linux servers. After several times for different reasons (binding services, keyboard code, etc.) I have to go to the laboratory to access the graphics terminal, I found that I really need to find a solution allows me to access the X of the different servers through my workstation. Desktop environment.

Some people may think that standard X tools used to handle remote tasks are enough to solve my problem - just like this: ------------------------- --------- Telnet Host1 Export Display = Mywkstn: 0 gnome-session (or other task manager) --------------------- -------------

However, the solution I want to find is to provide more than these basic features. Regarding certification, session management, etc. has some corresponding defects, and some X-timing mechanisms are required. For example, when using a remote client, I often forget to enter XHOST HOST1 When I explain the XHOST authentication plan for a Linux newbie, I often see him confused. Since there is no need to teach developers about X's basics in a development project, I am looking for a solution to meet all of these requirements. Need more easily, more automation, easier for Linux's development newbies.

There are two solutions that make me manage X sessions easier. The first is the X Display Manager (X Display Manager) or XDM, and another popular solution is VNC. I chose XDM instead of VNC for two reasons. First, VNC must have a server's daemon, run for each shared desktop. Second, I already have the software of the X server installed on all workstations and don't want to add additional client software. Other options are KDM and GDM, which are part of the KDE and GNOME packages, respectively.

X The base x is a graphics support system in most UNIX systems. If you use Gnome or KDE on your Linux machine, you are using the X system. It is defined and maintained by the X Alliance (www.x.org). Most Linux users are used by the X WINDOW system provided by the XFree86 project (www.xfree86.org). XDM is a display manager that provides a flexible task management. However, XDM is usually considered "GUI's landing screen, you can start my X task", we will see that it is more powerful.

In the world of X, the terms "customer" and "server" may have some confesice. Clearly, the X server controls the application of the keyboard, mouse, and display resources. The client is also an application, which is a manufacturing request, from the server to run its own behavior (such as displaying a window with a specific character). This is a little difference between the workstation we think as the client running.

XDM communicates with the X server using X Display Management Control Protocol, XDMCP, and X servers of the X Alliance. It allows X servers to get session services from the server running an XDM service. There are 3 categories of requests can be sent by the X server:

Direct - Requests the specified host directly displays a landing screen. Broadcast - to broadcast a message on all hosts on the network, the first answer provides this login service. Indirect (indirect) - Contact a host that runs xdm and asks if you know which host can communicate. The XDM server can implement a list of servers that can manage X sessions. X Server occasionally ends direct communication with the host selected to get the login process service. One initial reason for XDM is to allow management X terminals. These devices are basically the display, keyboard, and mouse and embedded X server software; all smarts are on the server. XDM is used to "push" login screens and manage sessions of these devices. These things are very popular for several years, as accessing the UNIX workstation is limited. If a user wants to access the graphics workstation, if it is enough to be lucky enough to have a set of equipment. Later, these devices have become a bit outdated and gradually running the PC Linux and other Unices (Solaris x86, XBSD, ETC.) of the X server software or Windows (running hummingbird exceed or similar software) instead.

When using XDM to manage these X tasks, some fertility is placed. At first glance, this may happen: If you set XDM (in order to use XDMCP, you didn't see the local X server boot (IE, when the XDM starts, the console enters graphic mode), or if you In XDM, the local display is prohibited and used using StartX, which does not allow you to access the selector. The settings described here allow for any XDMCP client to access the Linux server desktop environment (of course, affecting X security). It also describes a method that sets the XDM to get the desktop on the local and other servers.

XDM also brings problems with security and access control, but this is beyond the scope of this article. XDM should use only in a controlled environment. In addition, access port 177 should lock on all firewalls. If you are interested in X's security issues. The following man page is a good start:

XDM (1), Xauth (1), XSecurity (7), LBXProxy (1) - LOW BANDWIDTH X Proxy, XFWP (1) - X FireWall Proxy, and (1) SSHD (8), especially about X11 port Forward parts.

Setting up the setting of XDM XDM is a bit difficult; the following is to achieve a particular purpose.

On my Red Hat 7 system, XDM is in / etc / x11 / xdm. Its main setting file is XDM-Config (see list 1): ----------------------------------- --------------- List 1: XDM-Config ----------------------------- ------------------------------------------------- ----------------------------------- DisplayManager.errorLogfile: / var / log / xdm-errors displaymanager. Pidfile: / var / Run / XDM-PID DisplayManager.KeyFile: / etc / x11 / xdm / xdm-keys DisplayManager.servers: / etc / x11 / xdm / xservers displayManager.accessFile: / etc / x11 / xdm / xaccess displayManager. willing: su nobody -c / etc / X11 / xdm / Xwilling DisplayManager * resources: / etc / X11 / xdm / Xresources DisplayManager * session: / etc / X11 / xdm / Xsession DisplayManager * authComplain:! false Comment out this line if you Want to manage! x Terminals with xdm! security: this means we will be listening on! Port 177 for xdmcp choser requests. # DisplayManager.Requestport: 0 ------------------ ---------------------------------------------- xdm The profile is the format of X Resources. These resources are used to set the location of different files. We are interested in the files specified by Servers, as well as AccessFile and Resources. The loved person will be interested in session and DisplayManager._x.setup, where x is the display number.

Note DisplayManager.RequestPort: 0 is commented. It specifies which UDP port is used to listen to XDMCP requests. If set to 0 (its default), XDMCP's request is ignored, and XDM only manages local display (see xservers file). We commented it so that XDM will monitor the default port (USP port 177).

My XServers file is roughly as follows: ------------------------------ #: 0 local / usr / x11r6 / bin / x - ----------------------------- If this line is not commented, I will get one when I started XDM. Graphical login screen. That is, it will start the command / usr / x11r6 / bin / x to start and manage a local X server on the display (DIAPLAY) 0. What we have to do is to choose the host we have to connect. We have implemented this using the Xaccess file:

------------------------------------------ # any indirect host You can get an option * Chooser Broadcast # # If you want to set a collection of hosts visible to each terminal # 注释 掉 行 # (and note the top of the Chooser line) # 还 编%% %t 行 # #% hostlist host- A host-b # * chooser% hostlist # ---------------------------------------------------------------------------------------------------------------- --- Although Xaccess is a very flexible tool, we will use it to start the selector (indirect mode). The selector is a small X application that displays a list of available hosts on the network, allowing us to select one of the desired. I like to use the Broadcast option because the new host can be automatically displayed in the list. Some people may like to name a host, as shown above, using% HostList macro. When this method is, especially in a large network, it is necessary to broadcast the host where all the desired hosts are broadcast. If you are interested in better control hierarchy, you can use the server's list instead of Broadcast, which will allow you to specify a list of available hosts directly.

If you want to set up the XDM processing from different ways to set up a request. You can specify the host name or a list of hosts to replace *. As of the example below.

The following rows tell XDM to handle all requests from Host-A, Host-B or Host-C:

----------------------------------------- Host-A Host-B Host-C -----------------------------------------

To let XDM send indirect requests from Host-A to Server-a or Server-B, enter:

----------------------------------------- Host-a Server-a Server-B -----------------------------------------

Can also be written

-----------------------------------------% HostList Server-a Server-b Host -a% hostlist ---------------------------------------------------------------------------------------------------------------

You can set the XDM Use the selector to process the indirect request (our preferred method). In our next example, Host -a gets a selection window including a list of hosts including all response broadcasts, but others can only get the list specified by HostList:

-----------------------------------------% HostList Server-a Server-b Host -A Chooser Broadcast * chooser% hostlist. -------------------------------------------------------------------------------------------------------------------------------------------------

Finally, to complete the basic features, we can look at the XResources file. My settings are silently recognized, but some people may want to customize its appearance. In this file you can change color, fonts, and other types of options. I found that Chooser * Geometry resources are most useful because it allows you to set the size of the selection window. You can also set some interactive management functions in XDM-Config, like DisplayManager.ErrorLogFileLogfile, set the location of the log file. This Log file contains the standard error output of XDM, Xsetup, XStartup, Xsession, and XRest scripts. After the above login process is complete, XDM starts the script file specified in Session Resource. It allows customization of X sessions. The administrator may most want to check the XSession script. Users will want to generate a $ home / .xSession or a $ home / .xclients file to customize the session manager's behavior (i.e., start a window manager, a clock, etc.)

Test our settings To test our settings, we have to find X (you can use the Which x command). On my system, the location is / usr / x11r6 / bin / x.

Test direct mode:

----------------------------------------- / usr / x11r6 / bin / x - Query remote XDM host ---------------------------------------------------------

Indirect mode input:

----------------------------------------- / usr / x11r6 / bin / x - Broadcast -----------------------------------------

If you are using an indirect mode with a selector, enter:

----------------------------------------- / usr / x11r6 / bin / x - Indirect remote XDM host -----------------------------

Once these are normal, I can generate the /etc/rc.d/init.d script to start and stop the XDM service. Look at the article "Manage Init Script" with ChkConfig (published in LINUX Magazine April 2001), you can get more information. Then I generated the following script to facilitate my users. On their workstation, I generated a script called /usr/bin/x11/startx.xdmcp. If the host is called `` wkstn1 '', then this file is like this:

---------------------------------------- #! / bin / sh / usr / X11R6 / bin / x -indirect wkstn1 ---------------------------------------

The host name is the name of the XDM server (in my workstation here is both xdm server and X Server)

Next, I entered:

-------------------------------------------------- - MV / USR / BIN / X11 / STARTX /USR/BIN/X11/startx.original chmod 755 /usr/bin/x11/startx.xdmcp ln -s /usr/bin/x11/startx.xdmcp / usr / bin / X11 / STARTX --------------------------------------------------- ---- This allows those users who want to log in into their workstation to enter StartX to get a user of a graphic console, get a list of available hosts to log in (including their own workstation)

Conclusion Review, we set up the servers and workstations on the network using XDM, indirect mode XDMCP and selectors to allow users to choose X sessions they want to manage. This is an easy-to-manage solution that allows the perfect control of the X session (the translator: some exaggerated), it is easy to use. Provide a menu for users to manage their X sessions.

If you need this access from a platform like Windows, and you don't want to buy a X server on your workstation, you will be a good choice for you, VNC is a good choice.

After the finishing: This translation document is released, now in order to put it in the uniform and put it on 9CBS to make a backup, huh, huh

转载请注明原文地址:https://www.9cbs.com/read-27599.html

New Post(0)