Bug 490566 - kdm can't deal with xinit-compat desktop session
kdm can't deal with xinit-compat desktop session
Status: CLOSED DUPLICATE of bug 540546
Product: Fedora
Classification: Fedora
Component: kdebase-workspace (Show other bugs)
12
All Linux
low Severity medium
: ---
: ---
Assigned To: Rex Dieter
Fedora Extras Quality Assurance
: Triaged
: 540365 (view as bug list)
Depends On: 540546
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-16 20:42 EDT by Tom Horsley
Modified: 2010-03-13 16:45 EST (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2010-03-13 16:45:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Tom Horsley 2009-03-16 20:42:04 EDT
Description of problem:

I switched to KDM to see if it was any less horrible than GDM, and found that
it apparently doesn't have any idea how to run ~/.xsession if my
~/.dmrc file is set to xinit-compat.

As soon as I login, I get logged out again as the login script apparently
just exits. I added echo commands to my ~/.xsession file (which GDM runs
just fine), and there is no evidence that it ever got as far as running
it.

Version-Release number of selected component (if applicable):
kdebase-workspace-4.2.0-8.fc10.x86_64

How reproducible:


Steps to Reproduce:
1. edit /etc/sysconfig/desktop
2. say DISPLAYMANAGER=KDE
3. Have a ~/.dmrc file that looks like:

[Desktop]
Session=xinit-compat

4. Get logged out as soon as you login

Actual results:
See above

Expected results:
Run my ~/.xsession file

Additional info:
Comment 1 Rex Dieter 2009-03-16 21:01:30 EDT
rpm -q  xorg-x11-xinit-session
please.

In the meantime, I'll see if I can reproduce.

Curious, what is the contents of your ~/.xsession ?
Comment 2 Tom Horsley 2009-03-16 21:24:08 EDT
rpm -q  xorg-x11-xinit-session gives:

xorg-x11-xinit-session-1.0.9-4.fc10.x86_64

It works fine when I run GDM.

My .xsession file is kinda complex and invokes some programs I wrote
myself, but for what it is worth, here it is:

-rwxr-xr-x 1 tom users 1942 Mar 16 19:53 /home/tom/.xsession*

#!/bin/bash
exec >> $HOME/.xsession-errors 2>&1
echo ''
echo Starting X session `date`
set +x
killall -9 gnome-keyring-daemon
ps f -u tom
#
# Try everything possible to disable every kind of power saver mode.
# The radeon driver seems to flake out the monitor after power saver
# kicks in 1st time...
#
#xset s off
#xset dpms 0 0 0
#xset -dpms
#setterm -blank 0
#setterm -powersave off
#setterm -powerdown 0
#
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
export SSH_ASKPASS
kill_agent="no"
if [ -z "$SSH_AUTH_SOCK" ]
then
   echo .xsession starting ssh-agent
   eval `ssh-agent -s`
   kill_agent="yes"
else
   echo ssh-agent already started
fi
xhost +
if [ -z "$DBUS_SESSION_BUS_ADDRESS" ]
then
   echo .xsession starting dbus
   eval `dbus-launch --sh-syntax --exit-with-session`
else
   echo dbus already started
fi
#
# Tricky bit - the /usr/libexec/gnome-settings-daemon program is good to
# run to revive the font settings, but it also revives all sorts of
# useless crap I don't want, so start it, wait a bit and then remove
# all the crap it adds to the xrdb database.
#
# Breaking news! Every damn time I connect from work via VNC, the next
# time I login to the console X session, I get a $#@! popup about
# "The X system keyboard settings differ from your current GNOME
# keyboard settings." After near infinite amounts of poking sticks
# in random holes, I finally discovered that the $@#! gconf keys
# under /desktop/gnome/peripherals/keyboard/kbd.sysbackup need to
# be reset to make this go away, so just always reset that key before
# starting gnome-settings-daemon.
#
/usr/bin/gconftool-2 --recursive-unset /desktop/gnome/peripherals/keyboard/kbd.sysbackup
/usr/libexec/gnome-settings-daemon &
sleep 5
xrdb -all -remove
xrdb -load $HOME/.Xdefaults
nlaunch &
ps f -u tom
xmessage -geometry +0-0 -buttons 'to Log Out':1 -default 'to Log Out' 'Click Here'
killall remind
if [ "$kill_agent" = "yes" ]
then
   ssh-agent -k
fi
Comment 3 Tom Horsley 2009-03-16 22:09:42 EDT
I notice that the /usr/share/xsessions/xinit-compat.desktop file is the
only one with a complex command to run as the Exec= parameter. I wonder
if kdm is trying to do a direct exec of the line rather than running
it through a shell to interpret the arguments properly?
Comment 4 Rex Dieter 2009-03-16 22:21:23 EDT
I can reproduce the problem alright.

Replacing /usr/share/xsessions/xinit-compat.desktop Exec= with either
Exec=~/.xsession
or even
Exec=sh -c 'exec ~/.xsession || exec ~/.Xclients || exec /etc/X11/xinit/Xclients'
makes it work.  Not sure how/why the " characters are causing mischief here.
Comment 5 Tom Horsley 2009-03-17 17:46:54 EDT
I personally suspect kdm is attempting to run the command:

'sh' '-c' '"exec' '~/.xsession' '||' ... etc.

anyway, I made a script in /usr/local/bin that runs the command

exec ~/.xsession || exec ~/.Xclients || exec /etc/X11/xinit/Xclients

then made a new .desktop file in /usr/share/xsessions that just
runs that script, and I can login now with KDM.
Comment 6 JM 2009-05-11 11:17:26 EDT
Same problem here, is this now a 'xorg-x11-xinit-session' script bug or a KDM/KDE bug? And would the workaround from comment #4 (' instead of ") work also for GDM? Because then a new 'xorg-x11-xinit-session' script would fix the problem.
Comment 7 Rex Dieter 2009-05-11 11:27:34 EDT
> And would the workaround from comment #4 (' instead of ") 
> work also for GDM?

Good question, if someone could help test that, it would be great (I'll do so myself eventually when I accumulate enough round-tuits).
Comment 8 Steven M. Parrish 2009-06-28 19:54:28 EDT
Rex, how many round-tuits you got saved up?

-- 
Steven M. Parrish - KDE Triage Master
                  - PackageKit Triager
Fedora Bugzappers volunteer triage team
https://fedoraproject.org/wiki/BugZappers
Comment 9 Bug Zapper 2009-11-18 06:32:00 EST
This message is a reminder that Fedora 10 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 10.  It is Fedora's policy to close all
bug reports from releases that are no longer maintained.  At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '10'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 10's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 10 is end of life.  If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events.  Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 10 Rex Dieter 2009-11-18 09:37:42 EST
I strongly suspect this is still valid, rebasing.

Withdrawing some round-tuits from savings to investigate per comment #7
Comment 11 Rex Dieter 2009-11-23 10:55:32 EST
*** Bug 540365 has been marked as a duplicate of this bug. ***
Comment 12 Rex Dieter 2010-03-13 16:45:11 EST
Dup'ing against bug #540546 , where we're working to simplify xinit-compat instead.

*** This bug has been marked as a duplicate of bug 540546 ***

Note You need to log in before you can comment on or make changes to this bug.