XRDP using IceWM after Upgrade to 15.2

Hi

I have been using XRDP with XFCE4 for several years now but after I upgraded to 15.2 XRDP always uses IceWM. How do I get it back to XFCE4?

I do not see anything in the startwm.sh about XFCE4 which I assume maybe the problem. When I logon from the console everything is fine. It is only when using XRDP that I have this problem.


#!/usr/bin/env bash
#
# This script is an example. You might need to edit this script
# depending on your distro if it doesn't work for you.
#
# Uncomment the following line for debug:
# exec xterm


#start the window manager
wm_start()
{
  #To customize system-wise session, edit this file.
  #To customize user specific session, copy this file to $HOME and edit it.
  #Please refer to DefaultWindowManager and UserWindowManager in /etc/xrdp/sesman.ini for more details.

  #The default session is gnome (GNOME Session)
  #sle means SLE-Classic Session

  SESSION="gnome"

  case $SESSION in
    sle)
      if  -r /usr/bin/gnome-session ]; then
        export XDG_SESSION_TYPE=x11
        export GNOME_SHELL_SESSION_MODE=sle-classic
        /usr/bin/gnome-session --session gnome-classic
      elif  -r /usr/bin/icewm-session ]; then
        /usr/bin/icewm-session
      fi
      ;;
    gnome)
      if  -r /usr/bin/gnome-session ]; then
        export XDG_SESSION_TYPE=x11
        /usr/bin/gnome-session
      elif  -r /usr/bin/icewm-session ]; then
        /usr/bin/icewm-session
      fi
      ;;
    plasma)
      if  -r /usr/bin/startplasma-x11 ]; then
        export XDG_SESSION_TYPE=x11
        /usr/bin/startplasma-x11
      elif  -r /usr/bin/icewm-session ]; then
        /usr/bin/icewm-session
      fi
      ;;
    icewm)
      if  -r /usr/bin/icewm-session ]; then
        /usr/bin/icewm-session
      fi
      ;;
  esac
}

#Execution sequence for interactive login shell
#Following pseudo code explains the sequence of execution of these files.
#execute /etc/profile
#IF ~/.bash_profile exists THEN
#    execute ~/.bash_profile
#ELSE
#    IF ~/.bash_login exist THEN
#        execute ~/.bash_login
#    ELSE
#        IF ~/.profile exist THEN
#            execute ~/.profile
#        END IF
#    END IF
#END IF
pre_start()
{
  if  -f /etc/profile ]
  then
    . /etc/profile
  fi
  if  -f ~/.bash_profile ]
  then
    . ~/.bash_profile
  else
    if  -f ~/.bash_login ]
    then
      . ~/.bash_login
    else
      if  -f ~/.profile ]
      then
        . ~/.profile
      fi
    fi
  fi
  return 0
}

#When you logout of the interactive shell, following is the
#sequence of execution:
#IF ~/.bash_logout exists THEN
#    execute ~/.bash_logout
#END IF
post_start()
{
  if  -f ~/.bash_logout ]
  then
    . ~/.bash_logout
  fi
  return 0
}

#. /etc/environment
#export PATH=$PATH
#export LANG=$LANG

# change PATH to be what your environment needs usually what is in
# /etc/environment
#PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"
#export PATH=$PATH

# for PATH and LANG from /etc/environment
# pam will auto process the environment file if /etc/pam.d/xrdp-sesman
# includes
# auth       required     pam_env.so readenv=1

pre_start
wm_start
post_start

exit 1

Hi,
Try creating an .Xclients file as described in this article…

http://sigkillit.com/tag/xrdp/

TSU

Hi

I tried this but it made no difference. XRDP still uses IceWM.

Simon

Hi

The solution was to change “SESSION” to “xfce4” and add a condition to check for “xfce4”


   xfce4)
      if  -r /usr/bin/xfce4-session ]; then
        /usr/bin/xfce4-session
      fi
      ;;

Now everything works correctly. I guess could simplify the startwm.sh by removing all the unnecessary checks for other Window Managers.

Simon

Congrats on finding your solution and I’m sure by posting your solution someone else will be helped.

TSU