I run Debian Jessie on my laptop, without Desktop Enviroment. (just awesomeWM as windowmanager)

I played with xdm in the past, but at the time decided that I didn't like it. Now, when I install it, xdm restarts right after login. Output of tail /var/log/xdm.log:

➜  ~  tail /var/log/xdm.log 
(==) Log file: "/var/log/Xorg.0.log", Time: Mon May 30 17:44:11 2016
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
Mon May 30 17:44:13 2016 xdm info (pid 6734): sourcing /etc/X11/xdm/Xsetup
Mon May 30 17:44:14 2016 xdm info (pid 6734): sourcing /etc/X11/xdm/Xstartup
Mon May 30 17:44:14 2016 xdm info (pid 6746): executing session /etc/X11/xdm/Xsession
/etc/X11/xdm/Xsession: 17: /etc/X11/Xsession: fold: not found
Mon May 30 17:44:14 2016 xdm info (pid 6734): sourcing /etc/X11/xdm/Xreset
Mon May 30 17:44:14 2016 xdm info (pid 6720): Starting X server on :0
Mon May 30 17:44:16 2016 xdm info (pid 6758): sourcing /etc/X11/xdm/Xsetup
(II) AIGLX: Suspending AIGLX clients for VT switch

I tried creating a test user and login with that, same results, so the problem is system wide. X11 functions when just calling 'startx' from the virtual console.

Any advice how to solve this?

  • It might be started by systemd, though I dont know how. – meuh May 30 '16 at 18:04

Looks like your xdm configuration files contain same leftover from your earlier experiments, which fail to run now. I recommend purging the xdm package (for example via aptitude purge xdm) and installing it again.


I got the same problem and then I found out the default XDM tried to start xsm - which is not installed on the system. As I logged with user myuser, then the error was in /home/myuser/.xsession-errors

So you should add a ~/.xsession to home dir of which user you are logging in, add write below line to it



exec /usr/local/bin/i3

When you log in, xdm runs /etc/X11/xdm/Xsession. On line 17 of that file, there is a command called fold that cannot be executed. When the Xsession script ends, for any reason, xdm considers the session as finished and re-displays the login screen.

The command fold refers to /usr/bin/fold, which is part of the coreutils package, which is one of the essential system packages and really should not be removed. It's just a command for wrapping text to a specified line length.

Verify that /usr/bin/fold still exists and is usable. If that does not seem to be the problem, make a copy of /etc/X11/xdm/Xsession, temporarily replace the original with the copy, and add


as the first non-comment line of the script. If that makes a difference, then your X session default PATH settings may be faulty. Replace the modified Xsession script with the original after testing.

If I recall correctly, xdm initially sets a very rudimentary PATH, which gets added on or replaced by /etc/profile when a shell is started for executing /etc/X11/xdm/Xsession. If you've made customizations to /etc/profile or your personal ~/.profile that impact the PATH of non-interactive shell sessions, they might be causing your difficulties.


I think I get the same problem with xdm on NetBSD last year.

Unable to start the session, always come back to xdm.

What I find on man xdm


          authorize  is a boolean resource which controls whether xdm gen-
          erates and uses authorization for the local server  connections.
          If  authorization  is  used, authName is a list of authorization
          mechanisms to use, separated by white space.  XDMCP  connections
          dynamically  specify  which  authorization  mechanisms  are sup-
          ported, so authName is ignored in this case.  When authorize  is
          set  for  a display and authorization is not available, the user
          is informed by having a different message displayed in the login
          widget.   By default, authorize is ``true,''  authName is ``MIT-
          MAGIC-COOKIE-1,''  or,  if  XDM-AUTHORIZATION-1  is   available,

So, I add this line in xdm-config

DisplayManager.*.authName: MIT-MAGIC-COOKIE-1

And the problem go away.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.