Can't change the default window manager on KDE Plasma

I want to combine KDE Plasma with awesomewm. I HATE kwin, and want it gone. Yes I know it also doubles as a compositor and I’m going to have to install an external one (got picom) Anyway, I have a problem. I was following https://wiki.archlinux.org/title/KDE#Use_a_different_window_manager this guide exactly, but I encountered a problem. Here is what’s in my .sh file located in /usr/local/bin:

#!/bin/sh
export KDEWM=/usr/bin/awesome
/usr/bin/startplasma-x11

as the guide told me to do, but I replaced i3 with awesomewm.

This is what my .desktop file looks like:

[Desktop Entry]
Type=XSession
Exec=/usr/local/bin/plasma-awesome.sh
DesktopNames=KDE
Name=Plasma + AwesomeWM
Comment=KDE Plasma with AwesomeWM as the WM

I logged out of my Plasma X11, then tried to log in to my desktop entry, it showed the [ok] starting stuff, and it looked like I was actually doing it, but then I got sent to sddm.
" Ensure the path is correctly set. If KDE is unable to start the window manager, the session will fail and the user will be returned to the login screen." - Arch Wiki I have corrected the path, I’ve done everything right, and still it sends me to the sddm. Pls help.

1 Like

Did you make /usr/local/bin/plasma-awesome.sh executable?

I think so because when I click on the .sh file in KDE Plasma, a terminal pops up, I think it’s exectuable but I’m not sure. Is there any way to check if a .sh file is exectuable, and if it isn’t how do I make the file exectuable? My apologies for replying 13 hours late.

useful page. point you direction

" https://wiki.archlinux.org/title/Help:Reading#Make_executable "

2 Likes

I did sudo chmod +x /usr/local/bin/plasma-awesome.sh as suggested by @Shjim, but i just didn’t work. It still seems to be running KWIN as everything is floating even on the custom desktop session. I’m really confused, I did everything.

Ty. I did sudo chmod +x /usr/local/bin/plasma-awesome.shand I thought it would fix everything but clearly stupid KWin is still running. Why is it so hard to get rid of KWin and use a different window manager?? But still thanks for the help

Did you try :

awesome --replace

in a terminal ?

Yes, I got 2023-04-05 15:10:42 E: awesome: main:772: another window manager is already running (can't select SubstructureRedirect) HOW IS KWIN STILL RUNNING?! How do I fix this? I masked plasma kwin x11 service btw, do I just get rid of it altogether to fix the problem, what do I do?

Just a quick check:

Did you already disable and mask the plasma-kwin_x11.service and create the new user service according to: https://wiki.archlinux.org/title/Plasma#Replacing_KWin_service ?

I masked the plasma-kwin_x11.service but disabling it didn’t work because as systemctl said:

 The unit files have no installation config (WantedBy=, RequiredBy=, Also=,
Alias= settings in the [Install] section, and DefaultInstance= for template
units). This means they are not meant to be enabled or disabled using systemctl

I didnt make a new user service because I was using another method(the Systemwide one of making a new XSession) and anyways when I went on ~./config/, the systemd folder didn’t even exist there.

If this is a single user system, could it be an idea to try the first method, that is creating a new user service?

Yes this is a single user system but it says to make a new service in ~/.config/systemd/user/plasma-custom-wm.service but the systemd folder dosent exist. I went on to a root termnial using su and did this:

root@endeavourlxr ~# cd ~/.config
root@endeavourlxr ~/.config# ls
fish/  neofetch/  startkderc  user-dirs.dirs  user-dirs.locale
root@endeavourlxr ~/.config#

The only things inside ~/.config are fish, neofetch and those other folders but no systemd. How am I supposed to create a new user service when there is no systemd to be found?

You can create those folders yourself.

And you don’t need to switch user to root to modify things under your home directory.
That’s a recipe for trouble.

Just do it as your current user:

mkdir -p ~/.config/systemd/user

Good advice ty. I’ll report back to you if the first method works.

1 Like

I hope so! Good luck!

Just remember that for enabling a user service you would need to pass --user to systemctl and no sudo:

systemctl --user enable blablabla.service

1 Like

Alright. Also you’ve been a massive help, thank you.

1 Like

YOOOOO IT WORKED!!! TYSM I GOT AWESOME COMBINED W/ KDE I WAS TRYING TO DO THIS FOREVER! Also my compositor is gone. Disgusting screen tearing. Time to use picom

3 Likes

Sounds great! I’m glad you got it working!

Congratulations!

:champagne:

1 Like

What is this like? what are you able to do? Id love to see a guide on how to do this.

Basically, KDE Plasma is a full desktop enviroment, which also has its own built in window manager called KWin. KWin only supports floating windows and not tiling and so I wanted to swap KWin for another window manager (I chose AwesomeWM but the choice is yours) @Shjim @pebcak massively helped along with @dalto @vazicebon. Because of their help all the steps are in the topic through replies, but I’m going to condense everything that I did to replace stupid KWin with another WM:

1.) First download the WM of your choice. I chose awesomewm.

2.) Then we need to mask the KWIn service, as KDE uses services like these to startup KWin, so we need to run sudo systemctl mask plasma-kwin_x11.service, to mask the service.

3.) Now we need to create a new user service, which will allow us to swap KWin with the WM of your choice, but remember, this only applies to the user that you’re currently logged in as. To create a new user service, we go to ~/.config/systemd/user (cd into it) If the folders systemd and user don’t exist ten just create your own as @pebcak suggested by doing mkdir -p ~/.config/systemd/user (After you have created the folders then cd into it)

4.) Now to create our custom service in the terminal we’re going to have to use the cat command (which is what I have done) cat > ~/.config/systemd/user/whateveryouwanttocallthisservice.service and it will create. Also remember to do Ctrl+C in the terminal when it’s done.

5.) Now we nano into the .service file we have made nano ~/.config/systemd/user/whateveryouwanttocallthisservice.service

6.) Enter this into your service file:

[Install]
WantedBy=plasma-workspace.target

[Unit]
Description=Plasma Custom Window Manager
Before=plasma-workspace.target

[Service]
ExecStart=/path/to/other/wm
Slice=session.slice
Restart=on-failure

7.) Save your file.
8.)As @pebcak suggested, enable your service by NOT using sudo but using the --user flag, like systemctl --user enable whateveryouwanttocallthisservice.service
9.) Logout then log back in again. You shoul have your own window manager in Plasma.

What is it like:
Remember, KWin isn’t just a window manager, it’s a compositor too, and even manages your BACKGROUNDS. Which means you’re gonna have to install an external background manager(feh, Nitrogen) and an external compositor(like picom) And it’s kinda buggy but that can all be fixed by editing the config in your WM or installing external programs.

2 Likes