You are not logged in.

#21 2024-07-25 07:35:55

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

^So labwc is launched for the greeter, then a separate labwc for the user session. Makes sense.

It looks as if none of this would work on X11?

What would be nice to have is a greeter that looks nice, handles various sessions and locales, and is able to launch X11 or Wayland user sessions. No easy task by the look of it.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#22 2024-07-25 07:41:02

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

^it does, I have xfce installed here and it starts fine from nwg-hello

To quote the greetd wiki

What can greetd start?
As a rule of thumb, anything you can start from a TTY can be started by greetd.

All applications are attached to a TTY with the VT in text-mode, so both textual and graphical applications can be used. You can log straight into htop if you want.


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#23 2024-07-25 07:42:55

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

Doesn't nwg-hello need a wayland compositor to run on?


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#24 2024-07-25 08:02:42

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

^Yes.

The upshot is, the current state of *nix GUI login is that a grapical server is absolutely necessary. X or a wayland compositor. Any GUI login *should* be able to start X + wm or a wayland compositor, but the current state of play seems that X has some trouble starting compositors. I can not say 100% if the inverse is also true.

There are some tiny wayland compositors that are designed for kiosk mode, cage is probably the most popular. It is mentioned in the greetd wiki.

There are alternatives to nwg-hello of course. gtk-greet comes to mind but after a quick apt search gtk-greet only lightdm-gtk-greeter shows.

Last edited by micko01 (2024-07-25 08:05:50)


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#25 2024-07-25 08:39:29

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

What would be nice is if we can provide the right-sized bolt-holes for a bolt-on Carbon/Wayland session on an existing Carbon/X11 system, so the user simply has to install bunsen-meta-wayland (or whatever) to see the Wayland session as one of their login options.

So any greeter that needs a wayland compositor to run, would add some apps + dependencies to the default X11 install because our login has to work for both. If it's only a couple, or they're all small, then it might be acceptable to add eg cage or labwc. The extra install size would need to be compared with that of adding possibly the only X11-side option, gdm3, which would pull in a long list of dependencies.

Alternatively, perhaps some scripting could arrange that when a user installs bunsen-meta-wayland then the existing lightdm greeter is replaced by something Wayland-based at that point. It sounds a bit messy, but might possibly be made to work. A disadvantage is that the user login GUI experience would probably have to change then. It would also be necessary to provide a return path to lightdm if bunsen-meta-wayland is uninstalled. Hmm, not an attractive option...

What dependencies would have to be installed on an X11 system to enable nwg-hello? Cage, being so small, might work instead of labwc, just for displaying the login greeter? Then we could ship nwg-hello, greetd and cage in the default Carbon/X11 system too. That would perhaps not be much bulkier - if at all - than the current lightdm + lightdm-gtk-greeter. (Original cage developer Jente Hidskes is a former BL dev btw.)
About Cage by the original developer.

PS Cage is marked for removal from Debian Testing on 23rd August though: https://tracker.debian.org/pkg/cage
Bug with libliftoff: https://bugs.debian.org/cgi-bin/bugrepo … ug=1075180
EDIT 241108 Above two bugs have now been fixed.

Last edited by johnraff (2024-11-08 07:06:58)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#26 2024-07-26 03:05:20

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

Oh yes, Cage isn't the only package scheduled to be removed from Trixie on 23rd August!

libliftoff wrote:

Version 0.4.1-1 of libliftoff is marked for autoremoval from testing on Sat 24 Aug 2024. It is affected by #1075180. The removal of libliftoff will also cause the removal of (transitive) reverse dependencies: cage, fnott, labwc, meta-phosh, papersway, phoc, phog, phosh, phosh-mobile-settings, reform-firedecor, sway, sway-contrib, sxmo-utils, waybar, wayfire, wayfire-shadows, wcm, wf-shell, wlroots. You should try to prevent the removal by fixing these RC bugs.

https://tracker.debian.org/pkg/libliftoff


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#27 2024-07-26 04:08:07

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

^if you read further into the bug report

Problems while searching for a new upstream versionhigh
uscan had problems while searching for a new upstream version:

In debian/watch no matching files for watch line
  https://gitlab.freedesktop.org/emersion/libliftoff/-/tags archive/v?(?:[-_]?[Vv]?(\d[\-+\.:\~\da-zA-Z]*))/.*(?i)(?:\.(?:tar\.xz|tar\.bz2|tar\.gz|tar\.zstd?|zip|tgz|tbz|txz))

.. it looks like debian want to fix their uscan bug! The bug has been fixed for over a month if you look at the upstream source,  and version 0.5.0 was released a month ago.

I'm sure it will be fixed, maybe not by the 24th August though! I notice debian can be a very slow moving machine.


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#28 2024-07-26 05:53:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

I think that's a different bug from #1075180 though, probably #1077049

The uscan/watch file thing needs to be fixed too, but I don't think it's as urgent as "fails to build from source with GCC-14", and my guess is that it wouldn't cause the package to be removed, as #1075180 will.

Does the upstream 0.5.0 now build on CGG-14?
The bug report is tagged: Tags: fixed-upstream, ftbfs, patch, sid, trixie, upstream
so there is a patch available, and the upstream version also fixes it.

Diederik de Haas wrote:

https://gitlab.freedesktop.org/emersion … equests/78 is the
upstream MR which fixes that issue. It has been merged and is part of the 0.5.0
release, which the tracker (apparently) doesn't see, but was tagged on
2024-05-28.

So the best solution seems to package version 0.5.0?

Alternatively, you can add the attached patch.
https://salsa.debian.org/diederik/libli … -14-compat

So let's be optimistic that something will be done soonish!

Last edited by johnraff (2024-07-26 06:02:09)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#29 2024-07-28 05:54:50

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

johnraff wrote:

Lightdm started the Wayland session but it stayed around along with its gtk-greeter, using a fair chunk of RAM between them. The X server was also running as well as labwc, so it's all a bit messy.

Also, I got a double cursor and various other minor bugs.

I've been playing some more with lightdm on a VM which has enough packages to run either a base X11 Carbon, or a Wayland session of the same.

The first issue did not reappear - X server was not running after logging into Wayland session, and lightdm was in the background but inactive, using no CPU and very little RAM, so in principle it should be possible to go on using the lightdm setup in BL Boron (and probably Carbon/X11) to log into a plug-in Carbon/Wayland. lightdm seems to be intended to be usable for launching Wayland: various mentions in the commits.

But there are a number of issues:
1) Some people cannot start a Wayland session with lightdm at all on their hardware:

micko01 wrote:

labwc refuses to start from lightdm (as it is now) on my oldish HP laptop, Pavillion G6; get's stuck in a "login" loop, much as @hhh describes 4 or so posts back.

hhh wrote:

Installing lightdm brings in Xorg, labwc is listed as a session. Pick it!
Choosing labwc, all looks good
...Yeah, scratch that. It only works after a fresh boot for me, after that it just goes back to the login screen.

In fact, that's very close to what I've been getting. The first "bunsenlabs wayland session" logs in fine - very quickly in fact, and micko's sfwbar looks very nice - but log out and back in and it goes to a black screen for a few seconds, then back to the login screen. Reboot and it's OK - the first time. Boot to a tty and start 'bunsenlabs-wayland-session' from there (ie bypass lightdm) and everything's nice. (One time I ended up with the Wayland session on TTY8 not 7, no idea what that was about.)

2) I often - but not always - got a double cursor on Wayland. Logging in through lightdm after a fresh reboot it wasn't there, but just now after running 'bunsenlabs-wayland-session' from a TTY it was. Second time, everything was fine. The situation is more complicated because I'm on a qemu VM. When it's happening, one of the two cursors stays in the VM and the other one slides easily over the border into the host machine. On top of a terminal, one of them turns into a cursor. Perhaps that second one is supposed to be suppressed by qemu when the cursor is inside the VM?

3) The longstanding locales issues come back with lightdm on wayland because files in /etc/X11/xsession.d/ are not sourced on Wayland, and our fix is there.
https://forums.bunsenlabs.org/viewtopic … 102#p27102
https://forums.bunsenlabs.org/viewtopic.php?id=5679
While the general problem of setting up the session on Wayland without xsession.d/* remains, it's possible that other Display Managers might not need as much help with locales as lightdm.

---
So I've cloned the VM I was playing with lightdm on, and I'm now going to try replacing lightdm with greetd+labwc+nwg-hello, following micko's recipe. If that goes OK I'll try replacing labwc with cage...

EDIT 241108 I think issue 2) is related to qemu not LightDM. It definitely looks as if the host cursor is not being switched off when moving into the guest, so there are two. Sometimes. The double-cursor effect sometimes appears in a nwg-hello window too, so it's definitely not LightDM only.

Last edited by johnraff (2024-11-08 07:43:52)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#30 2024-07-28 07:44:28

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

It was very easy to replace labwc with cage for running nwg-hello.
Just edit the command in greetd.conf to:

command = "cage -s -- /usr/bin/nwg-hello"

That's all. No need for anything in /etc/nwg-hello.
(The -s option enables switching TTY so you can fix messups.)

No twin-cursor stuff, no black screens.

This is great news because it means we could ship greetd+cage+nwg-hello as our login stack in default BL/Carbon/X11 cool
The bolt-on Wayland session should then be very easy to add.
I don't think greetd+cage+nwg-hello would be any bulkier than lightdm+lightdm-gtk-greeter.

What remains is to go over the envvars and make sure locales, keyboard layouts etc are handled properly. I don't think users should have to dig into config directories of individual window-managers or compositors just to set their preferred language and keyboard - which were set up by debian-installer anyway for X sessions. But that's another day...

Last edited by johnraff (2024-07-28 11:17:23)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#31 2024-07-28 08:58:07

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

^the reason I used labwc to launch nwg-hello was to reduce depends, but I wasn't considering both scenarios, ie the meta-package. Plus for the exercise as it wan't documented. Is now as I think I previously mentioned in the nwg-hello README.

Anyway, as long as debian can fix libliftoff (recently upgraded to libliftoff0_0.4.1-1+b1_amd64 so I think they're onto it) I think cage should be a viable solution.

BTW, labwc since 0.7.3 has added some great features, like a magnifier, tablet support, better window rules and a host of bugfixes and features. 0.7.4 was strictly bugfixes. Dev now is concentrated on 0.8.0 which is based on the next major upgrade to wlroots. It will get proper workspace support by the look of things and peripheral apps such as waybar and sfwbar are along for the ride thanks to @Consolatis, @malm's 'right hand man' (just IMO - but he's been around the longest, along with @jlindgren90).

I really do have to upgrade my slackware-current Frankenstein install on my main laptop so I can keep up with labwc development .

But in saying that I will concentrate my effort here smile including updating configs for said magnifier and window rules for latest stable labwc. We might make history here by being the first distro to ship labwc OOTB.


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#32 2024-07-28 09:21:44

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

For a stand-alone Wayland-only setup then labwc is already available so there's no need to add another compositor.

But I'm looking at it from the X11 point of view, where cage looks like a much smaller install than labwc if it's just for something to run the greeter. Viewed from the Wayland side cage is an extra install, but it's very small.

micko01 wrote:

libliftoff (recently upgraded to libliftoff0_0.4.1-1+b1_amd64 so I think they're onto it)

Sid is still on 0.4.1-1 and a +b1 suffix doesn't usually mean any more than doing another build on the same contents. There's no fresh info on the bug report or package tracker page. But considering it would also bring down labwc and wlroots, among others, I expect somebody will squash that bug, as it's quite clearly spelled out.

---
As I posted at the start of this thread, I don't think we'll be likely to release a Wayland-only BL Carbon - rather an optional addon for the X11 system. Even being able to install a single package to get an optional Wayland session will be quite cool. smile


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#33 2024-07-28 11:34:11

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

johnraff wrote:

Sid is still on 0.4.1-1 and a +b1 suffix doesn't usually mean any more than doing another build on the same contents.

probably rebuilt with gcc-14.

Aside from that I have the magnifier in labwc working. Handy feature for we older folk.

draft rc.xml

<?xml version="1.0"?>
<labwc_config>
  <core>
    <decoration>server</decoration>
    <gap>0</gap>
    <adaptiveSync>no</adaptiveSync>
    <allowTearing>no</allowTearing>
    <reuseOutputMode>no</reuseOutputMode>
  </core>
  <placement>
    <policy>automatic</policy>
  </placement>
  <theme>
    <name>Boron-aqua</name>
    <cornerRadius>6</cornerRadius>
    <font>
      <name>sans</name>
      <size>10</size>
      <slant>normal</slant>
      <weight>normal</weight>
    </font>
    <dropShadows>yes</dropShadows>
  </theme>
  <resize popupShow="Always"/>
  <desktops number="4"/>
  <regions>
    <region name="right" x="50%" y="0%" height="100%" width="50%"/>
    <region name="left" x="0%" y="0%" height="100%" width="50%"/>
  </regions>
  <keyboard>
    <numlock>on</numlock>
    <layoutScope>global</layoutScope>
    <repeatRate>25</repeatRate>
    <repeatDelay>600</repeatDelay>
    <keybind key="A-Tab">
      <action name="NextWindow"/>
    </keybind>
    <keybind key="A-F1">
      <action name="ShowMenu" menu="root-menu"/>
    </keybind>
    <keybind key="A-F2">
      <action name="Execute" command="tofi-drun"/>
    </keybind>
    <keybind key="W-l">
      <action name="Execute" command="wlogout"/>
    </keybind>
    <keybind key="W-m">
      <action name="ToggleMagnify"/>
    </keybind>
    <keybind key="C-A-t">
      <action name="Execute" command="lxterminal"/>
    </keybind>
    <keybind key="Print">
      <action name="Execute" command="grim"/>
    </keybind>
    <keybind key="A-Print">
      <action name="Execute">
        <command>bash -c "grim -g \"`slurp`\""</command>
      </action>
    </keybind>
    <keybind key="C-A-Delete">
      <action name="Execute">
        <command>lxterminal -e "top"</command>
      </action>
    </keybind>
    <keybind key="C-A-Backspace">
      <action name="Execute" command="blw-exit"/>
    </keybind>
    <keybind key="C-l">
      <action name="GoToDesktop" to="left" wrap="yes"/>
    </keybind>
    <keybind key="C-r">
      <action name="GoToDesktop" to="right" wrap="yes"/>
    </keybind>
    <keybind key="C-A-r">
      <action name="SnapToRegion" region="right"/>
    </keybind>
    <keybind key="C-A-l">
      <action name="SnapToRegion" region="left"/>
    </keybind>
    <keybind key="A-l">
      <action name="SendToDesktop" to="left" wrap="yes"/>
    </keybind>
    <keybind key="A-r">
      <action name="SendToDesktop" to="right" wrap="yes"/>
    </keybind>
    <keybind key="W-u">
      <action name="ZoomIn"/>
    </keybind>
    <keybind key="W-d">
      <action name="ZoomOut"/>
    </keybind>
  </keyboard>
  <mouse>
    <doubleClickTime>500</doubleClickTime>
    <scrollFactor>2.0</scrollFactor>
    <default/>
    <context name="Root">
      <mousebind button="Left" action="Press">
        <action name="ShowMenu" menu="none"/>
      </mousebind>
      <mousebind button="Right" action="Press">
        <action name="ShowMenu" menu="root-menu"/>
      </mousebind>
      <mousebind button="Middle" action="Press">
        <action name="ShowMenu" menu="none"/>
      </mousebind>
      <mousebind direction="Up" action="Scroll">
        <action name="GoToDesktop" to="left" wrap="yes"/>
      </mousebind>
      <mousebind direction="Down" action="Scroll">
        <action name="GoToDesktop" to="right" wrap="yes"/>
      </mousebind>
    </context>
    <context name="Title">
      <mousebind button="A-Left" action="Click">
        <action name="SnapToRegion" region="left"/>
      </mousebind>
      <mousebind button="A-Right" action="Click">
        <action name="SnapToRegion" region="right"/>
      </mousebind>
    </context>
  </mouse>
  <libinput>
    <device category="default">
      <naturalScroll>no</naturalScroll>
      <leftHanded/>
      <pointerSpeed/>
      <accelProfile/>
      <tap>yes</tap>
      <tapButtonMap/>
      <middleEmulation/>
      <disableWhileTyping/>
    </device>
  </libinput>
  <windowRules>
    <windowRule identifier="dialog-*" matchOnce="false">
      <action name="MoveTo" x="760" y="490"/>
      <action name="ResizeTo" width="400" height="100"/>
    </windowRule>
    <windowRule identifier="preferences-*" matchOnce="false">
      <action name="MoveTo" x="685" y="353"/>
      <action name="ResizeTo" width="550" height="375"/>
    </windowRule>
  </windowRules>
  <magnifier>
    <width>400</width>
    <height>400</height>
    <initScale>2.0</initScale>
    <increment>0.2</increment>
    <useFilter>true</useFilter>
  </magnifier>

</labwc_config>

Also can make a pipe-menu for it if that's of any use, at least a menu entry would be with keybinds for zoom in/out.

3kQo97Lt.png


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#34 2024-07-28 12:21:18

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

micko01 wrote:
johnraff wrote:

Sid is still on 0.4.1-1 and a +b1 suffix doesn't usually mean any more than doing another build on the same contents.

probably rebuilt with gcc-14.

It doesn't build on gcc-14, which is the bug! To fix it, either an upgrade to 0.5 or a patch, which would mean a debian version bump like 0.4.1-2 or something, would be needed.

Aside from that I have the magnifier in labwc working. Handy feature for we older folk.

Very nice!

Does the labwc menu do pipemenus OOTB? Syntax same as openbox?

We might make history here by being the first distro to ship labwc OOTB.

That would be kind of cool in fact. Especially since Johan is a BL developer.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#35 2024-07-29 05:53:26

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

Should be a moot point about libliftoff0 now as the debian/watch file is patched - bung regex! patch

0.5.0-1.1 is now available in sid so should filter down to tixie well before the deadline.


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#36 2024-07-29 06:22:56

micko01
void main()
From: Queensland, Australia
Registered: 2024-04-07
Posts: 492
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

Does the labwc menu do pipemenus OOTB? Syntax same as openbox?

Yes, almost the same. Some minor differences I believe.

We might make history here by being the first distro to ship labwc OOTB.

That would be kind of cool in fact. Especially since Johan is a BL developer.

Absolutely! Was my original thought when landing here at bunsenlabs smile


#!/bin/sh
echo '#include <stdio.h>\nvoid main() { printf("Hi, bunsenlabs\\n"); return; }' > bunsen.c
gcc bunsen.c -o bunsen
./bunsen

Offline

#37 2024-07-30 07:07:25

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

I was looking at man labwc the other day - it has a --session option which means the config directory /etc/nwg-hello/lab-config can be omitted if you don't need any special keybinds. Like this in greetd.conf:

command = "labwc --session /usr/bin/nwg-hello"

The greeter labwc will be killed when nwg-hello exits.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#38 2024-08-01 07:39:23

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

environment variables in the user session

Just a title post for now (and an assertion that I haven't been sleeping the last couple of days).

Some things like the user's preferred language  and the machine's keyboard layout are set by Debian-Installer early in the install process - at the system level. In an X11 session these are automatically passed on to the user session by the xsession scripts, but on Wayland often seem to be "left for the compositor to deal with". After 17 years of Wayland development, there still seems to be no universal standard to tell compositors to do the right thing, so distros and DEs have to hack together their own workarounds. Yesterday I had a look at a newly installed Debian Gnome system, and spent some time wandering round the interwebs looking for other hints...


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#39 2024-08-01 08:05:56

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

user preferred language - "locale"

The locale ($LANG, $LANGUAGE environment variables, and friends) can be set in so many places. roll

Anyway, what we want after logging in, I guess:

If $user LANG is set in some user config file (which one gets priority?),
    then export it to the environment
Else if LANG is already in the environment,
    then stay with that
Else if LANG is set in one of some possible system files (priority?),
    then export that
Else
    fall back to C.UTF-8 or POSIX

.dmrc? accountsservice? ~/.profile? ~/.xsessionrc? ~/.config/bunsen/environment-wayland? ~/.config/locale.conf? ~/.locale.conf? ~/.enviroment?

We've been in this zone before: https://forums.bunsenlabs.org/viewtopic.php?id=5679

???

Last edited by johnraff (2024-08-01 08:11:50)


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

#40 2024-08-02 09:55:01

johnraff
nullglob
From: Nagoya, Japan
Registered: 2015-09-09
Posts: 12,553
Website

Re: Organizing the Carbon BunsenLabs sessions for Wayland and X11

locale continued...

A few more random references:
https://www.debian.org/doc/manuals/debi … the_locale
https://unix.stackexchange.com/question … ult-locale
Where do lightdm and lightdm-gtk-greeter store session & locale?
https://forums.bunsenlabs.org/viewtopic … 79#p101979

man locale.conf
localectl status # quick check of current system language and keyboard

When Debian-Installer starts a new installation the first questions it asks are what language and keyboard to use.
The language ($LANG) is put in /etc/default/locale (from Trixie this is a symlink to /etc/locale.conf) and keyboard settings are written in /etc/default/keyboard. On X11 for the keyboard that's enough, but on Wayland there's a bit more work to do (a later post).

The first time a user logs in on a system with LANG set in  /etc/default/locale, that locale becomes their locale, see by running:

locale

Good. That will be enough for most people, but some might want to enable another locale

sudo dpkg-reconfigure locales

because there's a second user who speaks eg German or Lao.

Lightdm provides a language selection widget at the login screen, but that will possibly not be available on whatever greeter we end up using on Carbon. Gnome runs a bl-welcome style script on first login with a "choose your language" page - at first I thought we could add one to bl-welcome, but that's really for system setup, and only sudo users can see it.

Maybe our best bet would be to let the default system LANG be passed into the user session, and users who want a different language can use our existing bl-setlocale utility? We still need to decide what file to write the user's choice of LANG into however: ~/.dmrc looks like a specific lightdm and gdm thing.


...elevator in the Brain Hotel, broken down but just as well...
( a boring Japan blog (currently paused), now on Bluesky, there's also some GitStuff )

Introduction to the Bunsenlabs Boron Desktop

Offline

Board footer

Powered by FluxBB