Re: Additional Locale Variables for Units and Number Format

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thank you, I think LC_NUMERIC will work for the number formatting, my company is also looking for something along the lines of this, and hoping to use locale/systemd to handle it:

https://lists.freedesktop.org/archives/xdg/2023-August/014659.html

From: systemd-devel <systemd-devel-bounces@xxxxxxxxxxxxxxxxxxxxx> on behalf of systemd-devel-request@xxxxxxxxxxxxxxxxxxxxx <systemd-devel-request@xxxxxxxxxxxxxxxxxxxxx>
Sent: Tuesday, August 29, 2023 6:24 PM
To: systemd-devel@xxxxxxxxxxxxxxxxxxxxx <systemd-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: systemd-devel Digest, Vol 160, Issue 37
 
Send systemd-devel mailing list submissions to
        systemd-devel@xxxxxxxxxxxxxxxxxxxxx

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.freedesktop.org/mailman/listinfo/systemd-devel
or, via email, send a message with subject or body 'help' to
        systemd-devel-request@xxxxxxxxxxxxxxxxxxxxx

You can reach the person managing the list at
        systemd-devel-owner@xxxxxxxxxxxxxxxxxxxxx

When replying, please edit your Subject line so it is more specific
than "Re: Contents of systemd-devel digest..."


Today's Topics:

   1. Re:  Additional Locale Variables for Units and Number Format
      (Mantas Mikul?nas)
   2. Re:  Why are the priorities of stdout and stderr the same
      (Nils Kattenbeck)
   3. Re:  Why are the priorities of stdout and stderr the same
      (Cecil Westerhof)
   4. Re:  oomd wake-up frequency (Christian Hergert)
   5. Re:  Bluetooth in a multiseat (via loginctl) setup
      (Christian Pernegger)


----------------------------------------------------------------------

Message: 1
Date: Tue, 29 Aug 2023 23:19:19 +0300
From: Mantas Mikul?nas <grawity@xxxxxxxxx>
To: TJ Shipp <OneZoomer@xxxxxxx>
Cc: Systemd <systemd-devel@xxxxxxxxxxxxxxxxxxxxx>
Subject: Re: Additional Locale Variables for Units and
        Number Format
Message-ID:
        <CAPWNY8UpK1sXP8AOJxn4fF0GS39f33UWf8tMbQZe4y4pBr+E6w@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

It sounds like you're reinventing LC_NUMERIC.

The locale system has a lot more than just LANG; it already allows the
number format to be overridden separately from the "language". Take a look
at `locale -k LC_NUMERIC` and <
https://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap07.html>.

Adding custom variables would require changing a lot ? I guess the main
consumers are libc (Glibc) and libstdc++ (GCC), but of course there are
many places which set the existing LC_* and expect things to change
accordingly, or which might implement the standard interfaces on their own
without using libc.

On Tue, Aug 29, 2023, 20:17 TJ Shipp <OneZoomer@xxxxxxx> wrote:

> I am trying to add in support for a separate variable to change our unit
> system, and having both LANG and UNITS to identify the "locale" of the
> system.
> We are also not only looking for English versus Metric, but are looking
> for mixed units as well (both Imperial and Metric hybrid), as well as
> looking to add number formats (1,000.00 vs 1.000,00)
>
> And what is the best way to add support for a new system environment
> variable such as UNITS?
>
> P.S. If anyone is interested in contracting to do this work, please send
> me a private message outside this list.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230829/22c38e57/attachment-0001.htm>

------------------------------

Message: 2
Date: Tue, 29 Aug 2023 23:05:28 +0200
From: Nils Kattenbeck <nilskemail@xxxxxxxxx>
To: Cecil Westerhof <cldwesterhof@xxxxxxxxx>
Cc: systemd-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: Why are the priorities of stdout and
        stderr the same
Message-ID:
        <CAKkJDRfpju4wcdaGc3bGYOmiVYu53QhfzbJRVpE9kRARbzPU4g@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="UTF-8"

No, you can use systemd-cat to then invoke your script which applies
to every output of it.

Also, you can just use reply-all in gmail (or even set it as the
default in the settings) to have the correct behaviour of sending
mails also the the mailing list.

On Tue, Aug 29, 2023 at 10:25?PM Cecil Westerhof <cldwesterhof@xxxxxxxxx> wrote:
>
> Aargh, forgot again that gmail works differently when replying. :'-{
>
> Op di 29 aug 2023 om 21:07 schreef Cecil Westerhof <cldwesterhof@xxxxxxxxx>:
>>
>> Op di 29 aug 2023 om 19:47 schreef Nils Kattenbeck <nilskemail@xxxxxxxxx>:
>>>
>>> Hi, At least for simple cases you can use systemd-cat which allows
>>> setting different priorities for stdout and stderr. It even explicitly
>>> states that doing so will lose the ordering guarantees which are only
>>> possible when attaching stdout and stderr to the same fd (as Lennart
>>> said).
>>
>>
>> If I understand it correctly, that is on a statement basis, not for the complete script.
>
>
> --
> Cecil Westerhof


------------------------------

Message: 3
Date: Wed, 30 Aug 2023 00:10:22 +0200
From: Cecil Westerhof <cldwesterhof@xxxxxxxxx>
Cc: systemd-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: Why are the priorities of stdout and
        stderr the same
Message-ID:
        <CAG-LmmAQ368iRxyP2JtcGdGydsq__EWvUh+Wff9kPkG3rETxqA@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

Op di 29 aug 2023 om 23:05 schreef Nils Kattenbeck <nilskemail@xxxxxxxxx>:

> No, you can use systemd-cat to then invoke your script which applies
> to every output of it.
>

OK, I will dive into it.



> Also, you can just use reply-all in gmail (or even set it as the
> default in the settings) to have the correct behaviour of sending
> mails also the the mailing list.
>

I will do that then. Only problem is that the original poster will get the
message two times.
Except when I remove the To. But forgetting to remove that is not as bad as
not sending it to the mailing list.



> On Tue, Aug 29, 2023 at 10:25?PM Cecil Westerhof <cldwesterhof@xxxxxxxxx>
> wrote:
> >
> > Aargh, forgot again that gmail works differently when replying. :'-{
> >
> > Op di 29 aug 2023 om 21:07 schreef Cecil Westerhof <
> cldwesterhof@xxxxxxxxx>:
> >>
> >> Op di 29 aug 2023 om 19:47 schreef Nils Kattenbeck <
> nilskemail@xxxxxxxxx>:
> >>>
> >>> Hi, At least for simple cases you can use systemd-cat which allows
> >>> setting different priorities for stdout and stderr. It even explicitly
> >>> states that doing so will lose the ordering guarantees which are only
> >>> possible when attaching stdout and stderr to the same fd (as Lennart
> >>> said).
> >>
> >>
> >> If I understand it correctly, that is on a statement basis, not for the
> complete script.
>

--
Cecil Westerhof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230830/0f6f32e9/attachment-0001.htm>

------------------------------

Message: 4
Date: Tue, 29 Aug 2023 15:20:06 -0700
From: Christian Hergert <chergert@xxxxxxxxxx>
To: Michal Koutn? <mkoutny@xxxxxxxx>
Cc: systemd-devel@xxxxxxxxxxxxxxxxxxxxx, Anita Zhang
        <the.anitazha@xxxxxxxxx>
Subject: Re: oomd wake-up frequency
Message-ID: <23c2d81f-f6b9-c121-62d7-c0cb85c1aae4@xxxxxxxxxx>
Content-Type: text/plain; charset=UTF-8; format=flowed

On 8/25/23 7:54 AM, Michal Koutn? wrote:
> I think the loop's event source could be disabled when no cgroups
> require swap monitoring [1] (and enabled lazily when such are configured).

FYI I implemented your design this afternoon in case you have some time
to review.

https://github.com/systemd/systemd/pull/29011/commits/4806e203aa64bca942a780c4d92ea0b6b51ddd5c

Thanks!

-- Christian



------------------------------

Message: 5
Date: Wed, 30 Aug 2023 01:24:09 +0200
From: Christian Pernegger <pernegger@xxxxxxxxx>
To: systemd-devel@xxxxxxxxxxxxxxxxxxxxx
Subject: Re: Bluetooth in a multiseat (via loginctl)
        setup
Message-ID:
        <CAKbQEqGYLUZg5sRLncPqGk2_UV3YTZF4=H0oCp-mFZ6GWnbWjg@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

Hello again,

shelving that multiple BT adapters idea for a moment, since that doesn't
seem to be a supported configuration, more's the pity,
the issue with GNOME seems to be that /dev/rfkill doesn't get the right
permissions. It's tagged "uaccess" alright, the intention seems to be that
(active) logged-in users get rw-, but this only actually works on seat0. If
both seats idle at the greeter, gdm (or lightdm) gets rw- via ACL. If I
login at seat0, that ACL is replaced by an identical one for my user, and
the GNOME BT panel works. If I login at seat1 instead, nothing changes,
there's still just the one ACL for the greeter's user (and obviously the
GNOME BT panel is broken).

Obviously I could just override the regular permissions via udev rule, give
it to an "rfkill" group or something, but I'd rather do it properly.

Kind regards,
Christian Pernegger






 I login on seat0, my user gets r


Am Mo., 28. Aug. 2023 um 15:12 Uhr schrieb Christian Pernegger <
pernegger@xxxxxxxxx>:

> Hello all!
>
> Sorry to bother a -devel list with my user troubles, but I don't know
> where (else) to start.
>
> So, Ubuntu 22.04, multiseat setup automagically via loginctl. The only
> thing I had to do extra was disable Wayland in gdm. Works beautifully.
> Except for Bluetooth.
>
> I've one USB port (with an attached hub) attached to seat one. Thought I'd
> just attach a dedicated BT dongle to that hub, done. Turns out BT adapters
> don't show up in the output of loginctl seat-status at all, not the USB one
> on the hub, not the (USB) one integrated into the mainboard. Looking at
> them with udevadm they seem to be tagged correctly, AFAICT.
>
> In GNOME on seat1 it shows my (manually paired) BT keyboard in the system
> dropdown menu, but when I open BT settings it says BT is off, no adapters
> found.
> In GNOME on seat0 the BT settings GUI works, but AFAICT shows the wrong
> adapter.
>
> I'm thinking I may just have the wrong end of the stick entirely--how is
> BT supposed to work with multiseat? Ideally each seat would be able to pair
> and configure its own BT devices in the usual GNOME GUI. But maybe it's
> more of a bluetoothd access control thing than a device assignment one?
>
> Anyway, would appreciate a few pointers,
>
> Kind regards,
> Christian Pernegger
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20230830/bdb00b07/attachment.htm>

------------------------------

Subject: Digest Footer

_______________________________________________
systemd-devel mailing list
systemd-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/systemd-devel


------------------------------

End of systemd-devel Digest, Vol 160, Issue 37
**********************************************

[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux