XRDP on KDE Plasma 5

I upgraded to KDE Plasma 5 on 11.2 rc1 (I did it with kde4 installed, and had to keep removing certain shared files). It worked, though I have to start GUI with startx. Everything seems fine except I can no longer connect to my xrdp (sesman-X11rdp) remote sessions (from my windows box).
The services are running and I can get to the login screen. When I try to login to sesman-X11rdp the login box disappears and after a few seconds the rdp session closes with no error message. The info box that use to appear at the top right of screen does not come up either. Any help on what may have to be reconfigured, would be greatly appreciated.
 
I suspect you need to modify /usr/local/etc/xrdp/startwm.sh and adjust for KDE5 instead of KDE4.
 
I found no reference to KDE4 in my /usr/local/etc/xrdp/startwm.sh
Code:
#!/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


# Execution sequence for interactive login shell - pseudocode
#
# IF /etc/profile is readable THEN
#     execute ~/.bash_profile
# END IF
# IF ~/.bash_profile is readable THEN
#     execute ~/.bash_profile
# ELSE
#     IF ~/.bash_login is readable THEN
#         execute ~/.bash_login
#     ELSE
#         IF ~/.profile is readable THEN
#             execute ~/.profile
#         END IF
#     END IF
# END IF
pre_start()
{
  if [ -r /etc/profile ]; then
    . /etc/profile
  fi
  if [ -r ~/.bash_profile ]; then
    . ~/.bash_profile
  else
    if [ -r ~/.bash_login ]; then
      . ~/.bash_login
    else
      if [ -r ~/.profile ]; then
        . ~/.profile
      fi
    fi
  fi
  return 0
}

# When loging out from the interactive shell, the execution sequence is:
#
# IF ~/.bash_logout exists THEN
#     execute ~/.bash_logout
# END IF
post_start()
{
  if [ -r ~/.bash_logout ]; then
    . ~/.bash_logout
  fi
  return 0
}

#start the window manager
wm_start()
{
  if [ -r /etc/default/locale ]; then
    . /etc/default/locale
    export LANG LANGUAGE
  fi

  # debian
  if [ -r /etc/X11/Xsession ]; then
    pre_start
    . /etc/X11/Xsession
    post_start
    exit 0
  fi

  # el
  if [ -r /etc/X11/xinit/Xsession ]; then
    pre_start
    . /etc/X11/xinit/Xsession
    post_start
    exit 0
  fi

  # suse
  if [ -r /etc/X11/xdm/Xsession ]; then
    # since the following script run a user login shell,
    # do not execute the pseudo login shell scripts
    . /etc/X11/xdm/Xsession
    exit 0
  fi

  pre_start
  xterm
  post_start
}

#. /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

wm_start

exit 1

I tried adding "/usr/local/bin/startkde" and just plain "startkde" (in the highlighted area below) to my startwm.sh

#start the window manager
wm_start()
{
if [ -r /etc/default/locale ]; then
. /etc/default/locale
export LANG LANGUAGE
fi
startkde

nothing changed.
Did I put it in the right place? Did I even use the correct word "startkde" ( I got it from my .xinitrc in my home folder, it contains a single line "exec /usr/local/bin/startkde")?

Thanks
 
Update: I found my old startwm.sh (which is below), still can't get a "sesman-X11rdp" to open. I can now get a "sesman-Xvnc" to open and so far so good. It will serve my purpose. I would like to figure out why the "sesman-X11rdp" won't work any more though.

Thanks again









Code:
#!/bin/sh

# change the order in line below to run to run whatever window manager you
# want, default to kde

SESSIONS="gnome-session blackbox fluxbox startxfce4 startkde xterm"

#start the window manager
wm_start()
{
  for WindowManager in $SESSIONS
  do
    which $WindowManager
    if test $? -eq 0
    then
      echo "Starting $WindowManager"
      $WindowManager
      return 0
    fi
  done
  return 0
}

#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
 
I just upgraded to KDE 5 on 11.2 and have the same issue you described. I'm able to get a graphical login, but I cannot get xrdp to work. Did you ever find a solution for this?
 
Not sure how you are set up but, I still can't get "sesman-X11rdp " to work from the drop down list but, both "sesman-Xvnc " & "Xorg" kinda work. If I choose either of those, I log in and after a short delay a terminal window will open in the top right. I type "startkde" and my desktop comes up. If you figure out a better way please let me know.
 
How did you get those to work with xrdp?

Aside from xrdp, did you get your graphical login working? If not, then you can install the sddm package and then add sddm_enable="YES" to rc.conf.
 
Back
Top