Difference between revisions of "XDM"

From ArchWiki
Jump to: navigation, search
(Installation)
(XDM loops back to itself after login)
(11 intermediate revisions by 8 users not shown)
Line 1: Line 1:
 
[[Category:Display managers]]
 
[[Category:Display managers]]
{{i18n|XDM}}
+
[[cs:XDM]]
 +
[[pt:XDM]]
 +
[[ru:XDM]]
 +
[[zh-CN:XDM]]
 
{{Article summary start}}
 
{{Article summary start}}
 
{{Article summary text|XDM is the X Display Manager.}}
 
{{Article summary text|XDM is the X Display Manager.}}
Line 17: Line 20:
 
Install {{Pkg|xorg-xdm}}, available in the [[Official Repositories]].
 
Install {{Pkg|xorg-xdm}}, available in the [[Official Repositories]].
  
 +
Use default launch script '''~/.xsession'''
 
Make the {{ic|~/.xsession}} file executable.
 
Make the {{ic|~/.xsession}} file executable.
  $ chmod 744 .xsession
+
  $ cp /etc/skel/.xsession /etc/skel/.xinitrc ~ # use default launch script
{{note|You do not need ~/.xsession if you use ~/.xinitrc}}
+
Or use a simple line (assume your favorite window manager is 'openbox')
Alternatively XDM can use the {{ic|~/.xinitrc}} file.
+
$ echo exec openbox > ~/.xsession 
If you do not already have the ~/.xinitrc file you can copy the default by executing:
+
$ chmod 744 ~/.xsession
{{bc|cp /etc/skel/.xinitrc ~/}}
+
 
Be sure to edit the ~/.xinitrc file to include your specific Desktop Environment / Window Manager by placing the appropriate line at the bottom of ~/.xinitrc. For the i3 window manager this line would look like:
+
{{bc|exec /usr/bin/i3}}
+
To make the graphical login the default method of logging into the system, edit your {{ic|/etc/inittab}} file (recommended) by adding or uncommenting this line:
+
{{bc|x:5:respawn:/usr/bin/xdm -nodaemon}}
+
As well as changing the default init level from 3 (Multi-user) to 5 (X11) by modifying the first settings line of {{ic|/etc/inittab}}
+
{{bc|id:3:initdefault}}
+
Change the 3 to a 5
+
{{bc|id:5:initdefault:}}
+
 
If you would also like to use an Arch Linux theme for XDM, you can optionally install the {{Pkg|xdm-archlinux}} package, also available in the Official Repositories.
 
If you would also like to use an Arch Linux theme for XDM, you can optionally install the {{Pkg|xdm-archlinux}} package, also available in the Official Repositories.
  
Line 85: Line 81:
 
Make sure that the {{pkg|dbus}} package, available in the [[Official Repositories]] is [[pacman|installed]] and then make sure {{ic|dbus}} is included in the {{ic|[[Daemon#Starting_on_Boot|DAEMONS]]}} array in {{ic|/etc/[[rc.conf]]}}.
 
Make sure that the {{pkg|dbus}} package, available in the [[Official Repositories]] is [[pacman|installed]] and then make sure {{ic|dbus}} is included in the {{ic|[[Daemon#Starting_on_Boot|DAEMONS]]}} array in {{ic|/etc/[[rc.conf]]}}.
  
Also, make sure that you are actually starting your window manager, for example with the command {{ic|xmonad}} in {{ic|~/.xsession}}.
+
When using pure systemd with logind, instead of consolekit which is now deprecated, systemd will start dbus automatically.  To use xdm use {{bc|# systemctl enable xdm.service}} or {{bc|# systemctl enable xdm-archlinux.service}}
  
 +
Also, make sure that you are actually starting your window manager, for example with the command {{ic|xmonad}} in {{ic|~/.xsession}}, and that {{ic|~/.xsession}} has the correct permissions of {{ic|774}}.
  
 
===XDM does not update login records===
 
===XDM does not update login records===

Revision as of 17:26, 11 November 2012

Summary help replacing me
XDM is the X Display Manager.
Related
Display Manager

From XDM manual page:

Xdm manages a collection of X displays, which may be on the local host or remote servers. The design of xdm was guided by the needs of X terminals as well as The Open Group standard XDMCP, the X Display Manager Control Protocol. Xdm provides services similar to those provided by init, getty and login on character terminals: prompting for login name and password, authenticating the user, and running a "session."

XDM provides a simple and straightforward graphical login prompt.

Installation

Install xorg-xdm, available in the Official Repositories.

Use default launch script ~/.xsession Make the ~/.xsession file executable.

$ cp /etc/skel/.xsession /etc/skel/.xinitrc ~  # use default launch script

Or use a simple line (assume your favorite window manager is 'openbox')

$ echo exec openbox > ~/.xsession  
$ chmod 744 ~/.xsession

If you would also like to use an Arch Linux theme for XDM, you can optionally install the xdm-archlinux package, also available in the Official Repositories.

See Display Manager for additional information.

Background wallpaper

Here are some tips to make XDM look nicer:

  • Install the Quick Image Viewer:
# pacman -S qiv
  • Make a directory to store background images. (e.g. /root/backgrounds or /usr/local/share/backgrounds)
  • Place your images in the directory. If you do not have any try [1] for starters.
  • Edit /etc/X11/xdm/Xsetup_0. Change the xconsole command to:
 /usr/bin/qiv -zr /root/backgrounds/*
  • Edit /etc/X11/xdm/Xresources. Add/replace the following defines:
 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

Comment out the logo defines:

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

For the exact meaning of the definitions, see the man page of xdm.

  • Update /etc/pacman.conf so the changes do not get erased:
 ~NoUpgrade   = etc/X11/xdm/Xsetup_0 etc/X11/xdm/Xresources

The changes will now give you a random wallpaper image and move the login prompt to the bottom-right edge of the screen.

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 

Troubleshooting

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.

When using pure systemd with logind, instead of consolekit which is now deprecated, systemd will start dbus automatically. To use xdm use
# systemctl enable xdm.service
or
# systemctl enable xdm-archlinux.service

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.