LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices


Reply
  Search this Thread
Old 08-31-2012, 08:15 AM   #1
Izmo
LQ Newbie
 
Registered: May 2005
Posts: 3

Rep: Reputation: 0
xdm fails to start X


Hi,

I'm using xfce, and I'm trying to get xdm to do the login, but upon entering a valid username and password it just goes back to the login screen.

The error in /var/log/xdm.log:
Code:
xdm info (pid 1404): sourcing /usr/lib/X11/xdm/GiveConsole
xdm info (pid 1439): executing session /usr/lib/X11/xdm/Xsession
xdm info (pid 1404): sourcing /usr/lib/X11/xdm/TakeConsole
XIO:  fatal IO error 11 (Resource temporarily unavailable) on X server ":0"
      after 104 requests (73 known processed) with 0 events remaining.
xdm info (pid 1392): Starting X server on :0
Error dropping master: -1
7 XSELINUXs still allocated at reset
SCREEN: 0 objects of 144 bytes = 0 total bytes 0 private allocs
DEVICE: 0 objects of 68 bytes = 0 total bytes 0 private allocs
CLIENT: 0 objects of 116 bytes = 0 total bytes 0 private allocs
WINDOW: 0 objects of 28 bytes = 0 total bytes 0 private allocs
PIXMAP: 4 objects of 80 bytes = 320 total bytes 0 private allocs
GC: 0 objects of 64 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 8 bytes = 0 total bytes 0 private allocs
TOTAL: 4 objects, 320 bytes, 0 allocs
1 SELECTIONs still allocated at reset
WINDOW: 0 objects of 28 bytes = 0 total bytes 0 private allocs
PIXMAP: 4 objects of 80 bytes = 320 total bytes 0 private allocs
GC: 0 objects of 64 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 8 bytes = 0 total bytes 0 private allocs
TOTAL: 4 objects, 320 bytes, 0 allocs
4 PIXMAPs still allocated at reset
PIXMAP: 4 objects of 80 bytes = 320 total bytes 0 private allocs
GC: 0 objects of 64 bytes = 0 total bytes 0 private allocs
CURSOR: 0 objects of 8 bytes = 0 total bytes 0 private allocs
CURSOR_BITS: 0 objects of 8 bytes = 0 total bytes 0 private allocs
TOTAL: 4 objects, 320 bytes, 0 allocs
2 PICTUREs still allocated at reset
TOTAL: 0 objects, 0 bytes, 0 allocs
The XKEYBOARD keymap compiler (xkbcomp) reports:
> Warning:          Type "ONE_LEVEL" has 1 levels, but <RALT> has 2 symbols
>                   Ignoring extra symbols
Errors from xkbcomp are not fatal to the X server
xdm info (pid 1453): sourcing /usr/lib/X11/xdm/Xsetup_0
The problem appears to be that it tries to start a new X session, and fails because it tries to put it in the same display (i.e. 0) as itself.

ps -elf | grep xdm
Code:
4 S root      1392     1  0  80   0 -  1131 ?      15:42 ?        00:00:00 /usr/bin/xdm -nodaemon
4 S root      1398  1392  0  80   0 -  6344 ?      15:42 tty7     00:00:00 /usr/bin/X :0 -auth /var/lib/xdm/authdir/authfiles/A:0-2EhFVl
cat /tmp/.X0-lock
Code:
      1398
Using Ctrl-Alt-F1 to get a shell prompt, and logging in works. Here running the command xinit -- /usr/bin/startxfce4 results in an error:
Code:
/usr/bin/startxfce4: Starting X server


Fatal server error:
Server is already active for display 0
        If this server is no longer running, remove /tmp/.X0-lock
        and start again.


Please consult the The X.Org Foundation support 
         at http://wiki.x.org
 for help. 

No protocol specified

waiting for X server to begin accepting connections No protocol specified
xinit: giving up
xinit: unable to connect to X server: Resource temporarily unavailable
xinit: server error
Just running startx will however work. Apparently this starts up a new display (1) and therefore doesn't choke. ps -elf | grep X
Code:
4 S root      1398  1392  0  80   0 -  6344 ?      15:42 tty7     00:00:00 /usr/bin/X :0 -auth /var/lib/xdm/authdir/authfiles/A:0-2EhFVl
0 S user    1491  1475  0  80   0 -   886 -      15:58 tty1     00:00:00 xinit /home/user/.xinitrc -- /usr/bin/X :1 -auth /home/user/.serverauth.1475
4 S root      1492  1491  1  80   0 -  6941 ?      15:58 tty8     00:00:00 /usr/bin/X :1 -auth /home/user/.serverauth.1475
helper
I've tried about everything I can think of, and none of the similar problems I've found through Google have been applicable to my situation. If anyone has any advice on how to beat this piece of s*** into submission, I would be very grateful. Some other config files that might be of interest:
/usr/lib/X11/xdm/xdm-config
Code:
DisplayManager.authDir: /var/lib/xdm
DisplayManager.errorLogFile:    /var/log/xdm.log
DisplayManager.pidFile:         /var/run/xdm.pid
DisplayManager.keyFile:         /usr/lib/X11/xdm/xdm-keys
DisplayManager.servers:         /usr/lib/X11/xdm/Xservers
DisplayManager.accessFile:      /usr/lib/X11/xdm/Xaccess
DisplayManager*resources:       /usr/lib/X11/xdm/Xresources
DisplayManager.willing:         su nobody -s /bin/sh -c /usr/lib/X11/xdm/Xwilling
! All displays should use authorization, but we cannot be sure
! X terminals may not be configured that way, so they will require
! individual resource settings.
DisplayManager*authorize:       true
!
DisplayManager*chooser:         /usr/lib/X11/xdm/chooser
DisplayManager*startup:         /usr/lib/X11/xdm/Xstartup
DisplayManager*session:         /usr/lib/X11/xdm/Xsession
DisplayManager*reset:           /usr/lib/X11/xdm/Xreset
DisplayManager*authComplain:    true
! The following three resources set up display :0 as the console.
DisplayManager._0.setup:        /usr/lib/X11/xdm/Xsetup_0
DisplayManager._0.startup:      /usr/lib/X11/xdm/GiveConsole
DisplayManager._0.reset:        /usr/lib/X11/xdm/TakeConsole

DisplayManager*loginmoveInterval:       10
/usr/lib/X11/xdm/Xservers
Code:
:0 local /usr/bin/X :0
I tried making xdm use display 1 by editing this file, and it succeeded, in that it occupied slot one. Unfortunately it only displayed a black screen instead of a login screen, so it was a less than optimal solution...

~/.xinitrc
Code:
exec xfce4-session
 
Old 09-01-2012, 08:41 AM   #2
Izmo
LQ Newbie
 
Registered: May 2005
Posts: 3

Original Poster
Rep: Reputation: 0
Ok. Finally managed to get it to work, and since someone else might run into the problem (and I'm a nice guy), I'll post the solution.

There were actually 2 problems, and both of them were related to the file ~/.xsession. Apparently startx uses ~/.xinitrc, but xdm requires the .xsession one.

In my case the .xsession-file didn't exist - and I didn't get any meaningful error messages because I didn't know where to look for them (they're in ~/.xsession-errors). When I did figure out it was relevant I was still sent on a wild goose chase for a while, because there apparently is a bug in one of the scripts of xdm. Specifically the script /usr/lib/X11/xdm/Xsession, will, if the ~/.xsession file does not exist try to run /usr/bin/xsm. The problem here is that xsm is long since deprecated, and does not exist. To fix this, replace the line
Code:
exec /usr/bin/xsm
with
Code:
exec /bin/sh /etc/X11/xinit/xinitrc
The other thing I ran in to was an xfce bug, which I won't go any further in to because it (and the fix) are already described here.
 
Old 09-05-2012, 03:41 AM   #3
bdt-rob
LQ Newbie
 
Registered: Jun 2009
Location: Cambridge, England
Distribution: Gentoo, Arch, (xandross), (Slackware)
Posts: 16

Rep: Reputation: 2
Thanks for posting your solution. I've just had a Gentoo machine fail to log in from XDM after an update, with very similar symptoms (and works with startx) except I see nothing at all in ~/.xsession-errors. I'll have a look see if your fix works for me.
 
Old 09-05-2012, 12:27 PM   #4
bdt-rob
LQ Newbie
 
Registered: Jun 2009
Location: Cambridge, England
Distribution: Gentoo, Arch, (xandross), (Slackware)
Posts: 16

Rep: Reputation: 2
Actually my problem was something entirely different - after the upgrade it seems no longer allowable to not have consolekit running. So I started consolekit and it logs in fine from XDM
 
Old 09-23-2012, 07:49 AM   #5
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
not surprising. xdm has always been pretty buggy
 
  


Reply

Tags
xdm, xfce, xorg



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] xdm init script problem - "invoke-rc.d xdm start" fails ? Vilius Debian 2 09-13-2010 12:15 AM
Su to root works fine @ console, fails in x (cant login at all when using xdm) lionsong Slackware 5 09-06-2009 06:22 PM
xdm/gdm fails to start after manual install of X lourensc Debian 4 02-24-2009 01:52 AM
Start new display with XDM Wynd Linux - General 10 04-30-2007 09:10 PM
How to get Mandy to start with XDM? Thymox Linux - Newbie 1 01-14-2002 07:56 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 08:26 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration