[Solved] minimalist wayland session

Graphical Environments, Managers, Multimedia & Desktop questions.
Post Reply
Message
Author
User avatar
lobra2
Posts: 6
Joined: 2023-06-25 10:06
Has thanked: 4 times

[Solved] minimalist wayland session

#1 Post by lobra2 »

Hullo!
I Am considering migrating from X to Wayland, mostly for quite specific reasons and blah blah blah,
but also because it seems fairly reasonable and relevant looking forward.
However,
i have no desire to start using full desktop environments, graphical logins and whatnot;
for years i have been running my X sessions very bare and minimal with only a window manager and some kind of menu system,
to be precise i have been switching between openbox and dwm;
i start such a session from tty by startx, so that i dont have to bother with graphics at all unless i want to run GUI programs.
I have been trying to find out what would be a similar setup to this using wayland instead of X11 but without any real success..
So, my question is, has anyone here experience of setting up a minimalist approach to wayland??? :? :D
Last edited by lobra2 on 2024-12-04 08:37, edited 1 time in total.

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 1152
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 121 times
Been thanked: 201 times

Re: minimalist wayland session

#2 Post by wizard10000 »

I ran openbox for a bunch of years but have switched to labwc recently. Unfortunately labwc isn't available in Bookworm but is available in Trixie.

https://github.com/labwc/labwc
we see things not as they are, but as we are.
-- anais nin

User avatar
lobra2
Posts: 6
Joined: 2023-06-25 10:06
Has thanked: 4 times

Re: minimalist wayland session

#3 Post by lobra2 »

wizard10000 wrote: 2024-12-02 17:55 I ran openbox for a bunch of years but have switched to labwc recently. Unfortunately labwc isn't available in Bookworm but is available in Trixie.

https://github.com/labwc/labwc
Looks promising! Having to build it myself is generally not a problem anyway, unless the source turns out to be a maze of dependencies etc.
Is there a reasonably simple command for wayland, the like of startx, to start a "compositor"/"wm-like" session without having to append a whole poem of specifications? The way it all looks to me, the whole tone of it, seems to assume the user wants to log right into GUI mode...
Or is it simple enough that i specify the compositor in some config file somewhere and then just
user: wayland
?

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 1152
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 121 times
Been thanked: 201 times

Re: minimalist wayland session

#4 Post by wizard10000 »

lobra2 wrote: 2024-12-02 19:08Looks promising! Having to build it myself is generally not a problem anyway, unless the source turns out to be a maze of dependencies etc.
Is there a reasonably simple command for wayland, the like of startx, to start a "compositor"/"wm-like" session without having to append a whole poem of specifications? The way it all looks to me, the whole tone of it, seems to assume the user wants to log right into GUI mode...
Or is it simple enough that i specify the compositor in some config file somewhere and then just
user: wayland
?
You'd have to meet several dependencies to build on Bookworm.

You start labwc from a command prompt by simply typing "labwc" - you might not want to autostart it but I do - here's the bottom of my ~/.profile which starts labwc if the login is on TTY1 -

Code: Select all

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  labwc
fi
Hope this helps -
we see things not as they are, but as we are.
-- anais nin

lindi
Debian Developer
Debian Developer
Posts: 598
Joined: 2022-07-12 14:10
Has thanked: 2 times
Been thanked: 117 times

Re: minimalist wayland session

#5 Post by lindi »

wizard10000 wrote: 2024-12-02 19:17

Code: Select all

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  labwc
fi
Hope this helps -
Do you have some trick to lock your screen safely in this setup? I imagine if labwc crashes you will have a shell prompt open on tty1?

User avatar
kent_dorfman766
Posts: 570
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 69 times
Been thanked: 76 times

Re: minimalist wayland session

#6 Post by kent_dorfman766 »

I reiterate the OPs question. I use openbox/tint2 on multiple physical displays, started via startx ".xsession": :0.0 and :0.1. I don't want any DE garb on my system, but only a liteweight window manager that supports my needed functionality. I cant/wont even mess with wayland unless it will support my desktop/X11 expectations.

I'm also not one to quickly upgrade every time a new Debian release comes out since it takes to long to shake out the new OS, so the longer I can support an older OS, the happier I am. Am running Debian-11 and won't upgrade until EOL LTS in mid 2026.

Any other recommendations for running/testing wayland/X11 from a shell login?

User avatar
kent_dorfman766
Posts: 570
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 69 times
Been thanked: 76 times

Re: minimalist wayland session

#7 Post by kent_dorfman766 »

:D Actually, will take a look at labwc and see if it builds properly under bullseye/11

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 1152
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 121 times
Been thanked: 201 times

Re: minimalist wayland session

#8 Post by wizard10000 »

lindi wrote: 2024-12-02 22:07Do you have some trick to lock your screen safely in this setup? I imagine if labwc crashes you will have a shell prompt open on tty1?
I personally don't lock my screen (retired, nobody lives here but me and the spousal unit) but I understand swaylock works - I do use swayidle to shut off the screen after five minutes, though.

edit: I don't use this but it'd resolve the open shell prompt thing -

Code: Select all

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  labwc
  logout
fi
we see things not as they are, but as we are.
-- anais nin

CwF
Global Moderator
Global Moderator
Posts: 3140
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 63 times
Been thanked: 268 times

Re: minimalist wayland session

#9 Post by CwF »

It should loop back into the desktop. Since the original condition is still true, it just starts again.

You can't log off back to the tty!
Mottainai

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 1152
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 121 times
Been thanked: 201 times

Re: minimalist wayland session

#10 Post by wizard10000 »

CwF wrote: 2024-12-02 23:24It should loop back into the desktop. Since the original condition is still true, it just starts again.

You can't log off back to the tty!
It doesn't loop back to the desktop if labwc crashes but the logout doesn't work either. I opened a second console and did a killall -9 labwc and the original console where labwc was running complained about losing its connection to Wayland. It didn't respawn and also didn't log me out.
we see things not as they are, but as we are.
-- anais nin

dlu2021
Posts: 233
Joined: 2021-08-13 19:55
Location: Minnesota
Has thanked: 8 times
Been thanked: 44 times

Re: minimalist wayland session

#11 Post by dlu2021 »

wizard10000 wrote: 2024-12-03 01:00 It doesn't loop back to the desktop if labwc crashes but the logout doesn't work either. I opened a second console and did a killall -9 labwc and the original console where labwc was running complained about losing its connection to Wayland. It didn't respawn and also didn't log me out.
Does it log you out if you exec it?

Code: Select all

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  exec labwc
fi

User avatar
kent_dorfman766
Posts: 570
Joined: 2022-12-16 06:34
Location: socialist states of america
Has thanked: 69 times
Been thanked: 76 times

Re: minimalist wayland session

#12 Post by kent_dorfman766 »

re - securing the shell...
maybe create an additional "restricted shell" username with same uid and make the shell for that user be the labwc program.

User avatar
wizard10000
Global Moderator
Global Moderator
Posts: 1152
Joined: 2019-04-16 23:15
Location: southeastern us
Has thanked: 121 times
Been thanked: 201 times

Re: minimalist wayland session

#13 Post by wizard10000 »

dlu2021 wrote: 2024-12-03 03:37Does it log you out if you exec it?
No, but it does respawn if you use exec.
we see things not as they are, but as we are.
-- anais nin

User avatar
lobra2
Posts: 6
Joined: 2023-06-25 10:06
Has thanked: 4 times

Re: minimalist wayland session

#14 Post by lobra2 »

Hullo again! It's good see such a "niche" and almost "antiquated" topic as this gets a good discussion going!
I think i got what i need to start messing around with wayland - if and when i will get around to that - from what's been posted.
Next step will be to look up if i can build dwl ( https://codeberg.org/dwl/dwl ), which describes itself as dwm for wayland, in bookworm without too much trouble. Given that, i will now mark this topic as solved.

User avatar
@ttila
Posts: 184
Joined: 2017-12-13 16:57
Has thanked: 3 times
Been thanked: 23 times

Re: minimalist wayland session

#15 Post by @ttila »

wizard10000 wrote: 2024-12-02 19:17
.................
here's the bottom of my ~/.profile which starts labwc if the login is on TTY1 -

Code: Select all

if [[ -z "$DISPLAY" ]] && [[ $(tty) = /dev/tty1 ]]; then
  labwc
fi
Hope this helps -
Interesting solution, you give to me a good idea to remove Sddm. I was tired to see its black screen due to latest 565 beta Nvidia driver.
Now i see a pleasant black "working" console terminal :lol:

Post Reply