Switching between wms

Yesterday I made a new install on an old laptop (Dell Latitude ). For the first time I boot via console and I get into my wm (awesome) right after login. If I will boot letś say Sway I have to edit .xinitrc for that.
I wonder if there is another way where I can choose wm after login?
(read on arch-wiki and changed .xinitrc but I ended up killing x over and over!)

Thankful for a pointer!

womp

Sway is wayland, so just type “sway” instead of “startx”.

You mean select a particular window manager to use from several you installed? You can do that from .xinitrc. This is what I use. The part that pertains to your question starts at line 35.

If you mean you want to switch between window managers, that’s different. There are a couple threads about doing that in this forum.

2 Likes

I thank you for your answer Oh wise one!

AL-awesome is configured like > boot > console > login and there is awesome!
I don´t have to type “startx”!
I will look in to your git but at first glance it looks like I would need most of your .xinitrc.

Thank you very much!!

womp

So you’re auto logging into awesome? You may want to look into the other threads on this forum about switching window managers. I log into the console then decide what window manager I want to use.

And note, the:

dbus-run-session

part in my .xinitrc is for Void Linux, that will fail on ArchLabs (any systemd system, I think). So don’t use that. This is my ArchLabs .xinitrc

1 Like

Yeah you’re right. I must have pushed the wrong button during install!
I will read your AL-.xinitrc and try. If it fails I can always go back .

womp

Well, it failed. But itś because I don´t understand how it works! (yet).
I am now using your script but for me it works almost the same as mine. (To switch wm I have to edit and reboot).
I did have a look at systemd-targets and changed tartet to multi-user.target. The strange thing is that nothing changed! I will read more and try more tomorrow.

womp

EDIT:
Found a “solution”. >boot to console > switch to tty2 >startx ~/.xinitrc i3

womp

If you want to be at the console when you log in, find one of the threads in this forum about disabling auto login.

Why do you need so many WMs installed in your system? :grinning:

1 Like

Me?

Some people distro hop, I window manager hop.
A couple of them - like openbox - I just keep installed in case someone in the forum (or BL) has a question about openbox, and I contribute a theme now and then.

Most of the time I use i3, but as I post, I’m using the latest build of Fvwm3 (1.0.5) - it works great.

2 Likes

Ok. Haven’t done a reboot yet today! I will look into it. That could be a better solution!

womp

Hell I have Openbox, bspwm, awesome, fluxbox, i3, sway, dwm, even dk (although I am just learning both dwm and dk). At one point I had xmonad, qtile, herbs, like @PackRat said, I stopped distro hopping for WM hopping.

5h4av6

Here is a list of like 40+ WM’s to check out:

https://www.slant.co/topics/390/~best-window-managers-for-linux

Hello again!
I finally found it!!
There is a line in .bash_profile “[ -z “$DISPLAY” ] && [ $XDG_VTNR -eq 1 ] && startx”. I commented that out and now I can manually startx ~/.xinitrc openbox or I3 or Awesome!
Problem is solved!

Thanks for superb support as always!!

womp

Glad that you got it to work @womp

1 Like

Yeah. Me too!!

womp

1 Like

You can use an alias for these commands and save yourself some typing. For example:

alias start-i3='startx ~/.xinitrc i3'

Put the aliases (or source the file with the aliases) in your ~/.zshrc (shell profile) so they can be used after you log in.

3 Likes

A good idea!! Do I set in .xinitrc?

womp

No, put them in your shell profile with the other aliases you’re using. They will get sourced when you log in.

Ok! Thanks Oh wise one!!

womp