Bug 89452 - kdm takes several attempts to login
Summary: kdm takes several attempts to login
Status: RESOLVED FIXED
Alias: None
Product: kdm
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: FreeBSD Ports FreeBSD
: NOR normal
Target Milestone: ---
Assignee: kdm bugs tracker
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-14 00:31 UTC by Micah
Modified: 2008-05-19 17:30 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
make Xsession work with csh shell (712 bytes, patch)
2004-10-06 21:03 UTC, Jose M Rodriguez
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Micah 2004-09-14 00:31:18 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    FreeBSD Ports
OS:                FreeBSD

I'm running FreeBSD 5.2.1 Release (i386) with xorg 6.7 and KDE 3.3 both installed via ports.  I switched to xorg from XFree86 4.3 at the same time as upgrading KDE from 3.2.3 to 3.3.  I have KDM setup in /etc/ttys to come up automatically.

After the upgrade KDM may take several attempts before it will log me in.  After I type in my password and hit Enter I will see the "grey" XWindows screen and then after 10 to 15 seconds KDM will show back up.   It doesn't do this with every login attempt, and after the third or fourth try I usually get in.  And if I let it sit for 5 to 10 minutes before trying to log in, it seems to be less likely to do this.  No error messages are appearing in kdm.log, Xorg.0.log, or .xsession-errors.

I did get a debug log from KDM with a -debug 263 and it's at: http://students.washington.edu/micahjon/miscfiles/kdmlog.tar.gz the first log was copied after the first failed attempt, the 2nd after the 2nd attempt, and the 3rd attempt succeeded (and hence the 3rd log covers the complete session)
Comment 1 Oswald Buddenhagen 2004-09-14 00:36:31 UTC
according to the logs you should rather inspect your ~/.xsession-errors.
Comment 2 Micah 2004-09-14 01:03:17 UTC
The first two login attempts got me the following line in ~/.xsession-errors:
eval: 1: Syntax error: Unterminated quoted string
The third attempt got me:
eval: 1: Syntax error: "(" unexpected
The fourth attempt succeeded, and obliterated the messages.
Comment 3 Oswald Buddenhagen 2004-09-14 02:18:19 UTC
please append " -x" to the #! /bin/sh line in the Xsession script and look at .xsession-errors again.
what does the Session= line in ~/.dmrc say?
Comment 4 Micah 2004-09-14 03:06:19 UTC
.dmrc contains:
[Desktop]
Session=kde

The new .xsession-errors can be found at 
http://students.washington.edu/micahjon/miscfiles/xsession-errors.log

I am running tcsh, and my ~/.login consists of (comments removed):
[ -x /usr/games/fortune ] && /usr/games/fortune freebsd-tips
Comment 5 Oswald Buddenhagen 2004-09-14 10:06:08 UTC
CVS commit by ossi: 

redirect *.login output to /dev/null to avoid eval-uating fortunes.
the construct is such a hack ... let's see when it breaks again. :}
CCMAIL: 89452-fixed@bugs.kde.org


  M +1 -1      genkdmconf.c   1.94


--- kdebase/kdm/kfrontend/genkdmconf.c  #1.93:1.94
@@ -665,5 +665,5 @@ static const char def_session[] = 
 "    # Note that sourcing csh.login after .cshrc is non-standard.\n"
 "    set -a\n"
-"    eval `$SHELL -c 'if (-f /etc/csh.login) source /etc/csh.login; if (-f ~/.login) source ~/.login; /bin/sh -c set | egrep -v \"^(BASH_VERSINFO|EUID|PPID|UID|GROUPS|SHELLOPTS|_)=\"'`\n"
+"    eval `$SHELL -c 'if (-f /etc/csh.login) source /etc/csh.login > /dev/null; if (-f ~/.login) source ~/.login > /dev/null; /bin/sh -c set | egrep -v \"^(BASH_VERSINFO|EUID|PPID|UID|GROUPS|SHELLOPTS|_)=\"'`\n"
 "    set +a\n"
 "    ;;\n"


Comment 6 Jose M Rodriguez 2004-10-06 21:03:49 UTC
Created attachment 7800 [details]
make Xsession work with csh shell
Comment 7 Jose M Rodriguez 2004-10-06 23:07:52 UTC
Seems my comments on the previous patch are lost.

kdm Xsession script inyect unwanted ENV to csh users.
A malformed IFS string is generated by /bin/sh -c set parsing.
Use /usr/bin/env instead of /bin/sh -c set to solve this.
Also, don't export TERM or SHLVL

This is not FreeBSD specific.
Only that the kdm/csh duo is very common on FreeBSD.