This forum has been archived. All content is frozen. Please use KDE Discuss instead.

[SOLVED] kdm not executing Session script KDE 4.2, Gentoo

Tags: None
(comma "," separated)
Taedrin
Registered Member
Posts
3
Karma
0
[edit]solution[/edit]

Alright, I'm stumped. I recently installed KDE 4.2 on my system, and I've been having a horrible time getting everything working all day long. I finally have *almost* everything up and running again. However, I've run into a problem:
kdm is not executing the Xsessions script pointed to by my kdmrc file. I do, however, know that the Xstartup script is executing properly, as I added the line:

Code: Select all
exec echo "Hello World!" >> /home/foobar/ERRORLOG


to the Xstartup script located in the same folder as the Xsession script. A similar line placed at the top of the Xsession script yields no effect, so I am presuming that kdm is not even executing the command. As such, kdm does not open the desktop environment that I tell it to - it always opens up the failsafe (xterm).

From xterm, I can get kde up and running just fine by executing "startkde". In fact, I have temporarily edited my kdmrc file to use "/usr/bin/startkde" as my failsafe client.

Anyways, this is the relevant portion of my kdmrc file:
Code: Select all
# Core config for all displays
[X-*-Core]

Resources=/usr/share/config/kdm/Xresources

Setup=/usr/share/config/kdm/Xsetup

#this one executes during login
Startup=/usr/share/config/kdm/Xstartup

Reset=/usr/share/config/kdm/Xreset

#this one does NOT execute (but should!) during login
Session=/usr/share/config/kdm/Xsession

FailsafeClient=/usr/bin/startkde
#used to be:
#FailsafeClient=/usr/bin/xterm


And this is what /usr/share/config/kdm/Xsession looks like:
Code: Select all
#! /bin/sh
# Xsession - run as user

#why doesn't this execute?
exec echo "Hello Xsession!" >> /home/foobar/ERRORLOG

session=$1

# Note that the respective logout scripts are not sourced.
case $SHELL in
  */bash)
    [ -z "$BASH" ] && exec $SHELL $0 "$@"
    set +o posix
...


I'm at the end of my rope here, and I'm completely confused as to how I can get this working the way it should be. I highly doubt that using "startkde" as the failsafe is the best way to do things. I am also pretty certain that I am referring to the correct files, unless of course my file system is lying to me.

Any help would be greatly appreciated.

Last edited by Taedrin on Wed Feb 11, 2009 3:14 am, edited 1 time in total.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
On openSUSE, the configuration of KDM is not used, instead it uses the configuration of XDM. You may wish to check this.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
Taedrin
Registered Member
Posts
3
Karma
0
It's definitely not using xdm's config, as xdm is not starting xterm, but kdm is.

More information:
After a bit of research (IE, finally figuring out where the log file was), I discovered this line in /var/log/messages:
Code: Select all
Feb  9 18:31:10 localhost kdm: :0 '[19432]: Session "/usr/share/config/kdm/Xsession" execution failed: Permission denied


ls -l /usr/share/config/kdm/Xsession yields this output:
Code: Select all
-rwxr-xr-x 1 root root 1929 Feb  4 18:47 /usr/share/config/kdm/Xsession


just in case kdm needs to write to the file, for some odd reason, I even temporarily did a chmod 777 on it:

Code: Select all
-rwxrwxrwx 1 root root 1929 Feb  4 18:47 /usr/share/config/kdm/Xsession


no luck - kdm still is not reading the Xsession script.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Do you have Apparmor or SELinux active on your machine? If so, try shutting them down. They are known to cause obscure access denied issues like this.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
imhotep
Registered Member
Posts
2
Karma
0
Hello,

I had the same problem, and thanks to you I notice the message in /var/log/messages

The solution is not the file itself, but the path. Check all directories!

Code: Select all
-rwxr-xr-x 1 root root 1929 Feb  4 18:47 /usr/share/config/kdm/Xsession


As user I had no permission to /usr/share/config

So I made

Code: Select all
chmod 755 /usr/share/config


Good Luck.
imhotep
Registered Member
Posts
2
Karma
0
Code: Select all
 * If you experience weird application behavior (missing texts, etc.) run as root:
 * # chmod 755 -R /usr/share/config /usr/share/config


I just emerged kdelibs and notice this message.
Taedrin
Registered Member
Posts
3
Karma
0
imhotep wrote:Hello,

I had the same problem, and thanks to you I notice the message in /var/log/messages

The solution is not the file itself, but the path. Check all directories!

Code: Select all
-rwxr-xr-x 1 root root 1929 Feb  4 18:47 /usr/share/config/kdm/Xsession


As user I had no permission to /usr/share/config

So I made

Code: Select all
chmod 755 /usr/share/config


Good Luck.


That fixed it, thanks for your help!


Bookmarks



Who is online

Registered users: Bing [Bot], claydoh, Google [Bot], rblackwell