/etc/X11/Sessions/kde-3.1.4 (and future versions) should be : #!/bin/sh if [ -r ~/.xsession ]; then . ~/.xsession fi /usr/kde/3.1/bin/startkde I believe this is the normal, desired, expected result. Reproducible: Always Steps to Reproduce: 1. 2. 3. Actual Results: When starting KDE via ?DM, ~/.xsession is not executed. Expected Results: ~/.xsession should be executed. (kvh@rachael)-(00:28)-(~)> emerge --info Portage 2.0.49-r15-kvh1 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.6.0-test9) ================================================================= System uname: 2.6.0-test9 i686 AMD Duron(tm) processor Gentoo Base System version 1.4.3.10p1 ACCEPT_KEYWORDS="x86" AUTOCLEAN="yes" CFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/config" CONFIG_PROTECT_MASK="/etc/gconf /etc/env.d" CXXFLAGS="-march=athlon -O3 -pipe -fomit-frame-pointer" DISTDIR="/usr/portage/distfiles" FEATURES="autoaddcvs sandbox ccache userpriv notitles" GENTOO_MIRRORS="http://mirrors.tds.net/gentoo ftp://mirrors.tds.net/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo http://gentoo.noved.org/ http://gentoo.seren.com/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/dev/shm" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt encode foomaticdb gif jpeg libg++ libwww mad mikmod mpeg ncurses pdflib png quicktime spell xml2 xmms xv zlib gdbm berkdb slang arts svga sdl gpm tcpd pam perl python esd imlib qt kde opengl mozilla X alsa ssl truetype gtk2 -gtk mmx 3dnow cups maildir oggvorbis ruby readline -nls -java -motif cdr -gnome"
Same thing I wrote in response to this thread on -user... ~/.xsession is meant to _substitute for_, not to _add to_ the standard Xsession script.
Well then, how would you get the system to execute ~/.xsession? I don't really get your point. /etc/X11/Sessions/kde- has only 1 line which is startkde. XSession is not executed in this way. Hence, kde- should execute ~/.xsession if it is found.
~/.xsession should be executed in lieu of /etc/X11/Sessions/kde-3.1.4 if it exists.
(Meant to write more but hit enter) So whatever script executes the XSession scripts should honor ~/.xsession first.
.xsession is normally used when starting from xdm. xsession is executed with the XSESSION startup selected. As such .xsession is responsible itself to start a windowmanager. As such .xsession can only replace any other startscript, never be sourced from it. There is currently no standard solution for starting somethings before the windowmanager independent of that windowmanager. Take a look at bug #14872, there I have a proposed solution to this deficiency.