XDM (简体中文)

From ArchWiki
Revision as of 05:44, 16 August 2012 by Fengchao (Talk | contribs) (Sync to English version.)

Jump to: navigation, search

Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary wiki Template:Article summary end

来自 XDM 手册页:

Xdm 能为本地和远程服务器提供一系列图形显示功能。xdm的设计满足图形显示的基本要求并遵循开放组织标准(XDMCPX Display Manager Control Protocol),即X显示管理协议。Xdm提供的功能与init, getty等以文本登录为主的程序相似:提供登录会话,获取用户名和密码,并将授权给予登录用户并提供工作会话。

XDM 提供了一个简单而又直观的图形登录界面。


安装 XDM:

# pacman -S xorg-xdm xorg-xconsole

更改 .xsession 为可执行文件:

$ chmod 744 .xsession

除此之外, 你可以为XDM安装Arch Linux 主题(可选):

# pacman -S xdm-archlinux

参看 Display Manager 以获取详细信息。


这里有些小贴士能让 XDM 变得美观些:

  • 安装 Quick Image Viewer:
# pacman -S qiv
  • 创建一个文件夹用于存放图片。 (例如 /root/backgrounds 或者 /usr/local/share/backgrounds)
  • 编辑 /etc/X11/xdm/Xsetup_0. 改变 xconsole 命令为:
 /usr/bin/qiv -zr /root/backgrounds/*
  • 编辑 /etc/X11/xdm/Xresources. 添加/替换 下面字段:
 xlogingreetFont:  -adobe-helvetica-bold-o-normal--20------iso8859-1
 xloginfont:       -adobe-helvetica-medium-r-normal--14------iso8859-1
 xloginpromptFont: -adobe-helvetica-bold-r-normal--14------iso8859-1
 xloginfailFont:   -adobe-helvetica-bold-r-normal--14------iso8859-1
 xlogin*frameWidth: 1
 xlogin*innerFramesWidth: 1
 xlogin*logoPadding: 0
 xlogin*geometry:    300x175-0-0


 #xlogin*logoFileName: /usr/X11R6/lib/X11/xdm/pixmaps/xorg.xpm
 #xlogin*logoFileName: /usr/X11R6/lib/X11/xdm/pixmaps/xorg-bw.xpm


  • 更新 /etc/pacman.conf 以确保所作的更改不会丢失:
 ~NoUpgrade   = etc/X11/xdm/Xsetup_0 etc/X11/xdm/Xresources


Multiple X sessions & Login in the window

With the Xdmcp enable, you can easily run multiple X sessions simultaneously on the same machine.

# X -query ip_xdmcp_server :2 

This will launch the second session, in window you need xorg-server-xephyr

# Xephyr -query this_machine_ip :2 


XDM loops back to itself after login

The current version of the xorg-xdm package, available in the Official Repositories is patched to register sessions with ConsoleKit by default. If ConsoleKit is not running, XDM will fail to succesfully launch an X session. D-Bus can be used invoke ConsoleKit when called upon by XDM.

Make sure that the dbus package, available in the Official Repositories is installed and then make sure dbus is included in the DAEMONS array in /etc/rc.conf.

Also, make sure that you are actually starting your window manager, for example with the command xmonad in ~/.xsession, and that ~/.xsession has the correct permissions of 774.

XDM does not update login records

The vanilla config of XDM calls /etc/X11/xdm/GiveConsolve for the startup of display :0, whereas otherwise it calls /etc/X11/xdm/Xstartup. Since only the latter contains a call to /usr/bin/sessreg, the login record /var/run/utmp is not updated for a login on display :0. As a consequence, the output of who does not necessarily list the user after login through XDM. This was already discussed in the bug report FS#26395.

As a simple fix, append the following line to /etc/X11/xdm/GiveConsole:

exec /usr/bin/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x /etc/X11/xdm/Xservers -l $DISPLAY -h "" $USER

This change also enables the getuser function presented in Acpid to work.