А вот это не проходит?
----------------------------------------------
After the user logs in, xdm runs the Xstartup script as root.
Then xdm runs the Xsession script as the user. This system session file may do
some additional startup and typically runs the .xsession script in the user's home
directory. When the Xsession script exits, the session is over.
----------------------------------------------
Например у нас на Linux, скрипт /usr/X11R6/lib/X11/xdm/Xsession
содержит такую конструкцию:
----------------------------------------------
# now, we see if xdm/gdm/kdm has asked for a specific environment
case $# in
1)
if [ -x /usr/share/apps/switchdesk/Xclients.$1 ]; then
exec -l $SHELL -c "/usr/share/apps/switchdesk/Xclients.$1";
fi;
case $1 in
failsafe)
exec -l $SHELL -c "xterm -geometry 80x24-0-0"
;;
gnome)
exec -l $SHELL -c "gnome-session"
;;
kde