Difference between revisions of "XDM"

From ArchWiki
Jump to: navigation, search
m (format)
m (Removing the logo: update)
 
(35 intermediate revisions by 17 users not shown)
Line 1: Line 1:
 
[[Category:Display managers]]
 
[[Category:Display managers]]
 
[[cs:XDM]]
 
[[cs:XDM]]
 +
[[ja:XDM]]
 
[[pt:XDM]]
 
[[pt:XDM]]
 
[[ru:XDM]]
 
[[ru:XDM]]
 
[[zh-CN:XDM]]
 
[[zh-CN:XDM]]
{{Article summary start}}
+
{{Related articles start}}
{{Article summary text|XDM is the X Display Manager.}}
+
{{Related|Display manager}}
{{Article summary heading|Related}}
+
{{Related articles end}}
{{Article summary wiki|Display Manager}}
+
{{Article summary end}}
+
 
+
 
From [http://www.xfree86.org/current/xdm.1.html XDM manual page]:
 
From [http://www.xfree86.org/current/xdm.1.html XDM manual page]:
  
Line 18: Line 16:
 
== Installation ==
 
== Installation ==
  
[[pacman|Install]] {{Pkg|xorg-xdm}}, available in the [[official repositories]].
+
[[Install]] the {{Pkg|xorg-xdm}} package. Then [[enable]] {{ic|xdm.service}}.
  
Use default launch script {{ic|~/.xsession}}.
+
If you would like to use an Arch Linux theme for XDM, you can optionally install the {{Pkg|xdm-archlinux}} package. If installing the latter package, then do '''not''' enable {{ic|xdm.service}}, but instead enable {{ic|xdm-archlinux.service}}.
Make the {{ic|~/.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
+
  
Without these modifications XDM will execute the {{ic|xinitrc}} from {{ic|/etc/X11/xinit/xinitrc}} (See [[Xorg#Running]] for details).
+
== Configuration ==
  
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.
+
=== Defining the session ===
  
See [[Display Manager]] for additional information.
+
Unlike many more modern [[display manager]]s such as [[GDM]] or [[LightDM]], XDM does not source available sessions from .desktop files located in the {{ic|/usr/share/xsessions}} directory. As such, XDM does not have a 'session menu.' Instead, XDM will execute the {{ic|.xinitrc}} file in the home directory. See [[Xinitrc#Configuration]] for details.
  
== Background wallpaper ==
+
Ensure that the {{ic|.xinitrc}} file in your home directory is executable. To do this use the following command:
  
Here are some tips to make [[XDM]] look nicer:
+
$ chmod 700 ~/.xinitrc
 +
 
 +
=== Theming ===
 +
 
 +
For the exact meanings of the options discussed below, see the manual page of xdm. The configuration file is located in {{ic|/etc/X11/xdm/Xresources}}, notice that if you installed {{Pkg|xdm-archlinux}} the configuration file will instead be located in {{ic|/etc/X11/archlinux/xdm/Xresources}}.
 +
 
 +
==== Background wallpaper ====
 +
 
 +
You can use a program such as {{Pkg|qiv}} to set the background in XDM:
  
 
* Install {{Pkg|qiv}}
 
* Install {{Pkg|qiv}}
Line 41: Line 42:
 
* Make a directory to store background images, e.g. {{ic|/root/backgrounds}} or {{ic|/usr/local/share/backgrounds}}
 
* Make a directory to store background images, e.g. {{ic|/root/backgrounds}} or {{ic|/usr/local/share/backgrounds}}
  
* Place your images in the directory. If you do not have any try [http://www.digitalblasphemy.com/] for starters
+
* Place your images in the directory.  
  
 
* Edit {{ic|/etc/X11/xdm/Xsetup_0}}. Change the {{ic|xconsole}} command to:
 
* Edit {{ic|/etc/X11/xdm/Xsetup_0}}. Change the {{ic|xconsole}} command to:
 
   /usr/bin/qiv -zr /root/backgrounds/*
 
   /usr/bin/qiv -zr /root/backgrounds/*
 +
 +
==== Font ====
  
 
* Edit {{ic|/etc/X11/xdm/Xresources}}. Add/replace the following defines:
 
* Edit {{ic|/etc/X11/xdm/Xresources}}. Add/replace the following defines:
Line 51: Line 54:
 
   xlogin'''promptFont: -adobe-helvetica-bold-r-normal--14-'''-'''-'''-'''-'''-iso8859-1
 
   xlogin'''promptFont: -adobe-helvetica-bold-r-normal--14-'''-'''-'''-'''-'''-iso8859-1
 
   xlogin'''failFont:  -adobe-helvetica-bold-r-normal--14-'''-'''-'''-'''-'''-iso8859-1
 
   xlogin'''failFont:  -adobe-helvetica-bold-r-normal--14-'''-'''-'''-'''-'''-iso8859-1
 +
 +
==== Login dialog positioning ====
 +
 +
This configuration will move the login dialog to the bottom right of the screen.
 +
 
   xlogin*frameWidth: 1
 
   xlogin*frameWidth: 1
 
   xlogin*innerFramesWidth: 1
 
   xlogin*innerFramesWidth: 1
 
   xlogin*logoPadding: 0
 
   xlogin*logoPadding: 0
 
   xlogin*geometry:    300x175-0-0
 
   xlogin*geometry:    300x175-0-0
 +
 +
==== Removing the logo ====
 
Comment out the logo defines:
 
Comment out the logo defines:
   #xlogin*logoFileName: /usr/X11R6/lib/X11/xdm/pixmaps/xorg.xpm
+
   #xlogin*logoFileName: /usr/share/xdm/pixmaps/xorg.xpm
   #xlogin*logoFileName: /usr/X11R6/lib/X11/xdm/pixmaps/xorg-bw.xpm
+
   #xlogin*logoFileName: /usr/share/xdm/pixmaps/xorg-bw.xpm
  
For the exact meaning of the definitions, see the man page of xdm
+
=== Multiple X sessions & Login in the window ===
 
+
* Update {{ic|/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.
 
With the [[Xdmcp]] enable, you can easily run multiple X sessions simultaneously on the same machine.
Line 74: Line 77:
 
  # Xephyr -query this_machine_ip :2
 
  # Xephyr -query this_machine_ip :2
  
== Troubleshooting ==
+
=== Passwordless login ===
 
+
=== XDM loops back to itself after login ===
+
 
+
The current version of the {{Pkg|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 {{Pkg|dbus}} package, available in the official repositories is installed.
+
 
+
When using pure systemd with logind, instead of consolekit which is now deprecated, systemd will start dbus automatically.  To launch 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 {{ic|xmonad}} in {{ic|~/.xsession}}, and that {{ic|~/.xsession}} has the correct permissions of {{ic|774}}. This file is installed by {{Pkg|xorg-xinit}}.
+
 
+
=== XDM does not update login records ===
+
 
+
The vanilla config of XDM calls {{ic|/etc/X11/xdm/GiveConsole}} for the startup of display :0, whereas otherwise it calls {{ic|/etc/X11/xdm/Xstartup}}. Since only the latter contains a call to {{ic|/usr/bin/sessreg}}, the login record {{ic|/var/run/utmp}} is not updated for a login on display :0. As a consequence, the output of {{ic|who}} does not necessarily list the user after login through XDM. This was already discussed in the bug report [https://bugs.archlinux.org/task/26395 FS#26395].
+
 
+
As a simple fix, append the following line to {{ic|/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 {{ic|getuser}} function presented in [[Acpid#Getting_user_name_of_the_current_display|Acpid]] to work.
+
In order to enable passwordless login for XDM, add the line below to {{ic|/etc/X11/xdm/Xresources}}:
 +
xlogin*allowNullPasswd: true

Latest revision as of 14:29, 17 November 2016

Related articles

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 the xorg-xdm package. Then enable xdm.service.

If you would like to use an Arch Linux theme for XDM, you can optionally install the xdm-archlinux package. If installing the latter package, then do not enable xdm.service, but instead enable xdm-archlinux.service.

Configuration

Defining the session

Unlike many more modern display managers such as GDM or LightDM, XDM does not source available sessions from .desktop files located in the /usr/share/xsessions directory. As such, XDM does not have a 'session menu.' Instead, XDM will execute the .xinitrc file in the home directory. See Xinitrc#Configuration for details.

Ensure that the .xinitrc file in your home directory is executable. To do this use the following command:

$ chmod 700 ~/.xinitrc

Theming

For the exact meanings of the options discussed below, see the manual page of xdm. The configuration file is located in /etc/X11/xdm/Xresources, notice that if you installed xdm-archlinux the configuration file will instead be located in /etc/X11/archlinux/xdm/Xresources.

Background wallpaper

You can use a program such as qiv to set the background in XDM:

  • Make a directory to store background images, e.g. /root/backgrounds or /usr/local/share/backgrounds
  • Place your images in the directory.
  • Edit /etc/X11/xdm/Xsetup_0. Change the xconsole command to:
 /usr/bin/qiv -zr /root/backgrounds/*

Font

  • 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

Login dialog positioning

This configuration will move the login dialog to the bottom right of the screen.

 xlogin*frameWidth: 1
 xlogin*innerFramesWidth: 1
 xlogin*logoPadding: 0
 xlogin*geometry:    300x175-0-0

Comment out the logo defines:

 #xlogin*logoFileName: /usr/share/xdm/pixmaps/xorg.xpm
 #xlogin*logoFileName: /usr/share/xdm/pixmaps/xorg-bw.xpm

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

Passwordless login

In order to enable passwordless login for XDM, add the line below to /etc/X11/xdm/Xresources:

xlogin*allowNullPasswd: true