LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Help with Configuring XRDP to use KDE instead of Gnome for desktop Fedora 37 (Wayland) (https://www.linuxquestions.org/questions/fedora-35/help-with-configuring-xrdp-to-use-kde-instead-of-gnome-for-desktop-fedora-37-wayland-4175720229/)

NuxIT 12-26-2022 04:44 PM

Help with Configuring XRDP to use KDE instead of Gnome for desktop Fedora 37 (Wayland)
 
I'm able to connect to the session from Windows 10 using terminal server but when I connect via xrdp it's coming up with Gnome instead of KDE. Original post I followed.

However, whenever I connect via xrdp it always brings up Gnome instead of KDE.
Initially I installed kde via the link above via
Code:

sudo dnf install @kde-desktop-environment
. But then I saw this another post and it suggested installing kde via this way
Code:

sudo dnf install @kde-desktop
. I believe both these commands give similar results. The first one with @kde-desktop-environment installs a little over 400 packages where as the one I most recently installed @kde-desktop installed about 375 packages. Also, I removed kde-desktop-environment before installing @kde-desktop.

After that I also ran these commands from that thread.
$ sudo systemctl set-default graphical.target
$ sudo systemctl disable gdm
$ sudo syste$ sudo systemctl disable gdm

Now when I boot up I'm greeted with a KDE like splash screen (I think) and I'm able to see what's called Gnome-Plasma or X11-Plasma in the available desktop sessions among others (Gnome-Wayland). What's odd is when I used to always setup my Linux xrdp sessions with an xfce lightweight desktop environment I would always default to the xfce via remote desktop which I like since it ran faster. I'm wondering if I should just install xfce also to see if that allows me to connect to KDE via XRDP session. Gnome is not ideal since it's not fast via RDP and I think KDE would work better. Also, initially I could not connect to my GUI on the laptop and then connect and bring up a RDP (xsession) again on my desktop.

I tried to follow a few other post by adding xClient session via
Code:

echo startkde >~xsession
. I was also thinking I might be able to force the kde session by modifying startwm.sh in this directory>

xrdp]$ ls
reconnectwm.sh startwm-bash.sh startwm.sh

I believe I might be able to modify . etc/X11/Xsession to start the KDE desktop via startkde instated of "Xsession".??

EG>
Code:

#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

I've tried quite a few things and nothing has allowed me to connect to KDE (Plasma) via XRDP. Appreciate any insight. I've managed to connect to KDE/Plasma directly from my laptop and then start a remote session to Gnome. This is not ideal and I'm thinking of trying xfce next.

uteck 12-26-2022 05:05 PM

This link might help: https://askubuntu.com/questions/1237...-connect-issue
Has some extra steps yo did not list and it has the full path to startkde in the .xession.

NuxIT 12-27-2022 04:32 PM

Quote:

Originally Posted by uteck (Post 6400486)
This link might help: https://askubuntu.com/questions/1237...-connect-issue
Has some extra steps yo did not list and it has the full path to startkde in the .xession.

Yeah, this thread has some additional info I might try. I'm just hesitant to run commands I'm not familiar with.
I'm currently trying to set the desktop environment by running this command.
Code:

sudo update-alternatives –config x-session-manager
However, it's not given me a menu I expect to select Plasma/KDE.

Code:

sudo update-alternatives –config x-session-manager
alternatives version 1.21 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage: alternatives --install <link> <name> <path> <priority>
                    [--initscript <service>]
                    [--family <family>]
                    [--follower <follower_link> <follower_name> <follower_path>]                                                                                        *
      alternatives --remove <name> <path>
      alternatives --auto <name>
      alternatives --config <name>
      alternatives --display <name>
      alternatives --set <name> <path/family>
      alternatives --list
      alternatives --remove-all <name>
      alternatives --add-follower <name> <path> <follower_link> <follower_name>                                                                                          <follower_path>
      alternatives --remove-follower <name> <path> <follower_name>

common options: --verbose --test --help --usage --version --keep-missing --keep-                                                                                        foreign
                --altdir <directory> --admindir <directory>
[styles@asus gdm]$ sudo update-alternatives –config x-session-manager
alternatives version 1.21 - Copyright (C) 2001 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage: alternatives --install <link> <name> <path> <priority>
                    [--initscript <service>]
                    [--family <family>]
                    [--follower <follower_link> <follower_name> <follower_path>]*
      alternatives --remove <name> <path>
      alternatives --auto <name>
      alternatives --config <name>
      alternatives --display <name>
      alternatives --set <name> <path/family>
      alternatives --list
      alternatives --remove-all <name>
      alternatives --add-follower <name> <path> <follower_link> <follower_name> <follower_path>
      alternatives --remove-follower <name> <path> <follower_name>

common options: --verbose --test --help --usage --version --keep-missing --keep-foreign
                --altdir <directory> --admindir <directory>

Also, per the thread you posted. I'm pretty sure I want to run this to set Plasma/KDE as default.

echo "/usr/bin/startplasma-x11" > ~/.xsession

I think I'll give this command a try now. I confirmed that session exist.

cd /usr/bin
[styles@asus bin]$ sta
startplasma-wayland startplasma-x11 start-statd startx startxfce4 stat

NuxIT 12-27-2022 06:23 PM

Thanks for the feedback @uteck! I managed to get this working today. This is what else I did.
Ran this>
Code:

echo "/usr/bin/startplasma-x11" > ~/.xsession
The above command did not help. I still connected to Gnome via XRDP session.
So, I removed this file.
Next, I created this instead.
Code:

echo "startplasma-x11" > ~/.Xclients
Followed by
Code:

chmod a+x ~/.Xclients
After adding the command above and creating .Xclients with the startplasma-x11 it now boots directly into KDE/Plasma!
I can also easily switch to startxfce4 by changing from startplasma-x11 to startxfce4 in the.Xclients file. I'll probably stick with XFCE since it's even better/quicker than KDE. Gnome was not good for RDP.

That's one issue down. Now I believe I need to create a separate user or allow concurrent logons because if I'm logged into Gnome Desktop on my Laptop and KDE on my RDP session with the same user account it causes issues. Like if I logout of one or the other it will usually reset the other system back to logon splash screen. Either that or through up a system error. I don't remember having issues with this before but a new user account or some sort of tweak to startwm.sh should resolve that. So, moving further along with this Fedora 37 and really liking it! Aside from a very difficult issue disabling the touchscreen which I need to get back to.

uteck 12-27-2022 07:18 PM

Quote:

sudo update-alternatives –config x-session-manager
needs to be --config, with 2 dashes --.

NuxIT 12-28-2022 11:04 AM

Quote:

Originally Posted by uteck (Post 6400688)
needs to be --config, with 2 dashes --.

Nice catch. I don't think I'll bother using this command utility to set the xsession since I figured out my fix yesterday. However, I might try it again for giggles.
It's always nice to know of a few ways to go about fixing things in Linux. Usually you can find multiple solutions to an issue. This was an interesting one but I'm really happy to be able to use XFCE and/or Plasma/KDE on XRDP now. Big difference and I think I prefer both over Gnome for logging in directly. Gnome is not that intuitive when it comes to displaying what programs you have installed in a nice organized manner like KDE and XFCE do. Other than than Gnome seems pretty good and can be tweaked to allow better program access.


All times are GMT -5. The time now is 12:26 PM.