Re: inconsistency in the symlinks under /etc/systemd

2024-04-10 Thread David Wright
On Wed 10 Apr 2024 at 12:33:21 (+0200), Vincent Lefevre wrote:
> On one machine, I have
> 
> lrwxrwxrwx 1 root root 35 2023-10-07 13:43:24 
> /etc/systemd/system/sockets.target.wants/dm-event.socket -> 
> /lib/systemd/system/dm-event.socket
> 
> and on another one, I have
> 
> lrwxrwxrwx 1 root root 39 2024-01-05 16:54:09 
> /etc/systemd/system/sockets.target.wants/dm-event.socket -> 
> /usr/lib/systemd/system/dm-event.socket
> 
> These symlinks were created at Debian installation time, and in
> both cases, the dmeventd version is 2:1.02.196-1+b1.
> 
> Shouldn't the system ensure that symlinks are consistent on different
> machines (even though the above symlinks are equivalent), for instance
> to ease the comparison of configurations between machines?
> 
> For instance, shouldn't usr-is-merged convert the symlinks to a
> canonical path?

No, that's the role of usrmerge. All usr-is-merged does is check
whether usr /is/ merged already and, if it isn't, report the fact
and fail to install. The only code in usr-is-merged is its preinst.

There's an FAQ in /usr/share/doc/usrmerge/README.Debian.

Cheers,
David.



Re: network-priority?

2024-04-04 Thread David Wright
On Thu 04 Apr 2024 at 19:11:31 (+0200), Hans wrote:
> again an easy thing, I did not understand and where I did not find a clear 
> answer in the web.
> 
> Question:
> 
> In network-manager I find "network-priority" set to "0". 
> 
> Is zero the highes priority or the lowest? 

This might be what you mean:

autoconnect-priorityint32   0   The autoconnect priority.
If the connection is set to autoconnect, connections with higher
priority will be preferred. Defaults to 0. The higher number
means higher priority.

from
https://developer-old.gnome.org/NetworkManager/stable/settings-connection.html

(I don't know the significance of -old.)

> Lets imagine, i have 3 wifi (wifi-1, wifi-2 and wifi-3).  
> wifi-1 one should be the first, I want to connect, then wifi-2 and last 
> wifi-3.
> 
> How it is to set? 
> 
> wifi-1 = 0
> wifi-2 = 1
> wifi-2 = 2
> 
> or 2,1,0?

The latter. I assume you'll choose better names and avoid the typo.
You might prefer higher numbers, leaving zero for the default;
say 30, 20, 10.

Cheers,
David.



Re: readonly installer, (SOLVED)

2024-04-03 Thread David Wright
On Tue 02 Apr 2024 at 05:54:06 (-0700), David Christensen wrote:
> On 4/1/24 11:35, DdB wrote:
> > Am 01.04.2024 um 18:52 schrieb David Christensen:
> > > A bad USB flash drive would explain why you cannot boot the Debian
> > > installer.  Please buy a good quality USB 3.0+ flash drive and try again.
> > 
> > A friend of mine just let me use an external CD-Drive with the netboot
> > image.
> 
> I thought about suggesting that in my last post, but did not want to
> complicate things.  A key advantage of using a CD-R disc is that you
> can verify the disc contents and/or checksum against the ISO and/or
> checksum now and in the future.  This is not true for a USB flash
> drive, because the Debian installer modifies the contents of the USB
> flash drive when it runs.

If this troubles you, you can also use an SD card with a write-lock,
or a µSD card with a lock on the SD adaptor.

Check that the write-lock works with the logs when you plug it in,
or run fdisk/gdisk and immediately quit.

Cheers,
David.



Re: Debian 12.5 up-to-date Xfce, Firefox clings to USB stick

2024-03-31 Thread David Wright
On Sun 31 Mar 2024 at 09:42:37 (+0300), Antti-Pekka Känsälä wrote:
> I'm mounting and unmounting through the stick icon's menu on Xfce desktop.
> Maybe a fancy file chooser dialogue stays around analyzing the directory,
> as you suspect? But I'm worried my Gmail in Firefox is capable of stealing
> files off my USB stick.

I've no answer for that, particularly in view of Max's reply
to my previous post.

I've always copied files to and from USB sticks, floppy disks, CDs,
etc), using the hard disk as a staging area. That habit developed
thirty years ago on account of (other's) experience with Windows,
and the "stickiness" of its file choosers. This could lead to
problems when you attempted to renavigate to files, but hadn't got
the same devices plugged in as previously.

That's not much help to you because by doing that, you'd merely be
exposing your hard drive instead for analysis, to Firefox, or
worse, possibly to Gmail.

I run two instances of Firefox as a matter of course. One user's
instance is used for banking and other administrative tasks.
The other user's is for everything else. The latter is unable
to read any of the former's files. (Some people use different
machines to the same end.)

Cheers,
David.



Re: help needed to get a bookworm install to succeed

2024-03-31 Thread David Wright
On Sun 31 Mar 2024 at 11:18:30 (+0200), DdB wrote:

> Already before assembling the hardware, grub was working from the SSD,
> which got lvm partitioning and is basically empty. As i have no working
> CD drive nor can this old machine boot from USB, i put an ISO for
> bookworm onto an lvm-LV. Using grub, i can manually boot from that ISO
> and see the first installer screens. But after asking some questions,
> the installer wants to mount the external media (ISO), and does not find
> it on sd[a-z], then aborts.
> By switching to Desktop 4, i can see the attempt to search for the
> "CD"-drive, which is bound to fail.
> I am not familiar with the very restricted shell, that is available from
> the installer (busybox) and have not yet found an approach to circumvent
> my problems. i would like to use the installer, as debootstrapping would
> necessitate alot more knowledge than mine.

My memory of doing this is rusty, as it's a while since my
Seattle2 machine finally expired. I would try downloading the
kernel¹ and initrd from:

  
http://http.us.debian.org/debian/dists/bookworm/main/installer-amd64/current/images/netboot/debian-installer/amd64/

as these can search for the ISO in a greater range of locations.
I'd copy the two files onto the hard disk, and use an entry like:

  menuentry "Install Debian via HTTP" {
search --no-floppy --label --set=root noah03
linux   /boot/linux priority=low
initrd  /boot/initrd.gz
  }

in Grub to boot it. (Add a custom entry, or just edit a preexisting
entry to suit. BTW I use LABELs on my disks.) Make sure the kernel
versions are the same for those two files and the ISO.

https://www.debian.org/releases/bookworm/amd64/apas02.en.html#howto-getting-images-hard-disk
https://www.debian.org/releases/bookworm/amd64/ch05s01.en.html#boot-initrd
https://www.debian.org/releases/bookworm/amd64/ch04s04.en.html

¹ I see linux, rather than vmlinuz, at that location now.

Cheers,
David.



Re: Debian 12.5 up-to-date Xfce, Firefox clings to USB stick

2024-03-30 Thread David Wright
On Sat 30 Mar 2024 at 21:06:27 (+0200), Antti-Pekka Känsälä wrote:
> I was able to replicate this, by trying to send gmail to myself in Firefox,
> attaching a binary on a mounted USB stick.

Did you mount the stick yourself as a user (ie there's an
fstab entry for it), or as root, or does an automounter
mount it for you?

> After the attachment supposedly
> was uploaded, I tried to unmount the stick, but it blocks. "lsof | grep -i
> KINGSTON" then shows a total of 129 lines from "x-www-browser". This lasted
> for about a minute, then the drive unmounted by itself.

This is the behaviour I see, where (1) inserting a stick creates
a mountpoint and (2) that mountpoint is referenced in /etc/fstab:

After typing Ctrl-O in Firefox, I navigate to /media/foo (the
mountpoint that was created). Double-clicking on the directory
mounts it and displays the files in it. Opening a text file
displays it. At least for a small file, FF does not hold the
file open, so I can immediately unmount the stick. That may
differ if, for example, a mail MUA or MTA is taking a lot of
time to process an attached file.

So I suspect you may be relying on an automounter to mount the
stick, and you have to wait for a period of inactivity to time
out before it decides you've probably finished with it.

Cheers,
David.



Re: making Debian secure by default

2024-03-29 Thread David Wright
On Fri 29 Mar 2024 at 10:31:09 (+0100), Emanuel Berg wrote:
> David Wright wrote:
> 
> >> Ah, surely it can't refer to that as that would be
> >> completely ridiculous as it would imply "wanna install
> >> stuff? sure, but then it isn't secure anymore".
> >
> > It's not clear what "isn't secure anymore" means. [...]
> 
> It means as soon as you start doing stuff with the software,
> it isn't secure anymore.

As you wrote. But software isn't just "secure" or "not secure",
all or nothing. Security, in any aspect of life, is gradational.

> Which is comical to some extent as
> doing stuff is the purpose of computers.
> 
> So to base security boasting on people having the most
> minimal, restricted and inactive system, it is like boasting
> this marvelous piece of body armor is guaranteed to not have
> a single infantryman killed - just don't go to war.

You don't expect people working at HQ to get shot or blown up,
but that is a more likely fate for those fighting at the front.
As well as variations with seniority and physical position,
there will be temporal variations, just like in civilian life,
1 through 5 or green through red etc.

> (Note that now I'm just making fun at the slogan and boasting,
> not saying anything negative of their OS necessarily - I've
> used it myself, it send pretty good and, indeed, secure.)
> 
> >  "Secure by Default"
> >
> >  "To ensure that novice users of OpenBSD do not need to
> >   become security experts overnight (a viewpoint which other
> >   vendors seem to have), we ship the operating system in
> >   a Secure by Default mode. All non-essential services are
> >   disabled. As the user/administrator becomes more familiar
> >   with the system, he will discover that he has to enable
> >   daemons and other parts of the system. During the process
> >   of learning how to enable a new service, the novice is
> >   more likely to learn of security considerations."
> >
> > from https://www.openbsd.org/security.html
> > OTOH:
> >
> >  "There are many applications one might want to use on an
> >   OpenBSD system. To make this software easier to install
> >   and manage, it is ported to OpenBSD and packaged. The aim
> >   of the package system is to keep track of which software
> >   gets installed, so that it may be easily updated or
> >   removed. In minutes, a large number of packages can be
> >   fetched and installed, with everything put in the
> >   right place."
> >
> >  "The ports collection does not go through the same thorough
> >   security audit that is performed on the OpenBSD base
> >   system. Although we strive to keep the quality of the
> >   packages high, we just do not have enough resources to
> >   ensure the same level of robustness and security."
> >
> > from https://www.openbsd.org/faq/faq15.html (Package
> > Management).
> 
> The more you install, the less secure it gets. Yeah, can't
> base the security model on that.

Not a base; it's just inevitable, both in software and life.
You're increasing your attack surface as you install and use
more software, just like driving, visiting bars, attending
concerts, or going on foreign or adventure holidays.

> They should do it the other way around, write a piece of
> software that breaks everything. Install in on OpenBSD and if
> it breakes it, OpenBSD is not more secure than anyone else.
> If nothing happens tho most likekly you are safe.

I don't know about OpenBSD specifically, but in general it's
already done, by such methods as exposing software to malicious
and random inputs, corner cases, and so on. That doesn't have
to mean it's done /instead of/ auditing.

Cheers,
David.



Re: Could Gnome's "install pending software updates" cause installation scripts to misbehave?

2024-03-29 Thread David Wright
On Fri 29 Mar 2024 at 11:06:45 (-0400), Henning Follmann wrote:
> On Fri, Mar 29, 2024 at 12:01:27PM +0100, Lucas B. Cohen wrote:
> > 
> > I've had a bit of a headache understanding why my Debian bookworm system
> > suddenly panicked at boot with an 'unable to mount root fs' error. Turns out
> > the first of my two menuentries in grub.cfg were no longer specifying the
> > linux root by its device UUID (as I was expecting it to do, by honoring
> > GRUB_DISABLE_LINUX_UUID != true) ; instead these menuentries were using the
> > device node/file (/dev/md0 in this case, hence the kernel panic).
> 
> Was there any error message during the update?
> I think what might have gone wrong, that you ran out of space on /boot.
> 
> > I've poured through the grub scripts a bit but they're quite complex. I've
> > noticed that :
> 
> Yeah, don't do that. These files are all automatically managed.
> All changes should be done in /etc/default/grub or in the config files in
> /etc/default/grub.d
> Then the grub config files are created by running
> update-grub
> 
> > - uninstalling the second of two kernels caused the remaining one to
> > correctly use the device UUID in grub.cfg ;
> 
> and that might have freed enough space on /boot.
> So now everything works again :)
> 
> > - reinstalling that second kernel caused grub.cfg to use UUIDs in all
> > menuentries, as expected.
> > 
> > (Kernel were the two most recent stable ones: 6.1.0-17 and -18.)
> > 
> > This leads me to suspect that my grub.cfg might have been damaged in the way
> > described above because update-grub might have been called in some unusual,
> > limited execution environment. I'd very recently powered off my system and
> > let the default "install pending software updates" option checked by
> > accident, which caused every updated package from the 12.5 release mark to
> > be pulled. I'm guessing that linux-image-6.1.0-18 was part of it.

I'd write "upgraded" rather than "pulled", if that's what you meant.

> > Has anyone witnessed something similar? Would anyone here care to check this
> > somehow? Or should I open a bug against gnome-desktop without waiting?
> >
> Usually it requires some trickery to install a new kernel on machines which
> might not have enough remaining space on the boot partition.
> 
> For simple housekeeping it often is sufficient to run 
> apt autoremove
> after recent updates (after you confirmed that the newly installed kernel
> boots fine).
> That usually frees enough space for a possible new update. 

You can also reduce the space taken up by initrd files, which are
getting rather large nowadays if they are built with MODULES=most
rather than MODULES=dep.

When you have at least two working kernels, remove any unnecessary
backups, copy the older kernel's initrd somewhere else, then rebuild
it with MODULES=dep. If that kernel still boots ok, then you probably
have a lot more room available now for the next kernel upgrade.
Finally, reboot the newer kernel.

Cheers,
David.



Re: making Debian secure by default

2024-03-28 Thread David Wright
On Thu 28 Mar 2024 at 12:36:56 (+0100), Emanuel Berg wrote:
> Michael Kjörling wrote:
> 
> >> "Secure by default" is an OpenBSD slogan BTW. Or they have
> >> made it into one at least. But I'm not sure it is any more
> >> secure than Debian - maybe.
> >> 
> >>   https://www.openbsd.org/security.html
> >
> > If I'm not mistaken, OpenBSD is "secure by default" by being
> > "extremely minimalistic by default".
> >
> > Last I looked, which in fairness was a while ago, a default
> > installation of OpenBSD includes almost nothing that normal,
> > present-day users would expect to find on their system. [...]
> 
> Ah, surely it can't refer to that as that would be completely
> ridiculous as it would imply "wanna install stuff? sure, but
> then it isn't secure anymore".

It's not clear what "isn't secure anymore" means. But anyway,

 “"Secure by Default"

 “To ensure that novice users of OpenBSD do not need to become
  security experts overnight (a viewpoint which other vendors seem to
  have), we ship the operating system in a Secure by Default mode.
  All non-essential services are disabled. As the user/administrator
  becomes more familiar with the system, he will discover that he has
  to enable daemons and other parts of the system. During the process
  of learning how to enable a new service, the novice is more likely
  to learn of security considerations.”

from https://www.openbsd.org/security.html
OTOH:

 “There are many applications one might want to use on an OpenBSD
  system. To make this software easier to install and manage, it is
  ported to OpenBSD and packaged. The aim of the package system is to
  keep track of which software gets installed, so that it may be easily
  updated or removed. In minutes, a large number of packages can be
  fetched and installed, with everything put in the right place.

 “The ports collection does not go through the same thorough security
  audit that is performed on the OpenBSD base system. Although we
  strive to keep the quality of the packages high, we just do not have
  enough resources to ensure the same level of robustness and
  security.”

from https://www.openbsd.org/faq/faq15.html (Package Management).

Cheers,
David.



Re: trying to parse lines from an awkwardly formatted HAR file ...

2024-03-26 Thread David Wright
On Sat 23 Mar 2024 at 11:55:04 (-0400), Greg Wooledge wrote:
> On Sat, Mar 23, 2024 at 09:54:05AM -0500, Albretch Mueller wrote:
> >  a) using a chromium-derived browser, which can be used to dump the
> > HAR file log of the network back and forth, go, e. g.:
> >   https://en.wikipedia.org/wiki/Anaxagoras
> >  b) click on the link that says: "Works by or about Anaxagoras" (at
> > Internet Archive)
> >  c) on the archive.org page, select "texts" and "always available"
> > (meaning text which is public domain, he died 25 centuries ago)
> >  d) then to produce the HAR file, go:
> >  d.1) More Tools > Developer Tools;
> >  d.2) click on "Network" tab;
> >  d.3) Filter: GET
> >  d.4) check: "Preserve Log"
> >  d.5) scroll down the page all the way to make the client-server back
> > and forth cascade
> >  d.6) save the network log as HAR file to then open and eyeball it!
> 
> This is incomprehensible to me.  What the hell is d.5 supposed to be?
> Even if I close the Shift-Ctrl-I window, and Ctrl-R to reload the page,

Some web pages don't load completely unless you scroll down them,
whereupon more of the page is loaded. Even if you press End, you may
not get the whole page loaded. One method of completion is to
repeatedly press End and PageUp until no more content appears
(or you observe some sort of bottom-of-page indication).

You'll recognise this if you shop with Kroger™/Dillons™/Fry's™
( in the US).

Ctrl-R is of no help: it can merely reload as much of the page as has
been visited so far. So there is some method in their madness (for
this one step—I don't know about the rest).

> and then reopen Shift-Ctrl-I, and click the down-arrow-in-a-dish icon
> whose tooltip says "Export HAR..." all I get in the resulting file
> is this:

Cheers,
David.



Re: testing new sdm drive

2024-03-26 Thread David Wright
On Tue 26 Mar 2024 at 04:38:52 (-0400), gene heskett wrote:
> On 2/9/24 20:36, Alexander V. Makartsev wrote:
[ … ]
> > It's not possible for me to know what went wrong.
> > Have you created "reftestfile" inside "/mnt/disktest" directory?
> > How many "testfile*" files, if any, were created on the filesystem
> > mounted at "/mnt/disktest"?
> > Was there anything relevant in the syslog about "sdm" drive after the test?
> > If you'd followed my instructions step by step, you'd end up
> > inside "/mnt/disktest" directory and for the last step all you had
> > to do is copy and paste that one-liner 'for' loop into the command
> > line.
> > It's a long line and it really meant to be copied and pasted not
> > typed by hand, and also to give you the idea of the process, so
> > you could adjust it if needed.
> > I've tested it again on my computer and it worked as expected,
> > synchronously created "testfiles" inside current directory and
> > calculated their hashes one by one.
> > 
> And by now, I've forgotten what it was that we were trying to
> accomplish.  One of the hazards of my next b-day being the 90'th.
> Sorry. Or t-bird is messing  with my mind by reserectiing older messages.

You seem to have mislaid your first reply to Alexander, at:
  https://lists.debian.org/debian-user/2024/02/msg00422.html
which appears to show that the drive was a dud 64GB disk, and
not 2TB in capacity.

Cheers,
David.



Re: Debian 11 PHP 7.4 – Mysql 8 - Can’t get Mysqli_connect to work

2024-03-26 Thread David Wright
On Tue 26 Mar 2024 at 09:43:37 (-0400), Cindy Sue Causey wrote:
> On Tue, Mar 26, 2024 at 6:04 AM Bernard  wrote:
[ … ]
> > $ php -m | grep mysqli
> >
> > "If the MySQLi extension is enabled, we’ll see mysqli in the output. 
> > Otherwise, the output will be empty."
> >
> > php -m grep mysqli
> >
> > PHP Warning:  PHP Startup: Unable to load dynamic library 
> > '//usr/lib/php/20190902/mysqli.so' (tried: //usr/lib/php/20190902/mysqli.so 
> > (//usr/lib/php/20190902/mysqli.so: undefined symbol: mysqlnd_global_stats), 
> > /usr/lib/php/20190902///usr/lib/php/20190902/mysqli.so.so 
> > (/usr/lib/php/20190902///usr/lib/php/20190902/mysqli.so.so: cannot open 
> > shared object file: No such file or directory)) in Unknown on line 0
> > PHP Warning:  PHP Startup: Unable to load dynamic library 'mysqli' (tried: 
> > /usr/lib/php/20190902/mysqli (/usr/lib/php/20190902/mysqli: cannot open 
> > shared object file: No such file or directory), 
> > /usr/lib/php/20190902/mysqli.so (/usr/lib/php/20190902/mysqli.so: undefined 
> > symbol: mysqlnd_global_stats)) in Unknown on line 0
> > mysqli
> 
> Just observing out loud: What's generating that double slash, i.e. "//usr,"
> in the start of the message? That seems like a possible show stopper.

At a glance, the first warning looks like it might be the
unsophisticated concatenation and substitution of paths,
without regard for either leading and trailing delimiters
or filename extensions:

  null plus /usr/lib/php/20190902/mysqli.so

  /usr/lib/php/20190902/ plus /usr/lib/php/20190902/mysqli.so plus .so
  ---
substitution ↗

The second warning looks more significant, but mysqli is outside my
area of knowledge. Nonetheless, "mysqli" was seen in the last line,
though without any context: grep might be helped along by -A and -B.

Cheers,
David.



Re: while rtfming crypttab

2024-03-19 Thread David Wright
On Tue 19 Mar 2024 at 13:09:55 (-0400), Henning Follmann wrote:
> On Tue, Mar 19, 2024 at 03:33:13PM +, fxkl4...@protonmail.com wrote:
> > i saw several instances of
> > "This option is ignored for initramfs devices and specific to the Debian 
> > crypttab format. It's not supported by systemd."
> > since i'm using debian and systemd are these options ignored or used
> 
> You have to be better describing your issues.

AIUI, for bullseye, the answer lies in the first sentence
matching 'debian' in man crypttab:

 "This manpage covers Debian's implementation for initramfs scripts
  and SysVinit init scripts."

So the Debian options are not used by systemd, but it
only promises a best-effort as to whether the rest of
the options do apply to systemd. As it says:

 "if in doubt, better check the systemd crypttab(5)
  manpage, e.g. online at
  https://www.freedesktop.org/software/systemd/man/crypttab.html.";

I don't know about bookwork: I only use crypttab for
swap nowadays.

Cheers,
David.



Re: After installing no access to the installed system.

2024-03-18 Thread David Wright
On Mon 18 Mar 2024 at 17:31:24 (+0100), Marco Moock wrote:
> Am 18.03.2024 um 16:17:55 Uhr schrieb Thomas Schweikle:
> 
> > EFI. While not installing grub, no boot entry is created too.
> 
> This is to be expected.
> 
> > It seems the installer fails silently at some point, after having
> > installed all packages. Maybe it fails installing grub?
> 
> This doesn't explain the users not being set up.

My installer logs show Grub being installed before the
users are set up.

> Can you go to the other virtual consoles to investigate the situation?
> Maybe there is an error message.

There should be /var/log/installer/syslog on the newly installed
filesystem.

Cheers,
David.



Re: /boot/grub/grub.cfg hex number reference

2024-03-13 Thread David Wright
On Wed 13 Mar 2024 at 18:59:30 (+), Gareth Evans wrote:
> On Wed 13/03/2024 at 12:50, Michel Verdier  wrote:
> > On 2024-03-13, Gareth Evans wrote:
> >
> >> That suggests perhaps something to do with an FS UUID, but it doesn't seem 
> >> to appear in the output of any of
> >>
> >> # blkid
> >
> > Here I have them shown as UUID by blkid
> >
> > # grep root /boot/grub/grub.cfg 
> > ...
> > search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 
> > --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  
> > 5210342e-548e-4c4d-a0e9-a5f6d13888d6
> > ...
> >
> > # blkid|grep -i 5210342e
> > /dev/sdb2: UUID="5210342e-548e-4c4d-a0e9-a5f6d13888d6" ...
> >
> > hint-bios=hd0,gpt3 suggests its your 3rd partition on your first disk.
> >
> > Do you use raid ?
> 
> Hi Michael,
> 
> I'm currently using a single disk with ZFS, partitioned as 

I don't know anything about ZFS …

> $ sudo fdisk -l /dev/sda
> 
> Disk identifier: 3405...
> Device   Start   End   Sectors   Size Type
> /dev/sda1   48  2047  2000  1000K BIOS boot
> /dev/sda2 2048   1050623   1048576   512M EFI System
> /dev/sda3  1050624   3147775   2097152 1G Solaris /usr & Apple ZFS
> /dev/sda4  3147776 250069646 246921871 117.7G Solaris root

… or what Solaris /usr & Apple ZFS and Solaris root mean.

[ … ]

> So after making some sense of grub-mkconfig.in, it turns out the 16-digit hex 
> number is returned by
> 
> # grub-probe --device /dev/sda3 --target=fs_uuid
> 9cbef743dfafd874

I'd be interested to know what   grub-probe --device /dev/sda3 --target=fs
thinks the filesystem is. It may just follow what udev says, in which
case I'd look at the contents of /run/udev/data/b8\:3 (guessing¹).

BTW there's no necessity for the UUID to be 32 hex digits; for
example,   grub-probe --device /dev/sda2 --target=fs_uuid
will give you something more like C027-B627.

> Given that the above command fails with 
> 
> --device /dev/sda4 
> 
> (which is the running system's /), gpt3 appears to be sda3, ie. the boot 
> partition,

If you say so.

> so 
> 
> --set=root
> 
> in the grub.cfg search line presumably relates to the root of /boot.

Yes, confusingly, AIUI, the root of  --set=root  is nothing necessarily
to do with the   root=   in the linux line.

> I'm still curious as to why it doesn't seem to appear anywhere else, how it 
> was applied, and what exactly it applies to - a filesystem?

The answer to that may lie with ZFS.

> This is not aiui the usual form of a UUID either.

As mentioned above.

> grub-probe.in or grub-install.c might hold answers.

AFAIK grub-install requires a system device name (like /dev/sda) or
something that points to it (like the /dev/disk/ symlinks).

¹ I've guessed for partition three on the first HDD. For an nvme SSD,
  it could be /run/udev/data/b259\:3 or some other b-number. It's
  usually pretty obvious from a directory listing because of the
  :0 :1 :2 … corresponding partition numbers.

Cheers,
David.



Re: Difference between bookworm installation files?

2024-03-13 Thread David Wright
On Wed 13 Mar 2024 at 07:36:09 (-0700), John Conover wrote:
> 
> What is the difference between:
> 
> debian-live-12.5.0-amd64-xfce.iso

You're familiar with that one as an installer, and I presume
you know that you can run a live system by booting from it.

> And:
> 
> debian-12.5.0-amd64-DVD-1.iso

You can install a system from this (or rescue a broken one).
You get a lot more packages available from it than from, say,
the netinst installer. But it doesn't enable you to run a
full system from it.

Cheers,
David.



Re: strange time problem with bullseye/buster

2024-03-07 Thread David Wright
On Thu 07 Mar 2024 at 19:17:02 (-0500), gene heskett wrote:
> On 3/7/24 12:19, David Wright wrote:
> > On Thu 07 Mar 2024 at 11:29:47 (-0500), gene heskett wrote:
> > > On 3/7/24 10:59, Greg Wooledge wrote:
> > 
> > > > You should be able to verify that the systemd-timesyncd package is
> > > > removed.
> > > > 
> > > 
> > > > In some older versions of Debian, systemd-timesyncd was part of the
> > > > systemd package, and was always installed, even if you installed ntp
> > > > or chrony.  In these versions, the systemd unit file for timesync
> > > > had checks for the existence of the binaries belonging to ntp, chrony
> > > > and openntpd, and would prevent timesync from running if any of those
> > > > was found.
> > > > 
> > > > I don't remember which version did which thing.
> > > > 
> > > > And of course, if you are not actually running Debian, then all bets are
> > > > off.  You're on your own with Armbian, Raspbian, etc.
> > > > 
> > > and because the printer is arm stuff, its old armbian buster vintage.
> > > mks@mkspi:/etc/init.d$ sudo apt purge systemd-timesyncd
> > > Reading package lists... Done
> > > Building dependency tree
> > > Reading state information... Done
> > > Package 'systemd-timesyncd' is not installed, so not removed
> > > 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
> > > mks@mkspi:/etc/init.d$
> > > yet timedatectl is still there and shows:
> > > mks@mkspi:/etc/init.d$ timedatectl
> > > Local time: Thu 2024-03-07 11:15:53 EST
> > > Universal time: Thu 2024-03-07 16:15:53 UTC
> > >   RTC time: Thu 2024-03-07 11:04:39
> > >  Time zone: America/New_York (EST, -0500)
> > > System clock synchronized: no
> > >NTP service: inactive
> > >RTC in local TZ: no
> > > mks@mkspi:/etc/init.d$
> > > And the local time shown above is correct to the second.
> > 
> > Debian's buster's systemd (241) has timesyncd built-in, so you may
> > find that   ls -l /lib/systemd/systemd-timesyncd still finds it.
> > 
> > The output from timedatectl is worrying. I would monitor chrony and
> > check its logs to see if it it's doing anything. After all, you had
> > ntpsec running until a "moment" ago, so you'd hardly expect the clock
> > to be wrong by now.
> 
> At the instant I removed ntpsec and minute later whem I re-installed
> chrony, the time on that printer was around 20 hours stale. By about a
> minute after chrony started, which the install did, time was
> synchronized.
> 
> And still is. Somehow, it resurrected the customized
> /etc/chrony/chrony.conf which pointed it at this machines ntpsec
> server. So I didn't have to re-invent that wheel. It just Worked.
> Memory in the u-sd card? IDK.
> 
> I have NDI how to extract chrony's logs from journalctl.

You could run these commands as an ordinary user instead:

  $ chronyc sources
  $ chronyc sourcestats
  $ chronyc tracking

which will give you an idea of what it is doing.

Cheers,
David.



Re: strange time problem with bullseye/buster

2024-03-07 Thread David Wright
On Thu 07 Mar 2024 at 11:29:47 (-0500), gene heskett wrote:
> On 3/7/24 10:59, Greg Wooledge wrote:

> > You should be able to verify that the systemd-timesyncd package is
> > removed.
> > 
> 
> > In some older versions of Debian, systemd-timesyncd was part of the
> > systemd package, and was always installed, even if you installed ntp
> > or chrony.  In these versions, the systemd unit file for timesync
> > had checks for the existence of the binaries belonging to ntp, chrony
> > and openntpd, and would prevent timesync from running if any of those
> > was found.
> > 
> > I don't remember which version did which thing.
> > 
> > And of course, if you are not actually running Debian, then all bets are
> > off.  You're on your own with Armbian, Raspbian, etc.
> > 
> and because the printer is arm stuff, its old armbian buster vintage.
> mks@mkspi:/etc/init.d$ sudo apt purge systemd-timesyncd
> Reading package lists... Done
> Building dependency tree
> Reading state information... Done
> Package 'systemd-timesyncd' is not installed, so not removed
> 0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
> mks@mkspi:/etc/init.d$
> yet timedatectl is still there and shows:
> mks@mkspi:/etc/init.d$ timedatectl
>Local time: Thu 2024-03-07 11:15:53 EST
>Universal time: Thu 2024-03-07 16:15:53 UTC
>  RTC time: Thu 2024-03-07 11:04:39
> Time zone: America/New_York (EST, -0500)
> System clock synchronized: no
>   NTP service: inactive
>   RTC in local TZ: no
> mks@mkspi:/etc/init.d$
> And the local time shown above is correct to the second.

Debian's buster's systemd (241) has timesyncd built-in, so you may
find that   ls -l /lib/systemd/systemd-timesyncd still finds it.

The output from timedatectl is worrying. I would monitor chrony and
check its logs to see if it it's doing anything. After all, you had
ntpsec running until a "moment" ago, so you'd hardly expect the clock
to be wrong by now.

I tried installing chrony in 2017 (jessie), and it appeared unable
to slew the clock five seconds in two days of interrupted running.

Cheers,
David.



Re: strange time problem with bullseye

2024-03-06 Thread David Wright
On Wed 06 Mar 2024 at 07:07:36 (-0500), Greg Wooledge wrote:
> On Wed, Mar 06, 2024 at 07:37:09AM +0200, Teemu Likonen wrote:
> > It seems that you have solved the problem but here is another hint.
> > "timedatectl" is a good high-level tool for querying and adjusting time
> > settings. Without command-line arguments it prints a lot of useful info:
> > 
> > $ timedatectl
> >Local time: ke 2024-03-06 07:33:00 EET
> >Universal time: ke 2024-03-06 05:33:00 UTC
> >  RTC time: ke 2024-03-06 05:33:00
> > Time zone: Europe/Helsinki (EET, +0200)
> > System clock synchronized: yes
> >   NTP service: active
> >   RTC in local TZ: no
> > 
> > See "timedatectl -h" or manual page for more info.
> 
> This is a great hint, but be warned that it doesn't quite know about
> NTP services other than systemd-timesyncd.  If you're running ntpsec,
> for example, it'll simply say:
> 
> System clock synchronized: yes
>   NTP service: n/a

Note also that it only shows the system's time zone, and not
necessarily that of the user running it:

$ timedatectl ; echo ; date
   Local time: Wed 2024-03-06 19:18:58 UTC
   Universal time: Wed 2024-03-06 19:18:58 UTC
 RTC time: Wed 2024-03-06 19:18:58
Time zone: Etc/UTC (UTC, +)
System clock synchronized: yes
  NTP service: active
  RTC in local TZ: no

Wed Mar  6 13:18:58 CST 2024
$ 

Cheers,
David.



Re: electrons/the Internet doesn't like … that I like to eat raw garlic, ...

2024-03-04 Thread David Wright
On Mon 04 Mar 2024 at 12:36:54 (-0800), David Christensen wrote:
> On 3/4/24 08:37, Albretch Mueller wrote:

> > _LINK="https://christuniversity.in/uploads/course/E&Comp_21-25_Lateral
> > Entry(1)_20210618043317.pdf"
> 
> When I click the above link in my mail client (Thunderbird), my
> browser (Firefox) attempts to open the URL.  But, the URL is mangled
> by mail client line wrap and/or indentation (?), and the connection
> times out:
> 
> https://christuniversity.in/uploads/course/E&Comp_21-25_Lateral
> 
> An error occurred during a connection to christuniversity.in.

I ignored the filename, and pasted https://christuniversity.in/uploads/course/
into FF. Here's the text copy/pasted off the page that was displayed.
It was accompanied by the image that is displayed at
https://christuniversity.in/images/cour-btch-bnnr.jpg



Alumni
Careers
IQAC
International
Centres&Cells
Accreditation

About Us
Academics
Research
Student Life
E - Services
Campuses
Visitors

Programme Details

Open From :
Open Until :

CHRIST
(Deemed to be University)

Dharmaram College Post, Hosur Road, Bengaluru - 560029,
Karnataka, India

Tel: +91 804012 9100 / 9600

Fax: 40129000

Email: m...@christuniversity.in

Web: http://www. christuniversity.in
Vision

EXCELLENCE AND SERVICE
Mission

CHRIST (Deemed to be University) is a nurturing ground for an individual's 
holistic development to make effective contribution to the society in a dynamic 
environment.

UBA
FCRA
Alumni
IQAC
Careers

Library
Centres
Research
Admission
Course Index

Copyright © CHRIST (Deemed to be University) 2020 | Privacy Policy
Website Developed by Cloud Business Pages from INI Technologies Pvt Ltd., 
Kochi, India



Just a data point.

Cheers,
David.



Re: bash parameter expansion "doesn't like" dots?

2024-03-04 Thread David Wright
On Mon 04 Mar 2024 at 11:51:29 (+0900), John Crawley wrote:
> On 04/03/2024 10:07, David Wright wrote:
> > On Sun 03 Mar 2024 at 17:58:53 (-0600), Albretch Mueller wrote:
> > >   bash doesn't seem to like dots too close to brackets:
> > > 
> > >   echo "${_VAR//[^0-9a-zA-Z.,_-]/}"
> > > 
> > >   works fine.
> > > 
> > > On 3/3/24, Albretch Mueller  wrote:
> > > > _VAR="admissions.piedmont.edu_files?trackid=wnm:1980&PDFfiller=what-is-the-second-fundamental-theorem-of-calculus(1).pdf"
> > > > 
> > > > echo "${_VAR//[^a-zA-Z0-9_-]/}"
> > > > 
> > > > echo "${_VAR//[^a-zA-Z0-9_-.]/}"
> >   ↑↑↑
> > 
> > That's a range, except that it isn't because it's written backwards.
> > Check for yourself by testing with 9-0 instead of 0-9.
> > 
> So the problem isn't about dots,

It shouldn't be, as there's nothing special about ".", though there's
the mystery of what was said in the OP's quoted post, which we're not
privy to.

> but the handling of the - which has to go last if it isn't to be treated as a 
> range marker.

First or last in the set. I prefer last, because "]" can only go first
in the set to be a matchable character.

> https://www.gnu.org/software/grep/manual/html_node/Character-Classes-and-Bracket-Expressions.html
> says:
> 
> ‘-’
> represents the range if it’s not first or last in a list or the ending 
> point of a range. To make the ‘-’ a list item, it is best to put it last.

Well, here's a clue as to where the trouble might have arisen.
Pattern matching in the shell is not the same as in grep: the
rules are different, but similar enough to confuse.

Which shell also matters. The OP appears to be using ^ to negate,
but ! has the advantage that it will be understood in bash and dash.

Cheers,
David.



Re: [ *** ] Job anacron.service/stop running (15min 49s / no limit)

2024-03-03 Thread David Wright
On Sun 03 Mar 2024 at 13:27:50 (+0100), Eduard Bloch wrote:
> * David Wright [Sun, Feb 11 2024, 10:20:16PM]:
> > On Sun 11 Feb 2024 at 20:41:51 (+), Darac Marjal wrote:
> > > On 11/02/2024 11:21, Rainer Dorsch wrote:
> >
> > > > - How do I set a timeout/limit for anacron, that it cannot block forever
> > > > during a reboot?
> > >
> > > It may be germane to point out that anacron.service already explicitly
> > > sets "TimeoutStopSec=Infinity". So, in the opinion of the developers,
> > > the service shouldn't be prematurely killed. Of course you, as the
> > > system administrator, always have the right to countermand that sort
> > > of decision, but it would be curious to find out why the developers
> > > thought they needed to override the systemd default in the first
> > > place?
> >
> > Bug #915379 explains all: long-running cron jobs, like backups, can
> > get killed, and there was also an issue with exim.
> 
> Yes, and?

If you don't like it, then

  # systemctl edit --full anacron.service

and remove or decrease the timeout, which means (for removal)
you'll be reverting to how things are in bullseye.

> The opposite is: you have some stupid (and UNKNOWN) task which
> hangs forever because of some programming bug. And then your whole system
> locks up, unable to reboot, and no way to recover it because the reboot
> is stuck because of this. I am observing this on my old hacking laptop
> right now, the system took many minutes (5? 7?) to continue, but even
> that was pure luck.

I would probably have force-powered-down by then.

> Sorry, no, that cannot be the proper way. I am reopening 915379 now, the
> maintainer should maybe come up with some sane solution.

#915379 has been archived, which AIUI means you need to open a new one.

Cheers,
David.



Re: bash parameter expansion "doesn't like" dots?

2024-03-03 Thread David Wright
On Sun 03 Mar 2024 at 17:58:53 (-0600), Albretch Mueller wrote:
>  bash doesn't seem to like dots too close to brackets:
> 
>  echo "${_VAR//[^0-9a-zA-Z.,_-]/}"
> 
>  works fine.
> 
> On 3/3/24, Albretch Mueller  wrote:
> > _VAR="admissions.piedmont.edu_files?trackid=wnm:1980&PDFfiller=what-is-the-second-fundamental-theorem-of-calculus(1).pdf"
> >
> > echo "${_VAR//[^a-zA-Z0-9_-]/}"
> >
> > echo "${_VAR//[^a-zA-Z0-9_-.]/}"
 ↑↑↑

That's a range, except that it isn't because it's written backwards.
Check for yourself by testing with 9-0 instead of 0-9.

Cheers,
David.



Re: where are the crontab files in Trixie?

2024-02-28 Thread David Wright
On Wed 28 Feb 2024 at 22:32:57 (+0700), Max Nikulin wrote:
> On 28/02/2024 10:35, David Wright wrote:
> > In which case, I'd write the remaining cron line as:
> > 
> >@reboot sleep 99 && echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id
> 
> I am in doubts if it is a task for cron. Wouldn't udev rules be better?
> 
> https://stackoverflow.com/questions/442833/how-to-force-driver-to-device-match-in-linux/52943745#52943745
> https://unix.stackexchange.com/questions/67936/attaching-usb-serial-device-with-custom-pid-to-ttyusb0-on-embedded/165845#165845
> 
> Moreover, to load and configure modules there are /etc/modprobe.d/ and
> /etc/modules.
> 
> If it is a weird device that may appear either as 13b1:0039 (supported
> by brcmfmac accordingly to modinfo) and 13b1:0bdc, may it happen that
> it is possible to use e.g. usb-modeswitch to adjust which way the
> device tries to present itself?

Those are fair questions. If the appearance of the brcmfmac/ directory
is the sole precondition, then I would probably try udev. But I claim
no knowledge about the module or any device connected with it.

Where cron/sleep is useful is where some device has to settle, or
wait in some way, before the string is sent. One example I use is:

  @reboot sleep 15 && printf '\n' > /dev/tty1 && /usr/sbin/rfkill > /dev/tty1 
&& /usr/bin/ip a > /dev/tty1

which tells me whether the hardware toggle switch on my ancient laptop
is actually unblocked (the switch's indicator lamp is unreliable) and
whether it's connected to the router, and how.

Cheers,
David.



Re: where are the crontab files in Trixie?

2024-02-27 Thread David Wright
On Tue 27 Feb 2024 at 15:35:07 (+), Michael Kjörling wrote:
> On 27 Feb 2024 10:15 -0500, from g...@extremeground.com (Gary Dale):

> In this case you might even want the second to execute only when the
> first completes _successfully_, so:
> 
> @reboot /usr/sbin/modprobe brcmfmac && echo 13b1 0bdc > 
> /sys/bus/usb/drivers/brcmfmac/new_id

I wondered whether that might cause any error message to be lost in
normal booting output (assuming you've asked for it).

> _That said_, if you want to load a module on boot, the generally
> recommended way these days is to add it to a *.conf file in
> /etc/modules-load.d. See modules-load.d(5) for details. The old way
> was to add it to the file /etc/modules.

In which case, I'd write the remaining cron line as:

  @reboot sleep 99 && echo 13b1 0bdc > /sys/bus/usb/drivers/brcmfmac/new_id

where you can choose a better estimate than 99.

> > Anyway, that got me down the rabbit hole to try to find where the crontab
> > file is.
> 
> Per-user crontabs are in /var/spool/cron/crontabs, or at least are in
> Bookworm (and this has been the case for what feels like forever).
> This is mentioned in the DIAGNOSTICS section of the crontab(1) man
> page, as well as in the NOTES section of the cron(8) man page.

If you lose track of where a crontab was originally generated from¹,
the filename is in the second line of /var/spool/cron/crontabs/.

Note that you won't see the first three lines of crontabs/
listed by  crontab -l  or at the top of the file edited by  crontab -e
because they're stripped out and reinserted by crontab². See the
DEBIAN SPECIFIC section in   man 1 crontab.

¹ Assuming you use   crontab filename. Otherwise, the filename
  in crontabs/ will be of little interest.

² This behaviour can be overridden with CRONTAB_NOHEADER='N'

Cheers,
David.



Re: medically smart watches

2024-02-25 Thread David Wright
On Sun 25 Feb 2024 at 18:33:26 (-0500), gene heskett wrote:
> On 2/25/24 14:19, Roy J. Tellason, Sr. wrote:
> > On Sunday 25 February 2024 05:16:21 am gene heskett wrote:
> > > I have no idea how many EE's there are here in the states,
> > > 10,000+ probably. There are only around 130 CET's.
> > 
> > More than that.  My certificate number is PA-230...
> 
> Mine is NB-116, so they must go by state, NB being Nebraska.

Oh, I thought you were going to say you'd taken the examinations
in New Brunswick.

> Something doesn't add up.

Cheers,
David.



Re: How can we change the keyboard layout?

2024-02-25 Thread David Wright
On Wed 21 Feb 2024 at 23:16:41 (+0100), hw wrote:
> On Wed, 2024-02-21 at 12:55 -0600, David Wright wrote:
> > On Tue 13 Feb 2024 at 08:09:40 (+0100), hw wrote:
> > > On Sun, 2024-02-11 at 10:35 -0600, David Wright wrote:
> > > > On Wed 07 Feb 2024 at 06:58:39 (+0100), hw wrote:
> > > > > [...]
> > > I'd use multiple keyboards if I had to do that and just change between
> > > keyboards.
> > 
> > Do it if you like. That's what I have on my computer in the basement:
> > a GB-layout M keyboard and a US-layout Microsoft Pro.
> 
> And is their layout identical?

No: Great Britain, GB, and United States, US.

British keyboards have an extra key left of Z; yes, that Z. It's
engraved with \|. There is also an extra key in the ASDFG… row.
It's left of the Return key, which has a different shape, being
merged with the key above, ie the \| key. Of course, that reduces
the number of keys in the QWERTY… row. Which in turn leads to
displacements of the following symbols:
~, @, #, \, |, ", and allows the addition of two more: ¬ and £.

>  If isn't, do all the keys on both
> keyboards what you expect them to do?

Yes, as engraved. There are a lot of shifted key combinations too,
but on the whole I prefer to use Compose sequences, as I find them
more logical. I got used to using them long before I got my first
PC. Rather than remembering which shifted key types ©, I prefer
typing CapsLock c o (or o c) instead. And I've chosen some of the
more obscure ones for myself, eg CapsLock # d s for 𝄪 and
CapsLock # d b for 𝄫.

> > > > > > My 2014 keyboard appears to identify itself correctly as a K520. My
> > > > > > old IBM M says it's an "AT Translated Set 2 keyboard", which seems
> > > > > > reasonable for a keyboard dating from 1988.
> > > Where does it show up?  Where does the information originate from?
> > > Perhaps the information is merely an assumption some of the involved
> > > the software makes and not something the keyboard tells it.
> > 
> > I get it from xinput, which I assume gets it from udev, as the ID's
> > description string occurs in /lib/udev/hwdb.d/60-keyboard.hwdb.
> 
> Does that mean it doesn't come form the keyboard itself?

The OS sends a code and the keyboard returns some bytes, which the OS
interprets as a description. For a keyboard as old as the IBM, I guess
it would be fairly rudimentary, but perhaps it's more expansive for
modern keyboards. I think the OS can also send programming codes to
some modern keyboards to modify their behaviour.

The properties that udev discovers and deduces can be found in
/run/udev/data/c13\:* (amongst a load of other character devices).
The implications of those properties would be found, presumably,
in the drivers.

[ … ]
> But then, how many manufacturers nowadays make keyboards with 122 keys
> like these terminal keyboards for PCs?  The only one I know of is
> Unicomp, and they have adjusted the keyboard controller to deliver
> substitutes for keys PCs don't know (or usually don't have) in order
> to make the keyobard usable for PCs.

I don't know anything about this keyboard apart from reading that
new ones contain some model of Raspberry, making it easier to reflash
the controller.

> Why would the kernel developers make provisions for keyboards that
> don't exist (for PCs)?

Why would the kernel developers restrict themselves to one architecture?

[ … ]
> You mean wev?  What are trying to decode?

I think F18 is being treated as a Left-shifted F6, except that it
releases the Shift before releasing F6, whereas a typist would
normally release Shift after F6.

> I usually NumLock enabled; if it's ever turned off, it's usually only
> by accidident.
> 
> > > For the backtab key it says:
> > 
> > Looking at 911QQZnUFrL.jpg, I don't know which key that is. But again,
> > NumLock appears to be on.
> 
> It's the key to the left to the Delete key which is below the key
> labeled Dup/Insert.

OK, I actually thought it might be the key left of Dup/Insert because
I didn't know that symbol, whereas the key left of Delete appears to
have the same symbol as the keyboard's Enter key (almost next to it).

It looks as if it sends codes similar to F18, using Control instead
of Shift, but in the same unconventional order.

AFAICT the two keys you pressed happen to be ones that don't react to
NumLock being set.

> > Why would it not be able to send a keycode for F18?
> 
> It's because PCs have no more than 12 function keys.
> 
> Maybe they can have more nowadays, but where do you find a keyboard
> for PCs that has more than 12 "true" function keys?

https://www.f

Re: Issue with USB External Keyboard, External Mouse, and Screen Brightness on Dell Laptop

2024-02-22 Thread David Wright
On Thu 22 Feb 2024 at 13:49:54 (-0300), Marcelo Laia wrote:

> Inspiron 5547 01 OCT. 2014
> 
> Some hardware details:
> 
> - BIOS:
>   - Vendor: Dell Inc.
>   - Version: A13
>   - Date: 05/27/2019
> - CPU:
>   - Product: Intel(R) Core(TM) i7-4510U CPU @ 2.00GHz
> - Memory:
>   - Size: 16GB

[ … ]

> After unplugging the power cable, i.e., the battery is discharging:
> 
> After a few seconds, the screen brightness is set to zero. The mouse
> remains active, and I can use it for a few more seconds, when it
> also becomes disabled. From then on, only the touchpad and internal
> keyboard are functional.

[ … ]

> Any other suggestions? It seems to me that it's not related to
> power, however, what is the specific list for energy-related issues? 

My advice would be to prepare for a day when you see nothing from
the moment you switch it on.

Here's a log of what happened with my Dell D430 laptop, purchased in
2008 as a stop-gap, acquired by me in 2009. First the battery packs:

  2014-02-12 Large battery started to go bad. Charging light started
  constantly flashing a pattern: four yellows and a longer
  green. Apart from that, everything works ok: the battery stays at
  five lights, and the acpi variables all show sensible
  values. However, the battery discharges much more quickly than it
  should, particularly early on, so some cells probably don't work
  properly.

  2015-03-29 Started to switch itself off when the power cable was
  disconnected. It appears that the battery is not actually connected
  to the computer when this happens.

  2015-03-31 The large battery finally gave up. When the charge button
  is pressed, only LEDS 1, 3 and 5 light up, but flashing. Otherwise,
  dead. Disposed of the large battery in Best Buy's foyer and started
  using the small one.

And the screen:

  2011-10-21 Started to switch itself off unaccountably every so
  often. No freeze, no kernel panic, but just like holding down the
  power switch. It will have been running a while, and usually it
  happens when the machine or lid is moved.

  2017-01-22 After a day or two of slight flickering in brightness,
  the screen blanked out a few times during the day. The machine was
  still running, and so X could be quit and restarted, and rebooted
  too. The screen would come back, but often disappear almost
  immediately, even while the Dell splash screen was being displayed
  at switch-on. It went away entirely the same day.

  2018-06-19 After being depowered for a week, the battery capacity
  had fallen to 2%. However, on AC the screen started working again,
  though it just flickered a little all the time. Took the opportunity
  to demote Internal HDD to below USB and Optical Drive in the BIOS.
  Got about three minutes before it reverted.

  2020-04-16 Started to crash, and eventually failed to boot.
  Obviously difficult to diagnose when there's no display at power-on,
  so scrapped.

If you're wondering why I kept it so long, I could use an external
monitor to display its X server screen, but neither the BIOS nor
the console would work that way, so I had to type blind until I got
into X. With a 30 second countdown, I could operate the Grub screen
blind. I also managed to install buster in text mode by copying what
I typed while installing on another PC at the same time. (I might
have been able to clone jessie into the other partition, but that
would have then required two dist-upgrades.)

Cheers,
David.



Re: How can we change the keyboard layout?

2024-02-21 Thread David Wright
On Tue 13 Feb 2024 at 08:09:40 (+0100), hw wrote:
> On Sun, 2024-02-11 at 10:35 -0600, David Wright wrote:
> > On Wed 07 Feb 2024 at 06:58:39 (+0100), hw wrote:
> > > [...]
> I'd use multiple keyboards if I had to do that and just change between
> keyboards.

Do it if you like. That's what I have on my computer in the basement:
a GB-layout M keyboard and a US-layout Microsoft Pro.

In my case, the layout difference is incidental: the M sits on the
table, the other sits on a shelf, for standing use. (There are two
screens, set to mirroring.)

> > > > My 2014 keyboard appears to identify itself correctly as a K520. My
> > > > old IBM M says it's an "AT Translated Set 2 keyboard", which seems
> > > > reasonable for a keyboard dating from 1988.
> > > 
> > > I can see USB keyboards identifying themselves, but keyboards with
> > > PS/2 or DIN connectors?  How does your keyboard from 1988 connect?
> > 
> > PS/2. IIRC it came with a genuine IBM PS/2 computer.
> 
> Where does it show up?  Where does the information originate from?
> Perhaps the information is merely an assumption some of the involved
> the software makes and not something the keyboard tells it.

I get it from xinput, which I assume gets it from udev, as the ID's
description string occurs in /lib/udev/hwdb.d/60-keyboard.hwdb.

> > > 10% more keys isn't considerably more.  Can you show me a keyboard
> > > with 122 keys that has all keys usable and unique rather than sending
> > > key combinations instead?
> > 
> > That would be difficult:

I think some etiquette might be appropriate. You shouldn't quote half
a sentence just to change the meaning to suit yourself. I wrote:

 "That would be difficult: I've never had a 122 key keyboard, or
  even seen one. You have one. In terms of xev output, are there
  duplicate keys?"

That difficulty has nothing to do with the one you wrote about here:

> That's what I've been saying :)  Years ago I read an article about
> keyboards and it said that due to hardware restrictions, only so many
> keys can be handled so that keyboards with 122 keys don't really work:
> Either the controller in the keyboard key combinations, or the keys do
> nothing.  Apparently such keyboards seem to come from terminals that
> could use all the keys while PC hardware can not.

I've not heard of that. The keyboard files in the kernel source and in
udev seem to have far more keys available than 122.

> > I've never had a 122 key keyboard, or even seen one. You have
> > one. In terms of xev output, are there duplicate keys? Which ones,
> > and how does xev identify them?
> 
> I don't know if there are duplicate keys.  I didn't try out all the
> key to find any, and I haven't noticed any.

It can't take that long to press 122 keys in turn, can it.

> When I press F18, for example, wev says: [ … lengthy output snipped … ]

Does wl signify wayland output? I can't decode it. However, you appear
to have your NumLock on, which could change things considerably.

> For the backtab key it says:

Looking at 911QQZnUFrL.jpg, I don't know which key that is. But again,
NumLock appears to be on.

> These keys don't exist on PCs, so the keyboards converts them.  IIRC,
> Unicomp used to have a version that was suited for terminals like IBM
> made them, i. e. with all 122 keys working and not converted.

That's odd—911QQZnUFrL.jpg shows function keys as high as F24.
Why would it not be able to send a keycode for F18?

> > The keyboards I have access to all send usable keycodes, even where
> > the engravings are the same, eg, Return/36 and KP_Enter/104 are both
> > engraved with "Enter", KP_Subtract/82 and minus/20 are both engraved
> > with "-".
> 
> I get usable keycodes, too.  It looks pretty much like this, only the
> symbols on the two keys in the bottom row on the very left look nicer
> on mine: https://m.media-amazon.com/images/I/911QQZnUFrL.jpg

But without shifts, locks, and key redefinitions, do all your keys
produce unique keycodes? (Whether the last point is possible might
depend on how wayland inserts itself into the process.) Also note that
when keys have been redefined, you can't see what keycodes they would
originally have produced.

> > The only key on this K520 that doesn't send a keycode on its own is
> > the gold FN key, which behaves more like a laptop's Fn key, sending
> > "control functions" like Sleep; plus a battery charge indicator.
> 
> I guess that's useful for laptops --- and one example of how it's
> great to have more keys.  Why is there still no 'Hibernate' key on
> ev

rec recording, Re: Upgrade to Bookworm, now GNOME keyring dies …

2024-02-21 Thread David Wright
On Mon 19 Feb 2024 at 13:26:17 (-0600), Nate Bargmann wrote:
> 
> After seeing this twice this morning I recalled that I have a cron entry
> to kill the 'rec' program.  This was to break up audio files into hourly
> segments when recording an amateur radio event.  This was the cron
> command:
> 
> # Rotate sound recorder files
> 00 * * * * /usr/bin/pkill -f rec > /dev/null 2> /dev/null
> 
> On a hunch I commented that line and Voila! the daemon ran through the
> next hour change and is still running as expected.  The man page states
> that the '-f' option matches against the full command line, not just the
> process name.  So, looking at the gnome-keyring-daemon command line:
> 
>1857 ?SLsl   0:00 /usr/bin/gnome-keyring-daemon --foreground 
> --components=pkcs11,secrets --control-directory=/run/user/1000/keyring
> 
> I see that the 'rec' in 'directory' provided the match!  Confirmed with
> pgrep:
> 
> $ pgrep -f rec
> 1857
> 
> It looks like the solution for the future will be to change the cron
> line to:
> 
> 00 * * * * /usr/bin/pkill -f /usr/bin/rec > /dev/null 2> /dev/null

I can't get that to work here. When I kill rec, it just dies. Is pkill
sending SIGTERM, which appears to be the default? Nor can I find this
documented—though the sox docs are lengthy, so I might have missed it.

I can use SIGUSR1 with arecord, and that works perfectly.

Cheers,
David.



Re: sudo udisksctl

2024-02-21 Thread David Wright
On Mon 19 Feb 2024 at 23:53:41 (+0700), Max Nikulin wrote:
> David, feel free to stop discussion if you find me annoying. My
> problem in some sense is close to your one and I am trying to figure
> out if missed some udisks feature and the result is some
> inconvenience.
> 
> On 19/02/2024 11:26, David Wright wrote:
> > On Sun 18 Feb 2024 at 12:41:29 (+0700), Max Nikulin wrote:
> > > On 18/02/2024 11:40, David Wright wrote:
> > > > $ udisksctl unlock --block-device /dev/disk/by-partlabel/Nokia01
> > 
> > > When sudo is
> > > involved, I still do not see any advantage of udisk[s]ctl over
> > > "cryptsetup open".
> > 
> > I'd be more worried about disadvantages. About the only difference
> > I see is that   cryptsetup open   requires a name.
> 
> I find it convenient to have a meaningful name in /dev/mapper in
> addition to /dev/dm-X. So I would not call it pure disadvantage.

True, it makes the NAME in lsblk shorter. But the only time I've
defined a name is when opening the partition tocreate the filesystem:

  # cryptsetup --align-payload 2048 luksFormat /dev/sdz9

  WARNING!
  
  This will overwrite data on /dev/sdb1 irrevocably.

  Are you sure? (Type uppercase yes): YES
  Enter passphrase:
  Verify passphrase:
  # cryptsetup luksAddKey /dev/sdz9
  Enter any existing passphrase:
  Enter new passphrase for key slot:
  Verify passphrase:
  # cryptsetup open --type luks /dev/sdz9 thename
  Enter passphrase for /dev/sdz9:
  # ls -l /dev/mapper/
  total 0
  crw--- 1 root root 10, 236 Aug 18 10:35 control
  lrwxrwxrwx 1 root root   7 Aug 18 10:35 thename -> ../dm-0
  # ls -l /dev/dm-0
  brw-rw 1 root disk 254, 0 Aug 18 10:35 /dev/dm-0
  # mkfs.ext4 -L name09 /dev/mapper/thename
  mke2fs 1.44.5 (15-Dec-2018)
  Creating filesystem with 10598 4k blocks and 26492928 inodes
  Filesystem UUID: 3c832120-d40a-4998-b927-1318eb1e17f8
  Superblock backups stored on blocks:
  32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 
2654208,
  4096000, 7962624, 11239424, 2048, 23887872, 71663616, 78675968,
  10240

  Allocating group tables: done
  Writing inode tables: done
  Creating journal (262144 blocks): done
  Writing superblocks and filesystem accounting information: done

  # e2label /dev/mapper/thename name09 (if forgotten above).
  # 

[ … creating, chown-ing, chmod-ing top-level directories ]

  # cryptsetup luksClose thename
  # 

> > > As third option, if I remember it correctly, pmount
> > 
> > That would be pointless for me. After udev creates correctly-named
> > mountpoints using my rules, entries in fstab set the appropriate
> > flags for each individual device. That contradicts the expressed main
> > purpose of pmount: "permits normal users to mount removable devices
> > without a matching /etc/fstab entry." — precisely what I don't want.
> 
> I consider pmount as a tool does not need separate unlock and mount
> commands, so a shell function becomes unnecessary. In respect to
> permissions (for removable drives) it acts as a substitute for sudo.
> 
> I expected that you need to mount a partition under /media into the
> directory with name taken from filesystem LABEL. If so then udisksd
> can do it and /etc/fstab entry is unnecessary. You anyway added an
> udev rule. The following one should change mountpoint from
> /media/$USER/lulu01 to /media/lulu01
> 
> SUBSYSTEM=="block", ENV{ID_FS_LABEL}=="lulu01",
> ENV{UDISKS_FILESYSTEM_SHARED}="1"
> 
> It seems that mixing of udisksctl and non-udisksctl commands can be avoided.

I hadn't thought about that as an issue. I've just chosen, for
each step, the method that's most convenient (for me). See:

  https://lists.debian.org/debian-user/2024/01/msg00737.html

for some details of the first step, which I won't duplicate here.
I group-control the directory /etc/udev/rules.d/my-mountpoints,
hence all the 59 entries.

For decrypting, I use either the PARTLABEL or the device-ID. The
latter's useful for sticks and cards that I wipe more frequently,
which makes the other symlinks variable over time.

For mounting, I use fstab entries because they have the flags defined,
rather than putting them in the mount command. When I need to mount
with sudo, the flags include a private x-mysudo flag, which is picked
up by my wrapper around mount. (The bash function that started this
discussion doesn't say "mount /media/lulu01" but "mmm /media/lulu01".)

Unmounting is also wrapped, not just for sudo, but because it contains
a script to updatedb (for locate), ls -lR (for mc), and create a
listing (using find) that lists modification time, size and filename
in a customised format. After any locking, the three products are
automatically transferred to my other hosts to keep them up-to-date.

It probably all looks hackish to someone running a multiuser system.

Cheers,
David.



Re: partition reporting full, but not

2024-02-21 Thread David Wright
On Tue 20 Feb 2024 at 17:14:41 (+), debian-u...@howorth.org.uk wrote:
> Felix Miata  wrote:
> > Keith Bainbridge composed on 2024-02-20 17:45 (UTC+1100):
> > 
> > > I just removed 3 snapshots from my daily driver with no change in
> > > used space reported by df  
> > 
> > df doesn't know how to calculate freespace on btrfs. You need to be
> > typing
> > 
> > btrfs filesystem df
> 
> df [options] 
>Show a terse summary information about allocation of block
>group types of a given mount point. The original purpose of
>this command was a debugging helper. The output needs to be
>further interpreted and is not suitable for quick overview.
> 
> 
> FWIW my root filesystem is btrfs and I use the normal df command all the
> time without a problem. I've never used btrfs filesystem df

Would it matter if you're not running your filesystem close to full?

Cheers,
David.



Re: partition reporting full, but not

2024-02-21 Thread David Wright
On Mon 19 Feb 2024 at 10:26:05 (+1100), Keith Bainbridge wrote:
> On 18/2/24 14:49, Keith Bainbridge wrote:
> > On 18/2/24 07:34, debian-u...@howorth.org.uk wrote:
> > > Keith Bainbridge wrote:
> > > > Yes the / partitions are btrfs
> > > 
> > > So the apparently missing space is perhaps taken up by btrfs snapshots.
> > > 
> > 
> > Seems to be the prime suspect.   If that's the case, btrfs is NOT
> > hard- linking the snapshots as timeshift claims it does. The only
> > way to check is install on ext4 and compare. I have saves enough
> > free space to do this.
> > 
> > My effort to date is to move my home to /mnt/data and sim-link it
> > into / home. df is now showing 2.3GB free on /.  df showed /home
> > as 2.2GB yesterday.  At least there is a little space to play
> > with; and give me time to consider. A fresh install may be worth
> > checking in snapshots are as big as this all makes them look.
> > 
> > a few brief answer to other comments will follow
> 
> 
> So later yesterday afternoon I created a new snapshot with no obvious
> change is free space.

That would seem reasonable, as there's not much more to do than note
which files the snapshot contains.

> I then update/upgrade.   The initial attempt told me
> 63 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
> Need to get 337 MB of archives.
> After this operation, 473 MB of additional disk space will be used.
> Do you want to continue? [Y/n]
> 
> But the 3 kernel related packages failed to install a couple of times.
> When I finally figured I should check space, there was none.   I
> rolled back to prior to the upgrade, but still no free space.
> 
> I said sometime in this thread that timeshift (and BiT) use hard links
> to create progressive copies of the system. The more I think about how
> hard links reportedly work, I reckon it can't be simply hard links.

Reading a tiny bit of the BTRFS docs, I would suggest that you're not
taking Block Groups into account. If BTRFS allocates data chunks in
blocks of 1GB, then it's conceivable that an upgrade involving 473MB
of data, plus the consequential increase in the size of the snapshot,
could all reside in a very recently created Block Group.

Put another way, df would see no change in Used and Available (as no
new Block Group allocation), whereas I would expect   btrfs filesystem df
to report a change here (because it knows what's within its Block
Groups):

> Data, single: total=32.80GiB, used=31.94GiB
> Tue 20Feb2024@20:57:45

Cheers,
David.



Re: sudo udisksctl

2024-02-18 Thread David Wright
On Sun 18 Feb 2024 at 12:41:29 (+0700), Max Nikulin wrote:
> On 18/02/2024 11:40, David Wright wrote:
> >$ ssh bhost
> >$ udisksctl unlock --block-device /dev/disk/by-partlabel/Nokia01
> >Passphrase:
> > AUTHENTICATING FOR org.freedesktop.udisks2.encrypted-unlock ===
> >Authentication is required to unlock the encrypted device Multiple Card  
> > Reader (/dev/sdc1)
> 
> It should be possible to modify policy to allow a specific user or a
> group to perform disk operations, see polkit(8).

This is basically a single-user network here, and I simplify matters
by keeping all the permitted privileged operations in one place,
under sudoers.d/. I'm happy to let policykit look after the way that
system components work together, but I'm not interested in getting
involved in that stuff myself. The flexibility in configuration,
desirable in multiuser systems, comes with a learning curve that
I'm not interested in climbing.

> When sudo is
> involved, I still do not see any advantage of udisk[s]ctl over
> "cryptsetup open".

I'd be more worried about disadvantages. About the only difference
I see is that   cryptsetup open   requires a name.

> As third option, if I remember it correctly, pmount
> relies on group membership, not on systemd-logind "uaccess", so local
> vs. remote user should not matter. This variant combines unlock and
> mount into a single command.

That would be pointless for me. After udev creates correctly-named
mountpoints using my rules, entries in fstab set the appropriate
flags for each individual device. That contradicts the expressed main
purpose of pmount: "permits normal users to mount removable devices
without a matching /etc/fstab entry." — precisely what I don't want.

Cheers,
David.



Re: sudo udisksctl

2024-02-17 Thread David Wright
On Sun 18 Feb 2024 at 10:23:52 (+0700), Max Nikulin wrote:
> I have decided to ask the following in a separate thread.
> 
> On 17/02/2024 02:59, David Wright wrote
> (Re: f3tools vs Silicon Power 4T drive):
> >   lulu ()   { sudo udisksctl unlock --block-device
> > /dev/disk/by-partlabel/Lulu01 && mount /media/lulu01
> >   }
> 
> I am evaluating if udisks2 D-Bus API allows to create a tool as
> convenient as pmount(1) that is smart enough to unlock a device before
> mounting it (optionally with specified name of mountpoint)
> 
> pmount /dev/sda1 mybackup
> 
> I have puzzled by your function however. I believed that udisks was
> created to allow *regular* users to mount drives. If you are using
> sudo why do not you use "cryptsetup open" directly? Otherwise
> udisksctl can ask password if policy does not allow disk operations
> for the current user.
> 
> P.S. Unfortunately mount name is hardcoded in udisksd. It is either
> label or UUID, it can not be specified when a partition is mounted.

Because policykit allows me to unlock partitions only if they're
local. I rely on being able to unlock partitions remotely. For
example, if I wakeonlan the PC in the basement, I need to be able
to unlock its /home before I can login as myself.

As a demonstration:

  $ hostname
  bhost
  $ udisksctl unlock --block-device /dev/disk/by-partlabel/Nokia01
  Passphrase: 
  Unlocked /dev/sdc1 as /dev/dm-2.
  $ udisksctl lock --block-device /dev/disk/by-partlabel/Nokia01
  Locked /dev/sdc1.
  $ 

is fine, but ssh to a laptop and back to this machine:

  $ ssh ahost
  Linux ahost 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64
  [ … ]
  You have new mail.
  Last login: Sun Feb 18 04:18:39 2024 from 192.168.1.14
  $ ssh bhost
  Linux bhost 5.10.0-28-amd64 #1 SMP Debian 5.10.209-2 (2024-01-31) x86_64
  [ … ]
  You have new mail.
  Last login: Sun Feb 18 04:18:44 2024 from 192.168.1.16
  $ udisksctl unlock --block-device /dev/disk/by-partlabel/Nokia01
  Passphrase: 
   AUTHENTICATING FOR org.freedesktop.udisks2.encrypted-unlock ===
  Authentication is required to unlock the encrypted device Multiple Card  
Reader (/dev/sdc1)
  Authenticating as: root
  Password: 
  [ pressed ^C ]

That's what I'm avoiding with sudo.

Cheers,
David.



Re: f3tools vs Silicon Power 4T drive

2024-02-16 Thread David Wright
On Sat 17 Feb 2024 at 02:12:49 (+), Andy Smith wrote:
> On Fri, Feb 16, 2024 at 02:02:59PM -0600, David Wright wrote:
> > … which would be moot if only Gene could create partition PARTLABELs
> > successfully.
> 
> Sure, but we still don't know what Gene is trying to do or why
> partition names would be useful to him so I am kind of sceptical
> that this leads anywhere.

  https://lists.debian.org/debian-user/2024/02/msg00604.html

I think Gene was nonplussed¹ by the "wall of HEX numbers" in that
post, where he gives the impression that the by-id/ string has to
be copied into the PARTLABEL field, and looks for meaning in a list
of /dev/disk/ symlinks without their targets.

I would sympathise with the view that by-id/ names are not very
memorable, or easy to transcribe if that's ever required. And,
of course, we've seen that they're not always unique. That may be
a reason to use PARTLABELs instead.

But I don't try to keep up with reports of what Gene's trying to do,
interspersed as they are with stories of He cylinders and Lead-acid
batteries.

¹ British meaning.

Cheers,
David.



Re: partition reporting full, but not

2024-02-16 Thread David Wright
On Sat 17 Feb 2024 at 13:38:56 (+1100), Keith Bainbridge wrote:
> I have just rebooted this laptop to ensure it is 'fresh'
> 
> / is reporting full.
> 
> Trying to locate where I ran
> 
> sudo du -hPx --max-depth=1 /
> 0 /mnt
> 181M  /boot
> 15M   /etc
> 0 /media
> 236M  /opt
> 336K  /root
> 0 /srv
> 4.0K  /tmp
> 8.1G  /usr
> 726M  /var
> 9.2G  /
> keith@dell0 $
> 
>  Sat 17Feb2024@13:33:29
>  :~
> 
> 
>  But:
>   >> sudo df -h /
> Filesystem  Size  Used Avail Use% Mounted on
> /dev/sda336G   35G  100M 100% /
> keith@dell0 $
> 
>  Sat 17Feb2024@13:33:39
>  :~
> 
> Where do I start locating the conflicting information please?

Typically some space is reserved for root, so that you have a little
headroom to extricate yourself from this situation. It looks like it's
the 5% shown below (from an installer screen):

  ┌┤ [!!] Partition disks ├─┐   
  │ │   
  │ You are editing partition #3 of /dev/nvme0n1. This partition is │   
  │ formatted with the Ext4 journaling file system. All data in it WILL │   
  │ BE DESTROYED!   │   
  │ │   
  │ Partition settings: │   
  │ │   
  │  Name:  Umbo-B  │   
  │  Use as:Ext4 journaling file system │   
  │ │   
  │  Format the partition:  yes, format it  │   
  │  Mount point:   /   │   
  │  Mount options: defaults│   
  │  Label: umbo03  │   
  │  Reserved blocks:   5%  │   
  │  Typical usage: standard│   
  │  Bootable flag: off │   
  │ │   
  │  Resize the partition (currently 31.5 GB)   │   
  │  Erase data on this partition   │   
  │  Delete the partition   │   
  │  Done setting up the partition  │   
  │ │   
  ││   
  │ │   
  └─┘   

Cheers,
David.



Re: What sets LC_TIME?

2024-02-16 Thread David Wright
On Fri 16 Feb 2024 at 16:25:05 (-0500), Greg Wooledge wrote:
> On Fri, Feb 16, 2024 at 11:11:09AM -0600, David Wright wrote:
> > On Fri 16 Feb 2024 at 09:12:24 (-0500), Greg Wooledge wrote:
> > > On Fri, Feb 16, 2024 at 03:34:12PM +0200, Anssi Saari wrote:
> > > > Yah. It was ssh passing through all that. On serial console, locale
> > > > settings are as expected:
> > > > 
> > > > $ locale
> > > > LANG=en_US.UTF-8
> > > > LANGUAGE=en_US:en
> > > > LC_CTYPE="en_US.UTF-8"
> > > > LC_NUMERIC="en_US.UTF-8"
> > > > LC_TIME="en_US.UTF-8"
> > > [...]
> > > 
> > > Well then, that just changes the mystery from "happens on the Debian
> > > system I ssh into" to "happens on my ssh client".  For some reason,
> > > your ssh client has all of those LC_* variables set in its environment,
> > > which is still quite unusual.
> > 
> > Could something weird here do that?
> > 
> >   $ grep LC /etc/ssh/*g
> >   /etc/ssh/ssh_config:SendEnv LANG LC_*
> >   /etc/ssh/sshd_config:AcceptEnv LANG LC_*
> >   $ 
> 
> That's all normal and expected.

Yes, they're off my system :) though I should have added -r to
catch any ssh_config.d/* files, as in the illustration below.

> What's odd is that client *actually has* LC_NUMERIC and so on set in
> its environment.  Which... is not a problem if they're all set to the
> correct values.  It's weird, but not wrong.  The problem for the OP was
> that one of the values was not set correctly, or at least not as
> expected.

That's why I posted the last line about SetEnv, illustrated by:

  $ cat /etc/ssh/ssh_config.d/test.conf 
  Host ahost
SetEnv LC_PAPER=en_GB.utf8
  #
  $ ssh ahost
  Linux ahost 5.10.0-27-amd64 #1 SMP Debian 5.10.205-2 (2023-12-31) x86_64

  The programs included with the Debian GNU/Linux system are free software;
  [ … ]
  You have new mail.
  Last login: Fri Feb 16 22:41:18 2024 from 192.168.1.14
  $ locale
  LANG=C.UTF-8
  LANGUAGE=
  LC_CTYPE=en_GB.UTF-8
  LC_NUMERIC="C.UTF-8"
  LC_TIME="C.UTF-8"
  LC_COLLATE="C.UTF-8"
  LC_MONETARY="C.UTF-8"
  LC_MESSAGES="C.UTF-8"
  LC_PAPER=en_GB.utf8←
  LC_NAME="C.UTF-8"
  LC_ADDRESS="C.UTF-8"
  LC_TELEPHONE="C.UTF-8"
  LC_MEASUREMENT="C.UTF-8"
  LC_IDENTIFICATION="C.UTF-8"
  LC_ALL=
  $ 

It's not a place I'd have immediately thought of looking.

> At this point we have no idea whether the ssh client is even a Unix/Linux
> system.  It could be anything.  It could be a literal toaster.

More likely an æbleskiver pan?

Cheers,
David.



Re: f3tools vs Silicon Power 4T drive

2024-02-16 Thread David Wright
On Fri 16 Feb 2024 at 11:59:40 (-0800), David Christensen wrote:
> On 2/15/24 12:59, gene heskett wrote:
> > ...  gigastones, I 5 of them but when all
> > are plugged in there are only 3 becauae there are 2 pairs of
> > matching serial numbers ...
> 
> I recall 2 pairs of SSD's with matching serial numbers.  Please remove
> one SSD of each pair so that the remaining SSD's all have unique
> serial numbers.  Return them for a refund while you still can.  If you
> cannot, put them in another computer or put them on the shelf as
> spares.

Surely split them between at least two computers, so that
neither contains a duplicate?

Cheers,
David.



Re: f3tools vs Silicon Power 4T drive

2024-02-16 Thread David Wright
On Fri 16 Feb 2024 at 14:48:12 (+), Andy Smith wrote:
> On Fri, Feb 16, 2024 at 01:32:26AM -0500, gene heskett wrote:
> > On 2/15/24 16:20, David Wright wrote:
> > ># gdisk -l /dev/sdz
> > >GPT fdisk (gdisk) version 1.0.3
> > > 
> > >Partition table scan:
> > >  MBR: protective
> > >  BSD: not present
> > >  APM: not present
> > >  GPT: present
> > > 
> > >Found valid GPT with protective MBR; using GPT.
> > >Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
> > >Model: Desktop
> > >Sector size (logical/physical): 512/512 bytes
> > >Disk identifier (GUID): A1093790-9A1A-4A7E-A807-B9CC6F7CF77E
> > >Partition table holds up to 128 entries
> > >Main partition table begins at sector 2 and ends at sector 33
> > >First usable sector is 34, last usable sector is 3907029134
> > >Partitions will be aligned on 2048-sector boundaries
> > >Total free space is 2014 sectors (1007.0 KiB)
> > > 
> > >Number  Start (sector)End (sector)  Size   Code  Name
> > >   12048  3907029134   1.8 TiB 8300  Lulu01
> > >#
> > > .
> > And this "partition" name survives?
> 
> No, because it's a filesystem label for the ext4 fs created on
> /dev/sdz1. If sdz1 is turned into an LVM Physical Volume, there
> won't be an ext4 filesystem on it any more. If sdz1 is turned into a
> member of an MD array, there won't be an ext4 filesystem on it any
> more. The labels go with the filesystem.

It isn't a filesystem LABEL. See attached partition and filesystem
information, the output from:

  $ cp -ip /run/udev/data/b8\:33 /tmp/partition-data
  $ cp -ip /run/udev/data/b253\:2 /tmp/filesystem-data
  $ 

In particular, E:ID_PART_ENTRY_NAME=Lulu01 from the first attachment
and E:ID_FS_LABEL=lulu01 // E:ID_FS_LABEL_ENC=lulu01 from the second.

> > and can be unique?
> 
> I don't know what that means to you or why it is useful.
> 
> > and can be used in a mount cmd?
> 
> Once the RAID and/or LVM is set up and a filesystem put on it, that
> filesystem can be mounted by label just like any filesystem can, but
> that filesystem may have multiple devices underneath it owing to the
> fact that it's on RAID and/or LVM, so there is no information you
> can put in its label that will tell you anything about those
> underlying devices.
> 
> > if all 3 questions above can be answered with a yes is the answer
> > I've been trying to squeeze out all along.
> 
> You've not yet been clear about what you want, but from what little
> information you have provided you've been told multiple times by
> multiple people that filesystem labels won't help.
   ↑

… which would be moot if only Gene could create partition PARTLABELs
successfully.

Cheers,
David.
S:disk/by-partuuid/37cf9edf-c695-428e-9889-2f52c40dfca5
S:disk/by-partlabel/Lulu01
S:disk/by-id/ata-ST2000DL003-9VT166_5YD1QX3D-part1
S:disk/by-uuid/11bb81f5-14e5-404a-8548-80bcb1e5071c
S:disk/by-id/usb-Seagate_Desktop_2GHN1XW7-0:0-part1
S:disk/by-path/pci-:00:14.0-usb-0:2:1.0-scsi-0:0:0:0-part1
S:disk/by-id/wwn-0x5000c5002f893194-part1
W:32
I:3947430162
E:ID_ATA=1
E:ID_TYPE=disk
E:ID_BUS=ata
E:ID_MODEL=ST2000DL003-9VT166
E:ID_MODEL_ENC=ST2000DL003-9VT166\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20
E:ID_REVISION=CC98
E:ID_SERIAL=ST2000DL003-9VT166_5YD1QX3D
E:ID_SERIAL_SHORT=5YD1QX3D
E:ID_ATA_WRITE_CACHE=1
E:ID_ATA_WRITE_CACHE_ENABLED=1
E:ID_ATA_FEATURE_SET_HPA=1
E:ID_ATA_FEATURE_SET_HPA_ENABLED=1
E:ID_ATA_FEATURE_SET_PM=1
E:ID_ATA_FEATURE_SET_PM_ENABLED=1
E:ID_ATA_FEATURE_SET_SECURITY=1
E:ID_ATA_FEATURE_SET_SECURITY_ENABLED=0
E:ID_ATA_FEATURE_SET_SECURITY_ERASE_UNIT_MIN=332
E:ID_ATA_FEATURE_SET_SECURITY_ENHANCED_ERASE_UNIT_MIN=332
E:ID_ATA_FEATURE_SET_SMART=1
E:ID_ATA_FEATURE_SET_SMART_ENABLED=1
E:ID_ATA_FEATURE_SET_AAM=1
E:ID_ATA_FEATURE_SET_AAM_ENABLED=1
E:ID_ATA_FEATURE_SET_AAM_VENDOR_RECOMMENDED_VALUE=208
E:ID_ATA_FEATURE_SET_AAM_CURRENT_VALUE=208
E:ID_ATA_DOWNLOAD_MICROCODE=1
E:ID_ATA_SATA=1
E:ID_ATA_SATA_SIGNAL_RATE_GEN2=1
E:ID_ATA_SATA_SIGNAL_RATE_GEN1=1
E:ID_ATA_ROTATION_RATE_RPM=5900
E:ID_WWN=0x5000c5002f893194
E:ID_WWN_WITH_EXTENSION=0x5000c5002f893194
E:ID_USB_MODEL=Desktop
E:ID_USB_MODEL_ENC=Desktop\x20\x20\x20\x20\x20\x20\x20\x20\x20
E:ID_USB_MODEL_ID=3300
E:ID_USB_SERIAL=Seagate_Desktop_2GHN1XW7-0:0
E:ID_USB_SERIAL_SHORT=2GHN1XW7
E:ID_USB_VENDOR=Seagate
E:ID_USB_VENDOR_ENC=Seagate\x20
E:ID_USB_VENDOR_ID=0bc2
E:ID_USB_REVISION=0130
E:ID_USB_TYPE=disk
E:ID_USB_INSTANCE=0:0
E:ID_USB_INTERFACES=:080650:
E:ID_USB_INTERFACE_NUM=00
E:ID_USB

Re: f3tools vs Silicon Power 4T drive

2024-02-16 Thread David Wright
On Fri 16 Feb 2024 at 01:32:26 (-0500), gene heskett wrote:
> On 2/15/24 16:20, David Wright wrote:
> > On Thu 15 Feb 2024 at 20:44:52 (+), Andy Smith wrote:
> > > On Thu, Feb 15, 2024 at 03:19:54PM -0500, gene heskett wrote:
> > > > On 2/15/24 11:21, Andy Smith wrote:
> > > > > You asked if "labels" would survive their associated partition being
> > > > > put into LVM.
> > > > > 
> > > > > I said, "yes if you mean partition names, no if you mean filesystem
> > > > > labels".
> > > > > 
> > > > I'm still confused and it is not all the well clarified by looking at
> > > > gparted, a shot of which I posted.
> > > 
> > > This could all be answered easily if you'd just post the copy-paste
> > > of your terminal scrollback for what you actually did. Hopefully you
> > > don't now object to me asking what you meant since apparently even
> > > you do not know if you mean partition names or filesystem labels.
> > > >From what you posted it now sounds like labels on the ext4
> > > filesystems that you created.
> > 
> > Gene effectively shoots himself in the foot by using gparted (GUI)
> > instead of, say, gdisk where it's easy to paste what was done, or
> > for someone, say me, to post an example:

[ … skipped over creating the partition table … ]

> ># gdisk -l /dev/sdz
> >GPT fdisk (gdisk) version 1.0.3
> > 
> >Partition table scan:
> >  MBR: protective
> >  BSD: not present
> >  APM: not present
> >  GPT: present
> > 
> >Found valid GPT with protective MBR; using GPT.
> >Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
> >Model: Desktop
> >Sector size (logical/physical): 512/512 bytes
> >Disk identifier (GUID): A1093790-9A1A-4A7E-A807-B9CC6F7CF77E
> >Partition table holds up to 128 entries
> >Main partition table begins at sector 2 and ends at sector 33
> >First usable sector is 34, last usable sector is 3907029134
> >Partitions will be aligned on 2048-sector boundaries
> >Total free space is 2014 sectors (1007.0 KiB)
> > 
> >Number  Start (sector)End (sector)  Size   Code  Name
> >   12048  3907029134   1.8 TiB 8300  Lulu01
> >#
> > 
> And this "partition" name survives?, and can be unique?, and can be
> used in a mount cmd?  That's how I'll do it then.  This if all 3
> questions above can be answered with a yes is the answer I've been
> trying to squeeze out all along.  Thank you.

Yes, the partition name (PARTLABEL) is in the partition table, not
inside the partition itself. It's as unique as you make it, because
you choose it. I've scrawled the names of my disks on the casing with
a magic marker for 25 years, from adam (6.4GB fujitsu) to wick (2TB WD).
The PARTLABELs and LABELs use that name as the stem, capitalised and
lowercase respectively.

As for using it with the mount command, that depends on what the
partition contains. For a straightforward filesystem, you can, as
described by   man mount (under Indicating the device and filesystem).

But I wouldn't, and I don't think you want to, as I believe you want
to use the partition as /part/ of something larger.

Whether you /can/ use it to mount depends on what the partition
contains. I don't use LVM or RAID, so I can't advise you there, except
to say that you wouldn't want to mount one piece of a larger structure,
AFAIK. But in my case, I use LUKS encryption, and I can demonstrate
what happens:

  $ sudo udisksctl unlock --block-device /dev/disk/by-partlabel/Lulu01
  Passphrase: 
  Unlocked /dev/sdc1 as /dev/dm-2.
  $ 

  # mount /dev/disk/by-partlabel/Lulu01 /media/lulu01
  mount: /media/lulu01: unknown filesystem type 'crypto_LUKS'.
  # 

You don't want to mount the partition, but the filesystem /within/ the
partition:

  # mount LABEL=lulu01 /media/lulu01
  # 

Of course, I don't normally use mount as root because I have an entry
in /etc/fstab:

  LABEL=lulu01 /media/lulu01 ext4 rw,errors=remount-ro,user,noauto

and I use a bash function called, surprisingly, lulu, as there's only
one partition on the disk:

  $ type lulu
  lulu is a function
  lulu () 
  { 
sudo udisksctl unlock --block-device /dev/disk/by-partlabel/Lulu01 && mount 
/media/lulu01
  }
  $ 

thus:

  $ lulu
  Passphrase: 
  Unlocked /dev/sdc1 as /dev/dm-2.
  $ 

But I would emphasise that, having unlocked the partition, I mount
the filesystem because it stands alone. It's not part of a RAID,
LVM, or whatever, that might need assembling with other components
before mounting the whole ensemble.

Cheers,
David.



Re: What sets LC_TIME?

2024-02-16 Thread David Wright
On Fri 16 Feb 2024 at 09:12:24 (-0500), Greg Wooledge wrote:
> On Fri, Feb 16, 2024 at 03:34:12PM +0200, Anssi Saari wrote:
> > Yah. It was ssh passing through all that. On serial console, locale
> > settings are as expected:
> > 
> > $ locale
> > LANG=en_US.UTF-8
> > LANGUAGE=en_US:en
> > LC_CTYPE="en_US.UTF-8"
> > LC_NUMERIC="en_US.UTF-8"
> > LC_TIME="en_US.UTF-8"
> [...]
> 
> Well then, that just changes the mystery from "happens on the Debian
> system I ssh into" to "happens on my ssh client".  For some reason,
> your ssh client has all of those LC_* variables set in its environment,
> which is still quite unusual.

Could something weird here do that?

  $ grep LC /etc/ssh/*g
  /etc/ssh/ssh_config:SendEnv LANG LC_*
  /etc/ssh/sshd_config:AcceptEnv LANG LC_*
  $ 

Perhaps the OP's also sets SetEnv … in the client's config?

Cheers,
David.



Re: Does "LC_ALL=C" work on all shells?

2024-02-15 Thread David Wright
On Thu 15 Feb 2024 at 21:17:44 (+0100), Franco Martelli wrote:
> On 15/02/24 at 03:28, Max Nikulin wrote:
> > > # env LC_ALL=C script -t 2>~/upgrade-bookwormstep.time -a
> > > ~/upgrade-bookwormstep.script
> > 
> > Perhaps LC_ALL=C.UTF-8 is safer. At least several years ago some
> > python scripts (unrelated to Debian upgrade however) failed trying
> > to log e.g. non-ascii file paths, etc.
> > 
> > I would reset LANGUAGE as well otherwise some programs may use
> > localized messages.
> > 
> > Finally, some users might have LC_ALL (despite it is not
> > recommended) or LANGUAGE set in a file like ~/.bashrc. That is why
> > the following approach may be more reliable. Run commands within
> > the "script" session
> > 
> >      LANG=C.UTF-8; LANGUAGE=; export LANG LANGUAGE
> > 
> > with a note concerning csh. To affect messages generated by shell
> > itself, "export" is separated from setting of the variables.
> 
> Doesn't LC_ALL=C setting override LANG or LANGUAGE settings? On my
> system I have:
> 
> ~$ env | grep LANG
> LANGUAGE=
> LANG=it_IT.UTF-8

BTW, you can also print locale information with:

  $ locale
  LANG=C.UTF-8
  LANGUAGE=
  LC_CTYPE=en_GB.UTF-8
  LC_NUMERIC="C.UTF-8"
  LC_TIME="C.UTF-8"
  LC_COLLATE="C.UTF-8"
  LC_MONETARY="C.UTF-8"
  LC_MESSAGES="C.UTF-8"
  LC_PAPER="C.UTF-8"
  LC_NAME="C.UTF-8"
  LC_ADDRESS="C.UTF-8"
  LC_TELEPHONE="C.UTF-8"
  LC_MEASUREMENT="C.UTF-8"
  LC_IDENTIFICATION="C.UTF-8"
  LC_ALL=
  $ 

> and LC_ALL=C override the LANG setting when used inline of the
> command. This approach is to cover all cases, my goal is to do
> apt/apt-get commands output in English when they are executed into a
> "script" session.

Yes, LC_ALL=C will override all the locale variables,
but LC_ALL=C.UTF-8 will not:

  $ LC_ALL=C.UTF-8 LANGUAGE=it LANG=it_IT.UTF-8 aptitude why firefox-esr
  i   firefox-esr-l10n-en-gb Dipende firefox-esr (< 115.7.0esr-1~deb11u1.1~)
  $ LC_ALL=C LANGUAGE=it LANG=it_IT.UTF-8 aptitude why firefox-esr
  i   firefox-esr-l10n-en-gb Depends firefox-esr (< 115.7.0esr-1~deb11u1.1~)
  $ 

Cheers,
David.



Re: f3tools vs Silicon Power 4T drive

2024-02-15 Thread David Wright
On Thu 15 Feb 2024 at 20:44:52 (+), Andy Smith wrote:
> On Thu, Feb 15, 2024 at 03:19:54PM -0500, gene heskett wrote:
> > On 2/15/24 11:21, Andy Smith wrote:
> > > You asked if "labels" would survive their associated partition being
> > > put into LVM.
> > > 
> > > I said, "yes if you mean partition names, no if you mean filesystem
> > > labels".
> > > 
> > I'm still confused and it is not all the well clarified by looking at
> > gparted, a shot of which I posted.
> 
> This could all be answered easily if you'd just post the copy-paste
> of your terminal scrollback for what you actually did. Hopefully you
> don't now object to me asking what you meant since apparently even
> you do not know if you mean partition names or filesystem labels.
> >From what you posted it now sounds like labels on the ext4
> filesystems that you created.

Gene effectively shoots himself in the foot by using gparted (GUI)
instead of, say, gdisk where it's easy to paste what was done, or
for someone, say me, to post an example:

  # gdisk /dev/sdz
  GPT fdisk (gdisk) version 1.0.3

  Partition table scan:
MBR: not present
BSD: not present
APM: not present
GPT: not present

  Creating new GPT entries.

  Command (? for help): o
  This option deletes all partitions and creates a new protective MBR.
  Proceed? (Y/N): y

  Command (? for help): p
  Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
  Model: Desktop 
  Sector size (logical/physical): 512/512 bytes
  Disk identifier (GUID): A1093790-9A1A-4A7E-A807-B9CC6F7CF77E
  Partition table holds up to 128 entries
  Main partition table begins at sector 2 and ends at sector 33
  First usable sector is 34, last usable sector is 3907029134
  Partitions will be aligned on 2048-sector boundaries
  Total free space is 3907029101 sectors (1.8 TiB)

  Number  Start (sector)End (sector)  Size   Code  Name

  Command (? for help): n
  Partition number (1-128, default 1): 
  First sector (34-3907029134, default = 2048) or {+-}size{KMGTP}: 
  Last sector (2048-3907029134, default = 3907029134) or {+-}size{KMGTP}: 
  Current type is 'Linux filesystem'
  Hex code or GUID (L to show codes, Enter = 8300): 
  Changed type of partition to 'Linux filesystem'

  Command (? for help): c
  Using 1
  Enter name: Lulu01

  Command (? for help): i
  Using 1
  Partition GUID code: 0FC63DAF-8483-4772-8E79-3D69D8477DE4 (Linux filesystem)
  Partition unique GUID: 37CF9EDF-C695-428E-9889-2F52C40DFCA5
  First sector: 2048 (at 1024.0 KiB)
  Last sector: 3907029134 (at 1.8 TiB)
  Partition size: 3907027087 sectors (1.8 TiB)
  Attribute flags: 
  Partition name: 'Lulu01'

  Command (? for help): w

  Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
  PARTITIONS!!

  Do you want to proceed? (Y/N): y
  OK; writing new GUID partition table (GPT) to /dev/sdb.
  The operation has completed successfully.
  # 

  # gdisk -l /dev/sdz
  GPT fdisk (gdisk) version 1.0.3

  Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present

  Found valid GPT with protective MBR; using GPT.
  Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
  Model: Desktop 
  Sector size (logical/physical): 512/512 bytes
  Disk identifier (GUID): A1093790-9A1A-4A7E-A807-B9CC6F7CF77E
  Partition table holds up to 128 entries
  Main partition table begins at sector 2 and ends at sector 33
  First usable sector is 34, last usable sector is 3907029134
  Partitions will be aligned on 2048-sector boundaries
  Total free space is 2014 sectors (1007.0 KiB)

  Number  Start (sector)End (sector)  Size   Code  Name
 12048  3907029134   1.8 TiB 8300  Lulu01
  # 

Cheers,
David.



Re: f3tools vs Silicon Power 4T drive

2024-02-15 Thread David Wright
On Thu 15 Feb 2024 at 16:12:06 (+), Andy Smith wrote:
> On Wed, Feb 14, 2024 at 09:56:07PM -0500, gene heskett wrote:
> > > On 2/14/24 19:48, Andy Smith wrote:
> > > > I hope you are putting a level of redundancy under that LVM or are
> > > > using the redundancy features of LVM (which you need to go out of
> > > > your way to do). Otherwise by default what you'll have is not
> > > > redundant and a device failure will lose at least the contents of
> > > > that device, possibly more.
> > > > 
> > You pique my curiosity because this is going to be my backup system, but not
> > a syllable about how to do it. You tell me its fine 3 paragraphs up. then
> > tell me lvcreate will wipe it out.  I'm asking for answers, not more
> > connumdrums..
> 
> You've split your reply to my mail across three different emails and
> now you're replying to a part about redundancy, but asking questions
> about something completely different, all while referring to bits
> that are not proximal to where your text is, so it's unclear to me
> exactly what you are asking about.
> 
> You asked if "labels" would survive their associated partition being
> put into LVM.
> 
> I said, "yes if you mean partition names, no if you mean filesystem
> labels".
> 
> To my implied question about your redundancy plans (if any), you
> then complain that I have not given you "a syllable about how to do
> it". Do *what*? I don't yet know what your plans are in that regard.
> If you have questions, ask them.

I think the paste in
  https://lists.debian.org/debian-user/2024/02/msg00611.html
shows that SiPwr_1 is a filesystem LABEL, not a PARTLABEL,
lying as it does between an FSVER and a UUID.

Cheers,
David.



Re: Issue with USB External Keyboard, External Mouse, and Screen Brightness on Dell Laptop

2024-02-14 Thread David Wright
On Wed 14 Feb 2024 at 20:09:09 (-0300), Marcelo Laia wrote:
> Unfortunately, the issue has worsened. Today, I observed that upon unplugging 
> the power cable, within one or two seconds, the screen dims (brightness is 
> set to zero), and both the external mouse and keyboard (USB) stop working. 
> Even if I try to use the keyboard or mouse, they do not reactivate. Only the 
> laptop's internal touchpad and keyboard continue to function. When I 
> reconnect the power cable, both the external mouse and keyboard resume 
> working automatically. However, I need to manually adjust the screen 
> brightness. I have not installed the usbguard package. Could there be another 
> underlying cause?

I would go further than tomas, and suggest that the battery might be
suspect, or the charging circuit of course. (None of my three laptops
works without AC power.) How old is it?

Cheers,
David.



Re: shred bug? [was: Unidentified subject!]

2024-02-14 Thread David Wright
On Tue 13 Feb 2024 at 11:21:08 (-0500), Greg Wooledge wrote:
> On Tue, Feb 13, 2024 at 09:35:11AM -0600, David Wright wrote:
> > On Tue 13 Feb 2024 at 07:15:48 (-0500), Greg Wooledge wrote:
> > > On Mon, Feb 12, 2024 at 11:01:47PM -0600, David Wright wrote:
> > > > … but not much. For me, "standard output" is /dev/fd/1, yet it seems
> > > > unlikely that anyone is going to use >&1 in the manner of the example.
> > > 
> > > Standard output means "whatever file descriptor 1 points to".  That
> > > could be a file, a pipe, a terminal (character device), etc.
> > 
> > Why pick on 1?
> 
> It's the definition.  Standard input is FD 0, standard output is FD 1,
> and standard error is FD 2.
> 
> > . It demonstrates the shell syntax element required (&) in order to
> >   avoid truncating the file, rather than shred overwriting it.
> 
> You are confused.  You're making assumptions about shell syntax that
> are simply not true.

You're right. I was looking too hard at the right side of the > and
neglecting the implied left side. It's always worth running these
things past your eyes. Thanks for the clear exposition that followed.

Cheers,
David.



Re: shred bug? [was: Unidentified subject!]

2024-02-13 Thread David Wright
On Tue 13 Feb 2024 at 07:15:48 (-0500), Greg Wooledge wrote:
> On Mon, Feb 12, 2024 at 11:01:47PM -0600, David Wright wrote:
> > … but not much. For me, "standard output" is /dev/fd/1, yet it seems
> > unlikely that anyone is going to use >&1 in the manner of the example.
> 
> Standard output means "whatever file descriptor 1 points to".  That
> could be a file, a pipe, a terminal (character device), etc.

Why pick on 1?

> > I might write something like: "The option ‘-’ shreds the file specified
> > by the redirection ‘>&N’", though there could be a better name for ‘>&N’.
> 
> You're assuming the program will be used from a shell.  This is *usually*
> going to be true, but nothing prevents you from writing a C program
> which closes stdout, opens a file, ensures that it's using FD 1,
> and then calls "shred -".  The documentation has to support this use
> case as well.

/As well/ — which is why I wrote N in place of 1. The original bug
report (which I hadn't seen until Thomas' post) says:
 "If you redirect output to a file it will work. Shredding a tty doesn't
  make much sense, after all."
  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=155175#10

Now, you can't write "If you redirect output to a file it will work"
in a man page—it needs recasting into something more like what
I wrote above, which contains two key points:

. It points out that '-' is an option, not a filename or a stand-in
  for one, and it doesn't use the word standard, which is totally
  irrelevant in the circumstances.

. It demonstrates the shell syntax element required (&) in order to
  avoid truncating the file, rather than shred overwriting it.

I think that getting the "&" into the man page would be helpful
to anybody who doesn't look at the info page for the example.
It might have shortened the early part of this thread as well.

As for C programmers, neither FD number nor truncation is relevant.
Sure, you can pick 1. But you don't have to document that for shred.
And truncation is an accident that can occur because of shell's
redirect syntax: there's no equivalent in programs.

> > >A FILE of ‘-’ denotes standard output.  The intended use of this is
> > >to shred a removed temporary file.  For example:
> > > 
> > >   i=$(mktemp)
> > >   exec 3<>"$i"
> > >   rm -- "$i"
> > >   echo "Hello, world" >&3
> > >   shred - >&3
> > >   exec 3>-
> > 
> > I can see that the last line truncates the "anonymous" file,
> 
> No, that's not what it does at all.  In fact, that last line is
> written incorrectly.  It should say "exec 3>&-" and what that does
> is close file descriptor 3, which was previously opened on line 2.
> 
> What it actually does *as written* is create/truncate a file whose
> name is "-", close the previously opened FD 3, and make FD 3 point
> to the file named "-".
> 
> unicorn:~$ exec 3>-
> unicorn:~$ ls -ld -- -
> -rw-r--r-- 1 greg greg 0 Feb 13 07:12 -
> unicorn:~$ ls -l /dev/fd/3
> l-wx-- 1 greg greg 64 Feb 13 07:12 /dev/fd/3 -> /home/greg/-
> 
> This is an obvious bug in the info page.  I wonder how many years
> this has gone unnoticed.

Well spotted. That's what an experienced eye brings to a line like
that, whereas I assumed it meant something beyond my experience,
and searched for it.

Ironic that it truncates a file, and then immediately warns against
truncating a file instead of shredding it.

Cheers,
David.



Re: shred bug? [was: Unidentified subject!]

2024-02-12 Thread David Wright
On Sun 11 Feb 2024 at 09:16:00 (-0600), David Wright wrote:
> On Sun 11 Feb 2024 at 09:54:24 (-0500), Greg Wooledge wrote:
> > On Sun, Feb 11, 2024 at 03:45:21PM +0100, to...@tuxteam.de wrote:
> > > Still there's the discrepancy between doc and behaviour.
> > 
> > There isn't.  The documentation says:
> > 
> > SYNOPSIS
> >shred [OPTION]... FILE...
> > 
> > DESCRIPTION
> >Overwrite  the specified FILE(s) repeatedly, in order to make it 
> > harder
> >for even very expensive hardware probing to recover the data.
> > 
> >If FILE is -, shred standard output.
> > 
> > In every sentence, the word FILE appears.  There's nothing in there
> > which says "you can operate on a non-file".
> > 
> > Once you grasp what the command is *intended* to do (rewind and overwrite
> > a file repeatedly), it makes absolutely perfect sense that it should
> > only operate on rewindable file system objects.
> > 
> > If you want it to write a stream of data instead of performing its normal
> > operation (rewinding and rewriting), that's a new feature.
> > 
> > If you'd prefer the documentation to say explicitly "only regular files
> > and block devices are allowed", that would be an upstream documentation
> > *clarification* request.
> 
> Perhaps info puts it better?

… but not much. For me, "standard output" is /dev/fd/1, yet it seems
unlikely that anyone is going to use >&1 in the manner of the example.

I might write something like: "The option ‘-’ shreds the file specified
by the redirection ‘>&N’", though there could be a better name for ‘>&N’.

>A FILE of ‘-’ denotes standard output.  The intended use of this is
>to shred a removed temporary file.  For example:
> 
>   i=$(mktemp)
>   exec 3<>"$i"
>   rm -- "$i"
>   echo "Hello, world" >&3
>   shred - >&3
>   exec 3>-

I can see that the last line truncates the "anonymous" file, but where
is that construction documented¹, and how would one parse the syntax
elements   FD  >  -   to make them mean truncate?

>However, the command ‘shred - >file’ does not shred the contents of
>FILE, since the shell truncates FILE before invoking ‘shred’.  Use
>the command ‘shred file’ or (if using a Bourne-compatible shell) the
>command ‘shred - 1<>file’ instead.

¹ the string ">-" doesn't appear in /usr/share/doc/bash/bashref.pdf,
  ver 5.1, for example.

Cheers,
David.



Re: [ *** ] Job anacron.service/stop running (15min 49s / no limit)

2024-02-11 Thread David Wright
On Sun 11 Feb 2024 at 20:41:51 (+), Darac Marjal wrote:
> On 11/02/2024 11:21, Rainer Dorsch wrote:

> > - How do I set a timeout/limit for anacron, that it cannot block forever
> > during a reboot?
> 
> It may be germane to point out that anacron.service already explicitly
> sets "TimeoutStopSec=Infinity". So, in the opinion of the developers,
> the service shouldn't be prematurely killed. Of course you, as the
> system administrator, always have the right to countermand that sort
> of decision, but it would be curious to find out why the developers
> thought they needed to override the systemd default in the first
> place?

Bug #915379 explains all: long-running cron jobs, like backups, can
get killed, and there was also an issue with exim.

There's mention there of an anacron replacement called cronie, but
I don't know what the status of this is, besides being in trixie.

Cheers,
David.



Re: Home UPS recommendations

2024-02-11 Thread David Wright
On Fri 09 Feb 2024 at 22:28:28 (-0500), Felix Miata wrote:
> When you live on a power grid, extended outages are much less common than 
> when on
> or near waterfront or political boundaries. Most of Florida's population has 
> no
> out-of-state neighbors to share utilities with, making its grid more fragile.
> Being the lightning capital of the world doesn't help either.

Of the US, sure. But I don't think FL can compete with Maracaibo.

Cheers,
David.



Re: How can we change the keyboard layout?

2024-02-11 Thread David Wright
On Wed 07 Feb 2024 at 06:58:39 (+0100), hw wrote:
> On Tue, 2024-02-06 at 21:43 -0600, David Wright wrote:
> > On Tue 06 Feb 2024 at 11:28:11 (+0100), hw wrote:
> > > [...]
> > > I'm talking about wayland all the time; you brought Xorg up instead.
> > 
> > If that concerned you unduly, you could have put that in the Subject
> > line.
> 
> It doesn't concern me.
> 
> > It's also obvious that "change the keyboard layout" is ambiguous,
> > and you didn't intend to mean switching between two layouts.
> 
> It's not at all obvious, and it's not really ambiguous.  Changing the
> keyboard layout has always been about changing the keybaord layout and
> never about switching between different keyboards or between different
> layouts.  That only came up much later when such a feature was added
> to some so-called desktop environments, and it's a very short sighted
> feature since it omits a way of changing they keyboard layouts, which
> is a far more important feature.

It seems quite important when you're used to typing in more than
one language, and want your layout to match what you're used to.

> > > [...]
> > My 2014 keyboard appears to identify itself correctly as a K520. My
> > old IBM M says it's an "AT Translated Set 2 keyboard", which seems
> > reasonable for a keyboard dating from 1988.
> 
> I can see USB keyboards identifying themselves, but keyboards with
> PS/2 or DIN connectors?  How does your keyboard from 1988 connect?

PS/2. IIRC it came with a genuine IBM PS/2 computer.

> > In 26 years, the number of keys has increased considerably, from 102
> > to 107, plus six audiovisual buttons. Two of the extra keys are
> > shifting ones (win and fn).
> 
> 10% more keys isn't considerably more.  Can you show me a keyboard
> with 122 keys that has all keys usable and unique rather than sending
> key combinations instead?

That would be difficult: I've never had a 122 key keyboard, or
even seen one. You have one. In terms of xev output, are there
duplicate keys? Which ones, and how does xev identify them?

The keyboards I have access to all send usable keycodes, even where
the engravings are the same, eg, Return/36 and KP_Enter/104 are both
engraved with "Enter", KP_Subtract/82 and minus/20 are both engraved
with "-".

The only key on this K520 that doesn't send a keycode on its own is
the gold FN key, which behaves more like a laptop's Fn key, sending
"control functions" like Sleep; plus a battery charge indicator.

> > > We're still trying to figure out keyboards manually.  Instead of
> > > improvements, we now have come so far that we even can't do that at
> > > all now.
> > 
> > I'm guessing that criticism is specific to wayland.
> 
> No, it's about keyboards and computers.

Well excuse me. You did say earlier that you were talking about
wayland all the time. Now, without indication, you're talking about
all keyboards and computers. How are we meant to keep up?

As for figuring out keyboards, I would say that Xorg does a pretty
flexible job. There are plenty of preselected options available in
/usr/share/X11/xkb/rules/base.lst, and I guess you can override
all you like with /etc/X11/xkb/ to get whatever you like. Not that
I've needed to do so, as the options provided work here AFAICT.

> Can you show me a keyboard
> that you can plug in and have working with the correct keyboard layout
> so that every key does what it is supposed to do without any
> configuration required?

No, not without /any/ configuration. I'm guessing that you mean an
EDID-like PROM that completely describes the layout of every key.
I don't know that keyboard manufacturers have ever looked at
something like that, at least for detached keyboards.

But even then, it's likely that some configuration would be necessary
as people exercise their own preferences over at least such things as
CapsLock's behaviour and placement. If such advances led to an
inability to tweak the layout, I'd see that as a backward step.

> I haven't seen one yet.  You still need to pick a keyboard in a Debian
> or Fedora installer because it can't figure out for what language the
> keyboard is, how many keys it has and whatever else may be necessary.
> When you log into a GUI like gnome, you still need to pick the
> keyboard layout in case you connected a different keyboard after the
> installation.
> 
> I can connect a German keyboard instead of the currently connected US
> one and neither the console nor gnome would adjust to that.  That one
> keyboard identifies itself as 'foo' and the other one as 'bar' doesn't
&g

Re: shred bug? [was: Unidentified subject!]

2024-02-11 Thread David Wright
On Sun 11 Feb 2024 at 09:54:24 (-0500), Greg Wooledge wrote:
> On Sun, Feb 11, 2024 at 03:45:21PM +0100, to...@tuxteam.de wrote:
> > On Sun, Feb 11, 2024 at 09:37:31AM -0500, Greg Wooledge wrote:
> > > On Sun, Feb 11, 2024 at 08:02:12AM +0100, to...@tuxteam.de wrote:
> > 
> > [...]
> > 
> > > > What Thomas was trying to do is to get a cheap, fast random number
> > > > generator. Shred seems to have such.
> > > 
> > > Well... I certainly wouldn't call it a bug.  Maybe a feature request.
> > 
> > Still there's the discrepancy between doc and behaviour.
> 
> There isn't.  The documentation says:
> 
> SYNOPSIS
>shred [OPTION]... FILE...
> 
> DESCRIPTION
>Overwrite  the specified FILE(s) repeatedly, in order to make it harder
>for even very expensive hardware probing to recover the data.
> 
>If FILE is -, shred standard output.
> 
> In every sentence, the word FILE appears.  There's nothing in there
> which says "you can operate on a non-file".
> 
> Once you grasp what the command is *intended* to do (rewind and overwrite
> a file repeatedly), it makes absolutely perfect sense that it should
> only operate on rewindable file system objects.
> 
> If you want it to write a stream of data instead of performing its normal
> operation (rewinding and rewriting), that's a new feature.
> 
> If you'd prefer the documentation to say explicitly "only regular files
> and block devices are allowed", that would be an upstream documentation
> *clarification* request.

Perhaps info puts it better?

   A FILE of ‘-’ denotes standard output.  The intended use of this is
   to shred a removed temporary file.  For example:

  i=$(mktemp)
  exec 3<>"$i"
  rm -- "$i"
  echo "Hello, world" >&3
  shred - >&3
  exec 3>-

   However, the command ‘shred - >file’ does not shred the contents of
   FILE, since the shell truncates FILE before invoking ‘shred’.  Use
   the command ‘shred file’ or (if using a Bourne-compatible shell) the
   command ‘shred - 1<>file’ instead.

Cheers,
David.


Re: How can we change the keyboard layout?

2024-02-06 Thread David Wright
On Tue 06 Feb 2024 at 11:28:11 (+0100), hw wrote:
> On Mon, 2024-02-05 at 22:25 -0600, David Wright wrote:
> > On Tue 06 Feb 2024 at 00:11:43 (+0100), hw wrote:
> > [...]
> > > How can it be so difficult to get basic things like that right?  It
> > > still sucks because after more then 30 years, we still don't have a
> > > good way to change the keyboard layouts!
> > 
> > I presume you're now talking about wayland, though I don't think it's
> > been around for 30 years.
> 
> I'm talking about wayland all the time; you brought Xorg up instead.

If that concerned you unduly, you could have put that in the Subject
line. It's also obvious that "change the keyboard layout" is ambiguous,
and you didn't intend to mean switching between two layouts.

> Keyboards are around for more than 30 years, and they have always been
> troublesome.  I'm finding it amazing that there were no features added
> over time, like the ability to actually have more keys and every
> keyboard giving information about itself to the computer.  If displays
> were like keyboards, we'd still be trying to figure out modelines
> manually.

My 2014 keyboard appears to identify itself correctly as a K520. My
old IBM M says it's an "AT Translated Set 2 keyboard", which seems
reasonable for a keyboard dating from 1988.

In 26 years, the number of keys has increased considerably, from 102
to 107, plus six audiovisual buttons. Two of the extra keys are
shifting ones (win and fn).

> We're still trying to figure out keyboards manually.  Instead of
> improvements, we now have come so far that we even can't do that at
> all now.

I'm guessing that criticism is specific to wayland.

> > > Xorg doesn't seem to be maintained anymore and is on the way out.
> > > 
> > > So how do you change the keyboard layout when using wayland?
> > 
> > I've no idea. I don't seem to have noticed that X is on the way out.
> 
> It is.  Apparently nobody wants to maintain it anymore, and Fedora
> seems to have plans to omit it entirely for next release (which is
> like 4 months away).  And it makes perfect sense to omit it.

I haven't seen a reference for this. I have seen references
that say something quite different.

> I'm sure others will follow.  It's only that an up to it's date Debian
> is already outdated so badly that you can't even get an AMD graphics
> card to work which was released a year ago.  Maybe that's why Debian
> users haven't noticed yet.
> 
> Already 20 years ago Debian was so outdated that I had to run testing
> even on servers, and that's one of the reasons why I'm very reluctant
> to use it for servers now.  Unfortunately, that leaves no good
> alternative for servers.

I can't make heads or tails of this. I don't know whether you have
some unique problems with running Debian: you certainly seem to have
an awful lot of them.

Cheers,
David.



Re: Many systemd units do not start anymore

2024-02-05 Thread David Wright
On Tue 06 Feb 2024 at 09:51:02 (+0700), Max Nikulin wrote:
> On 06/02/2024 03:46, Michael Biebl wrote:
> > If you are not using systemd-timesyncd, you could also consider
> > disabling systemd-time-wait-sync.service (via systemctl disable).
> 
> My guess is that this board does not have RTC,

I don't understand how it would have worked before.

> so NTP is a must have
> and dependency on time synchronization is intentional.
> 
> The question is whether it is Debian or some derivative like armbian.
> 
> Perhaps proper timeouts may be set for the case when network is not
> available.

Cheers,
David.



Re: How can we change the keyboard layout?

2024-02-05 Thread David Wright
On Tue 06 Feb 2024 at 00:11:43 (+0100), hw wrote:
> On Mon, 2024-02-05 at 20:59 +, Michael Kjörling wrote:
> > On 5 Feb 2024 21:06 +0100, from h...@adminart.net (hw):
> > > [...]
> > > --- and then I need to be able to change the keyboard layout in
> > > wayland sessions unless I use an US keyboard.  But I only have one
> > > of those.
> > 
> > Pretty sure /etc/default/keyboard has been a thing on Debian for just
> > about forever. I haven't dug into the details but it seems to date
> > back to 2006 which would put its first appearance at circa Sarge or
> > Etch (3.1/mid-2005 or 4.0/early-2007 respectively); possibly even
> > earlier, but that's as far back as the console-setup package history
> > goes.
> 
> Yeah it was an issue back then, and how do you know that there's such
> a thing as /etc/default/keyboard and what it means.

man keyboard perhaps? (First paragraph in Description.)

> Try to get a
> German Model M keyboard to work right with Xorg in, for example, 2010.
> 
> It starts with the question 'How many keys does it have?' and soon the
> question is 'How do I turn CapsLock into Ctrl?' and 'How do I put that
> into xorg.conf?' --- which eventually was omitted, so you had to bring
> that back, and that even in snippets, to get it to work.  Ugh ...

Would you get more help on the German list, as one might expect
people there to be using German layouts more frequently?

  caps:ctrl_modifier   Caps Lock is also a Ctrl

xorg.conf is only omitted because by default it is empty. I drop a
small file into xorg.conf.d just because the side buttons on one of
my mice are a nuisance. But I don't resent not having to specify
all those Screens, Monitors and Devices that used to be necessary.

> Even fvwm kinda never got it right because stuff would change in some
> ideosyncratic, unexpected way depending on if NumLock was on or off.
> So don't you dare to turn that off --- and for almost 30 years we had
> to manually switch on NumLock every time we started an X11 session and
> if we were to switch to a console, we had to turn it on again and then
> do something because it was screwed up after switching back (or the
> other way round).

As I have NumLock turned off, and never turn it on, I haven't had
occasion to use IgnoreModifiers in fvwm, but

  IgnoreModifiers 2

is meant to ignore that modifier.

> How can it be so difficult to get basic things like that right?  It
> still sucks because after more then 30 years, we still don't have a
> good way to change the keyboard layouts!

I presume you're now talking about wayland, though I don't think it's
been around for 30 years.

> > The one on my Bookworm system even has a comment right there on how to
> > use an entirely custom keymap, and that's also mentioned in the
> > keyboard(5) man page.
> 
> "In Debian systems the default keyboard layout is described in
>  /etc/default/keyboard and it is shared between X and the
>  console."
> 
> Xorg doesn't seem to be maintained anymore and is on the way out.
> 
> So how do you change the keyboard layout when using wayland?

I've no idea. I don't seem to have noticed that X is on the way out.

Cheers,
David.



Re: what keyboard do you use?

2024-02-05 Thread David Wright
On Fri 02 Feb 2024 at 20:25:09 (-0500), Lee wrote:
> I bought a Dell desktop in 2019 and the keyboard just died :(
> 
> ssh in from another machine & do a 'sudo reboot now' and get an alert
> about 'Keyboard not found.'  on power up.  The keyboard also doesn't
> work in another machine so it's really & truly dead.
> 
> I figure there's a high percentage of keyboard jockeys here so ..
> which keyboard do you like and why?
> 
> I have a Logitech k740 attached to my Windows machine which is ok.
> Not great but OK.
> I found a spare Logitech k120 keyboard in the closet; its better than
> nothing but too thick for regular use.
> And the old Dell keyboard from the Windows machine - also too thick,
> the keys are too cramped and lettering has worn off on about 1/4 of
> the keys (which is why I got the Logitech 740)

Most of the time I use a Logitech K520, bought with a unified mouse,
though I use it with a wired optical mouse. We have another K520 and
a K540, also with mice, though the mice are scattered around. The
540 says Logitech Europe, though it's a US layout like the rest.

I also have an M 1391406 keyboard from 1988, with a GB layout, so
it's got 102 keys. I use it on a 2011 Dell tower (which has PS/2
connectors), paired with a 20-year old Logitech Pilot 3-button.

In a cupboard we've also got a couple of MS Internet Pros (US) and
a Viglen (GB), all USB wired. I don't like their touch.

Cheers,
David.



Re: How can we change the keyboard layout? (was: what keyboard do you use?)

2024-02-05 Thread David Wright
On Mon 05 Feb 2024 at 21:06:30 (+0100), hw wrote:
> On Mon, 2024-02-05 at 15:26 +0100, Loris Bennett wrote:
> > hw  writes:
> > > On Sun, 2024-02-04 at 18:23 +, Michael Kjörling wrote:
> > > > On 4 Feb 2024 12:08 -0600, from n...@n0nb.us (Nate Bargmann):
> > > > > xmodmap trickery?  I am running GNOME on Wayland.
> > > > 
> > > > Or whatever the equivalent in Wayland (or GNOME) might be. Either way,
> > > > surely there must be _some_ way to map (sets of) keyboard scan codes
> > > > to symbols or actions, and that way is almost certainly reconfigurable
> > > > because otherwise everyone would be stuck with the exact same keyboard
> > > > layout, which would make for a rather poor internationalization/
> > > > localization experience.
> > > 
> > > We are stuck with it :(  Last time I checked, KDE isn't any better.
> > > 
> > > With xmodmap, I was able to adjust the layout as needed.  With
> > > wayland, I can't do that anymore and I'm stuck with an US layout ---
> > > which my keyboard fortunately physically has --- because some keys on
> > > German keyboards are so badly placed and configured that I need to be
> > > able to change the layout if want to use a German keyboard with a
> > > German layout.
> > 
> > Maybe I have misunderstood the problem, but I use Gnome with Wayland and
> > regularly switch between US and German layouts.  I just added the German
> > layout in the 'Keyboard' section of Gnome's Settings and switch with the
> > default shortcut of 'Super + space'.
> 
> Yes, it's a misunderstanding: How can we change the keyboard layout?
> 
> We can only pick or add another of the available layouts, but we can't
> change them.  If I were using a German keyboard, I could pick a German
> layout, and it would be a good starting point --- but I still won't be
> able to change the layout.  Some characters on a German keyboard (and
> layout) are placed very badly, and I need to change some of them for
> the keyboard to be usable.
> 
> And try to figure out how to press ^] on a German keyboard, for
> example, like telnet used to tell you.  It's no problem at all with an
> US keyboard without any modification.  With a German keyboard, you
> have to press something like AltGr+Shift+Strg+] ...  It took me like
> 30 years or so before I managed.  And what the hell is 'Strg' supposed
> to mean?

Control.

> So how do we change keyboard layouts when using wayland?  Why is there
> no way to do that in gnome settings (or KDEs equivalent) like there
> should be?
> 
> Picking from/adding a bunch of available keyboard layouts is an
> entirely obsolete feature.  I never need that.  I only need to be able
> to change the keyboard layout after picking one once in the installer.
> 
> In case I switch to a different keyboard which I might do every so
> many years when I feel like doing that, I also need to change it for
> the console in the first place.  How that is done changes like all the
> time, and when it's not right, the keyboard won't work right,
> especially in that the function keys to switch between consoles don't
> work[1].  So that's a big issue right there --- and then I need to be
> able to change the keyboard layout in wayland sessions unless I use an
> US keyboard.  But I only have one of those.
> 
> It's certainly a good feature for the 7 people who keep between
> switching different keyboard layouts and/or keyboards frequently.  But
> the relevant feature everyone needs is now entirely missing.
> 
> [1]: Maybe that changed with wayland; I haven't tried yet.

 "The German layout differs from the English (US and UK) layouts in
  four major ways:

The positions of the "Z" and "Y" keys are switched. In English,
the letter "y" is very common and the letter "z" is relatively
rare, whereas in German the letter "z" is very common and the
letter "y" is very uncommon.[1] The German layout places "z" in a
position where it can be struck by the index finger, rather than
by the weaker little finger.

Part of the keyboard is adapted to include umlauted vowels (ä, ö,
ü) and the sharp s (ß). (Some newer types of German keyboards
offer the fixed assignment Alt+++H → ẞ for its capitalized
version.)

Some of special key inscriptions are changed to a graphical symbol
(e.g. ⇪ Caps Lock is an upward arrow, ← Backspace a leftward
arrow). Most of the other abbreviations are replaced by German
abbreviations (thus e.g. "Ctrl" is translated to its German
equivalent "Strg", for Steuerung). "Esc" remains as such. (See:
"Key labels" below)

Like many other non-American keyboards, German keyboards change
the right Alt key into an Alt Gr key to access a third level of
key assignments. This is necessary because the umlauts and some
other special characters leave no room to have all the special
symbols of ASCII, needed by programmers among others, available on
the first or second (shifted) levels without unduly increasing the
size of the key

Re: script/history

2024-02-04 Thread David Wright
On Sun 04 Feb 2024 at 16:01:29 (+), Gareth Evans wrote:
> On Sun 04/02/2024 at 13:24, Max Nikulin  wrote:
> > On 04/02/2024 16:46, Gareth Evans wrote:
> >> Re the script command, does anyone know of a way [ … ]
> > [...]
> >> man script says
> >> 
> >> "SEE ALSO
> >> csh(1) (for the history mechanism)"

My take on this is that the man page was originally written for
BSD, which lies on the csh side of the "great divide" rather
than the sh/bash side.

SCRIPT(1) User Commands  SCRIPT(1)
[ … ]
HISTORY
   The script command appeared in 3.0BSD.

I have no idea why "the history mechanism" is even mentioned
in the man page for script.

> The function of the "a" option in History Substitution in man csh seems 
> different in the bash version.(under "Word Designators" in man bash/gnu 
> online manual)

According to this man page for csh (but includes tcsh):

  https://linux.die.net/man/1/csh

the "a" that modifies modifiers is a "[feature] of tcsh not found
in most csh(1) implementations (specifically, the 4.4BSD csh)". It
appears that bash supports it syntactically, but not its semantics.
I'm not sure why you mentioned this shell detail specifically.

Cheers,
David.



Re: Q: Gnome network odd

2024-02-04 Thread David Wright
On Sun 04 Feb 2024 at 13:57:13 (+0900), Byunghee HWANG (황병희) wrote:
> On Fri, 2024-02-02 at 10:41 -0600, David Wright wrote:
> > On Fri 02 Feb 2024 at 07:37:34 (+), Tixy wrote:
> > > On Wed, 2024-01-31 at 22:12 -0600, David Wright wrote:
> > > > On Tue 30 Jan 2024 at 07:05:55 (+), Tixy wrote:
> > > > > I also have a more vague memory that you could put config into
> > > > > /etc/network/interfaces then in some circumstance NetworkManager would
> > > > > not try and manage that interface, and in others it would take over.
> > > > > (Perhaps selected by allow hotplug option in the ifupdown config?)
> > > > 
> > > > That seems unlikely. Perhaps you're thinking of NM's ifupdown plugin
> > > > that allows you to use the configuration in /e/n/i. I'm assuming the
> > > > OP has not installed that in their sleep.
> > > 
> > > They wouldn't need to because it looks like it's shipped with the main
> > > network-manage package which contains various files with 'plugin' in
> > > their name, including libnm-settings-plugin-ifupdown.so.
> > 
> > What I said was unlikely is that an option in ifupdown's configuration,
> > /e/n/i, would control NM's behaviour. It's the mere mention of the
> > interface there, as in   iface enp5s0 inet dhcp   that makes ifupdown
> > control it, and makes NM back off, AIUI.
> > 
> > > As we've seen from the OPs latest reply, the plugin is configured to
> > > not manage interfaces.
> > 
> > Right, and so the default NM configuration (ifupdown plugin present,
> > news to me) and   [ifupdown] // managed=false   in the .conf file,
> > means that NM should not, by default, configure any interface
> > mentioned in /e/n/i. In the OP's case, the original /e/n/i:
> > -rw-r--r-- 1 root root  433 Oct  4 17:23 interfaces.orig
> > is big enough to hold a typical lo+eth+wlan configuration, which
> > we haven't seen yet.
> 
> Sorry for late, David! 

That's the beauty of mailing lists: it just doesn't matter.

> root@thinkpad-e495:/etc/network# cat interfaces.orig
> # This file describes the network interfaces available on your system
> # and how to activate them. For more information, see interfaces(5).
> 
> source /etc/network/interfaces.d/*
> 
> # The loopback network interface
> auto lo
> iface lo inet loopback
> 
> # The primary network interface
> allow-hotplug wlp4s0
> iface wlp4s0 inet dhcp
>   # wireless-* options are implemented by the wireless-tools
> package
>   wireless-mode managed
>   wireless-essid V30_3982
> root@thinkpad-e495:/etc/network# date

So it would appear that your question is exactly as in the reference
you quoted, that ifupdown was configuring wlp4s0 when /w/n/i was
in place, resulting in NM displaying a question mark. Now you've
removed it, NM has taken over. That's just as in the first answer
(Stephen Kitt Jul 23, 2018 7:00), except for the minor detail that
Kitt mentions one should down the interface before moving /e/n/i
if one wants to make the change cleanly, without rebooting.

(Frequently, people forget that /e/n/i is reread by ifupdown
whenever you run its binaries; that's different from how many
other programs treat their configuration files.)

> 1. I have never touched the inside of that file.
> 2. I guess the real original file was from Debian 12. 

Not knowing the history of your installation, I wouldn't like
to guess exactly how NM and ifupdown arrived at your earlier
situation. But to answer the question posed in your OP,
there's no bug here—just two wifi configuration methods
being prioritised in accordance with their design.

Cheers,
David.



Re: install Kernel and GRUB in chroot.

2024-02-02 Thread David Wright
On Fri 02 Feb 2024 at 21:12:30 (+0700), Dmitry wrote:
> Going to read carefully.
> 
> https://www.debian.org/releases/buster/amd64/ch04s03.en.html
> 
> Interesting that Buster has more documentation than current release.

It appears the balance has now been spun off into a wiki page, at

  https://wiki.debian.org/DebianInstaller/CreateUSBMedia

Cheers,
David.



Re: Q: Gnome network odd

2024-02-02 Thread David Wright
On Fri 02 Feb 2024 at 07:37:34 (+), Tixy wrote:
> On Wed, 2024-01-31 at 22:12 -0600, David Wright wrote:
> > > I also have a more vague memory that you could put config into
> > > /etc/network/interfaces then in some circumstance NetworkManager
> > > would
> > > not try and manage that interface, and in others it would take
> > > over.
> > > (Perhaps selected by allow hotplug option in the ifupdown config?)
> > 
> > That seems unlikely. Perhaps you're thinking of NM's ifupdown plugin
> > that allows you to use the configuration in /e/n/i. I'm assuming the
> > OP has not installed that in their sleep.
> 
> They wouldn't need to because it looks like it's shipped with the main
> network-manage package which contains various files with 'plugin' in
> their name, including libnm-settings-plugin-ifupdown.so.

What I said was unlikely is that an option in ifupdown's configuration,
/e/n/i, would control NM's behaviour. It's the mere mention of the
interface there, as in   iface enp5s0 inet dhcp   that makes ifupdown
control it, and makes NM back off, AIUI.

> As we've seen from the OPs latest reply, the plugin is configured to
> not manage interfaces.

Right, and so the default NM configuration (ifupdown plugin present,
news to me) and   [ifupdown] // managed=false   in the .conf file,
means that NM should not, by default, configure any interface
mentioned in /e/n/i. In the OP's case, the original /e/n/i:
-rw-r--r-- 1 root root  433 Oct  4 17:23 interfaces.orig
is big enough to hold a typical lo+eth+wlan configuration, which
we haven't seen yet.

Cheers,
David.



Re: Q: Gnome network odd

2024-02-01 Thread David Wright
On Fri 02 Feb 2024 at 01:18:51 (+0900), Byunghee HWANG (황병희) wrote:
> On Wed, 2024-01-31 at 22:12 -0600, David Wright wrote:
> > On Tue 30 Jan 2024 at 07:05:55 (+), Tixy wrote:
> > > On Mon, 2024-01-29 at 23:49 -0600, David Wright wrote:
> > > > I would tend to think that:
> > > > 
> > > > . The debian-installer installs ifupdown by default when you don't
> > > >   install a Desktop Manager like Gnome,
> > > > 
> > > > . The debian-installer installs NetworkManager by default if you do
> > > >   install a Desktop Manager like Gnome,
> > > > 
> > > > . It shouldn't do both.
> > > 
> > > My experience, admittedly from a few releases ago, is that ifupdown is
> > > always installed but that the installer doesn't populate it's config
> > > files with the found network interfaces, only the loopback interface.
> > 
> > AIUI that would be normal behaviour when the DE installs its own
> > choice of package to handle the network.
> > 
> > But it's also what happens when you install over wifi and don't
> > select a DE: the wifi configuration is removed as the last step
> > in the installation process. It's a (mis)feature/bug that's been
> > discussed for years.
> > 
> > > I also have a more vague memory that you could put config into
> > > /etc/network/interfaces then in some circumstance NetworkManager would
> > > not try and manage that interface, and in others it would take over.
> > > (Perhaps selected by allow hotplug option in the ifupdown config?)
> > 
> > That seems unlikely. Perhaps you're thinking of NM's ifupdown plugin
> > that allows you to use the configuration in /e/n/i. I'm assuming the
> > OP has not installed that in their sleep. Max's request for printing
> > the configuration could confirm that.
> 
> For now it works all. And still i'm on Debian Sid. Just i attach some
> results from Max's request:

[ … ]

> soyeomul@thinkpad-e495:/etc/network$ apt list '~i~nnetwork-manager'
> Listing... Done

That doesn't reveal whether ifupdown is installed.

[ … ]

> soyeomul@thinkpad-e495:/etc/network$ /usr/sbin/NetworkManager --print-config
> # NetworkManager configuration: /etc/NetworkManager/NetworkManager.conf
[ … ]
> plugins=ifupdown,keyfile
[ … ]
> [ifupdown]
> managed=false

so this applies:

 "managed

 "If set to false, then any interface listed in
  /etc/network/interfaces will be ignored by NetworkManager.
  Remember that NetworkManager controls the default route,
  so because the interface is ignored, NetworkManager may
  assign the default route to some other interface."

[ … ]

> soyeomul@thinkpad-e495:/etc/network$ ls -l
> [ … ]
> -rw-r--r-- 1 root root  433 Oct  4 17:23 interfaces.orig

We need to see the contents of that file (with any passwords
redacted). Its size looks large enough to contain loopback,
ethernet and wireless interface configurations. This could
mean that ifupdown was giving you your connectivity when NM
was displaying a question mark.

Cheers,
David.



Re: Q: Gnome network odd

2024-01-31 Thread David Wright
On Tue 30 Jan 2024 at 07:05:55 (+), Tixy wrote:
> On Mon, 2024-01-29 at 23:49 -0600, David Wright wrote:
> > I would tend to think that:
> > 
> > . The debian-installer installs ifupdown by default when you don't
> >   install a Desktop Manager like Gnome,
> > 
> > . The debian-installer installs NetworkManager by default if you do
> >   install a Desktop Manager like Gnome,
> > 
> > . It shouldn't do both.
> > 
> 
> My experience, admittedly from a few releases ago, is that ifupdown is
> always installed but that the installer doesn't populate it's config
> files with the found network interfaces, only the loopback interface.

AIUI that would be normal behaviour when the DE installs its own
choice of package to handle the network.

But it's also what happens when you install over wifi and don't
select a DE: the wifi configuration is removed as the last step
in the installation process. It's a (mis)feature/bug that's been
discussed for years.

> I also have a more vague memory that you could put config into
> /etc/network/interfaces then in some circumstance NetworkManager would
> not try and manage that interface, and in others it would take over.
> (Perhaps selected by allow hotplug option in the ifupdown config?)

That seems unlikely. Perhaps you're thinking of NM's ifupdown plugin
that allows you to use the configuration in /e/n/i. I'm assuming the
OP has not installed that in their sleep. Max's request for printing
the configuration could confirm that.

Cheers,
David.



Re: How to insert symbols into emails

2024-01-30 Thread David Wright
On Wed 31 Jan 2024 at 02:46:22 (+), fxkl4...@protonmail.com wrote:
> On Tue, 30 Jan 2024, Franco Martelli wrote:
> > On 30/01/24 at 01:14, fxkl4...@protonmail.com wrote:
> >> so i defined my compose key
> >> in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
> >>   
> >> how do i type this
> >
> > I dunno if it's possible to type it using the COMPOSE key, however as
> > workaround you can install "gucharmap" if your desktop is GTK based or
> > "kcharselect" if your desktop is KDE, then search the character by name
> > (I-BEAM) then copy into the clipboard, finally create your own custom
> > ~/.XCompose and define your key sequence to associate i.e. 
> >   : "⌶" as explained in the Debian wiki:
> >
> > https://wiki.debian.org/XCompose
> 
> thanks
> that helps
> in "/usr/share/X11/locale/en_US.UTF-8/Compose" file i see a definition
>: "⌶"U2336 # ⊥ ⊤ APL FUNCTIONAL SYMBOL I-BEAM
> i can directly enter the symbol above using the U2336 value without a compose 
> key
> ctrl + shift + u and type 2336 and enter

I wasn't sure from you previous post why you wanted to type this
character. Is it something you often use, or was it just a random
example of an Compose definition involving codepoints rather than
more familiar letters and symbols?

I would assume that someone who was going to use a Compose sequence
to type the I-beam would already have their keyboard set up to make
APL symbols available with a shift level. AIUI they would likely
use the layout similar to the IBM 2741. On that keyboard, you could
therefore type Compose and shifted B and N; see:

  https://en.wikipedia.org/wiki/File:APL-keybd2.svg

For typing raw codepoints, your method will work in graphical
applications like FireFox and, presumably, Desktop environments
generally. In emacs, where I compose my emails, the sequence
is a little different:
  Esc x i n s Tab c Tab Return 2 3 3 6 Return
which stands for Meta-X insert-char (using Tab completion) followed
by the codepoint. Or one can type:
  Ctrl-X 8 Return 2 3 3 6 Return
or even:
  Ctrl-X 8 Return A P L Tab I - Tab
which uses Tab completion to type APL FUNCTIONAL SYMBOL I-BEAM,
the Sunday name of the symbol.

People who use vi may have different keystorkes. Horses for courses.

Cheers,
David.



Re: Bug: Tab completion for pdf files with blanks in path

2024-01-29 Thread David Wright
On Tue 30 Jan 2024 at 10:34:21 (+0700), Max Nikulin wrote:
> On 30/01/2024 02:51, David Wright wrote:
> > . Press HOME,
> > . Type any letter that makes a "wrong" command name (eg aokular),
> > . Press END,
> 
> The escape "Esc /" workaround has been posted in this thread already.

Yes, I believe I posted it.

But if you have a long path with many ambiguous branches along the
way, using Esc / gets very tedious because you get no help with
choosing what character to write next. Tab Tab doesn't do anything
until you reach a directory with "candidates" in it (ie files with
appropriate extensions).

But even then, Tab Tab does the wrong thing. It only lists the
candidates, not any directories that can continue the path further.

However, using my "wrong" command method, Tab Tab lists are complete
all the way down the path. You can then correct the command in order
to prune the Tab Tab listing to include just the candidates
(and in preparation for actually executing the command, of course).

> It uses built-in readline path completion instead of BASH programmable
> completion. It may be available as [Alt+/] (in xterm it requires
> xterm*vt100.metaSendsEscape: true)
> 
> [Ctrl+A] and [Ctrl+E] are alternatives for [Home] and [End].
> 
> For details see the BASH manual
> 
> info '(bash) Commands For Completion'
> 
> "complete-filename" function and other sections related to readline
> and completion.
> https://www.gnu.org/software/bash/manual/html_node/Commands-For-Completion.html#index-complete_002dfilename-_0028M_002d_002f_0029

To Greg: Thanks for explaining Michael's true motives.

Cheers,
David.



Re: Q: Gnome network odd

2024-01-29 Thread David Wright
On Tue 30 Jan 2024 at 10:13:34 (+0900), Byunghee HWANG (황병희) wrote:
> On Mon, 2024-01-29 at 09:35 -0600, David Wright wrote:
> > On Mon 29 Jan 2024 at 21:36:39 (+0900), Byunghee HWANG (황병희) wrote:
> > > 
> > > For months ago, i did upgrade Debian 12 to Debian Sid. At that
> > > time,
> > > Gnome network icon was odd. That appered as like question mark. So
> > > after i googling, i removed some file in /etc. Then OK! The
> > > Internet is
> > > started. (i did googling with smartphone).
> > > 
> > > 
> > >  soyeomul@thinkpad-e495:/etc/network$ LANG=C.UTF-8 ls -l
> > > total 24
> > > drwxr-xr-x 2 root root 4096 Jan  7 18:51 if-down.d
> > > drwxr-xr-x 2 root root 4096 Jan  8 19:45 if-post-down.d
> > > drwxr-xr-x 2 root root 4096 Jan  8 19:45 if-pre-up.d
> > > drwxr-xr-x 2 root root 4096 Jan  7 18:51 if-up.d
> > > drwxr-xr-x 2 root root 4096 Jan 24  2023 interfaces.d
> > > -rw-r--r-- 1 root root  433 Oct  4 17:23 interfaces.orig
> > > soyeomul@thinkpad-e495:/etc/network$ 
> > > 
> > > 
> > > As you see above, i removed /etc/network/interfaces file. Anyway
> > > now it
> > > works everything! No problem!
> > > 
> > > Is this a bug? Or am i wrong?
> > > 
> > > Ref: 
> > > https://unix.stackexchange.com/questions/457856/how-to-fix-debians-networkmanager-with-question-mark-even-though-network-is-wor
> > 
> > AIUI there are several network configuration tools that defer to
> > configurations that are set up in /e/n/i, which would be handled
> > by ifupdown preferentially. Generally, removing /e/n/i completely,
> > as you have, is fine. One side effect is that any entries in
> > /e/n/interfaces.d/ will also be disabled.
> > 
> > The only machine on which I keep /e/n/i and ifupdown is my travelling
> > laptop, for tethering with my phone:
> > 
> >   allow-hotplug usb0
> > 
> >   iface usb0 inet dhcp
> > 
> > BTW I don't know why you're running sid, but it's generally expected
> > that sid users would be familiar with stuff like this, particularly
> > as your question is already answered in the reference.
> 
> In frankly, i don't know interface things and network tools. Whenever I
> use the default value, just as it is. So still i don't understand your
> reply message in technically.

You have Gnome installed, which implies you configure the network with
something like NetworkManager.

You /had/ a file called /etc/network/interfaces, which implied you were
configuring the network with ifupdown.

If you try to configure the same /interface/ (which could be called
something like eth0) with both NetworkManager and ifupdown, then
NetworkManager should back off and let ifupdown do the configuring.

I can't tell you whether that makes Gnome display a question mark, but
others might know. (I don't use Gnome, NetworkManager, or ifupdown.)

When you renamed the file to /etc/network/interfaces.orig, then
ifupdown can no longer read it, nor take priority over NetworkManager,
and NetworkManager should be happy to configure the interface itself.
The question mark should go away. (Do you get a happy face displayed
instead, or is NetworkManager more boring than that?)

I would tend to think that:

. The debian-installer installs ifupdown by default when you don't
  install a Desktop Manager like Gnome,

. The debian-installer installs NetworkManager by default if you do
  install a Desktop Manager like Gnome,

. It shouldn't do both.

But, if you upgrade an ifupdown-system and add NetworkManager in
whatever way, then it's up to you to remove/hide any ifupdown
configuration that you want NetworkManager to perform. That's
probably what you did by renaming the file.

Cheers,
David.



Re: Encrypted partiotions - which files related?

2024-01-29 Thread David Wright
On Mon 29 Jan 2024 at 16:12:30 (+0100), Hans wrote:
> > That appears to be too much overhead to me... virtual machines (for
> > server as full OS) seem much more appropriate to me, in particular as
> > differences between in-VM and physical devices are pretty much (not
> > completely, though!) abstracted away these days.
> 
> non no, that is exactly, what I was not wanted. My goal was to have my 
> environment completely and easily portable. Without the need of having 
> virtualkbox or anything else: just plugin the usb-stick in ANY computer I 
> want, and I have everything available. Instead of this, I could carry my 
> notebook with me, but that is not what I want. Be prepared, also in any 
> situations. And a usb-stick you can always carry with you. That was the idea.
> 
> And except this little annoying question at boot - which is only annoying and 
> does no harm - everyt6hing is running perfectly to my needs.
> 
> Oh, and I believe, you are right, the cuase of this issue might really be the 
> initrd (which maye can be configured somehow) and then chosen as the initrd, 
> which is copied to the livesystem. Maybe I will take a look at this.
> 
> However, it looks like no one else had other ideas, which are the files 
> responsible, that the boot process is discovering the harddrive and wants to 
> decrypt it. 

Well you haven't exactly given a lot of information to go on.
For example, before you hijacked your own thread (OT: Is there any
size limit for ISO's?), you said that you only got the prompts
when the stick booted in the "home" PC, not "foreign" ones.
That didn't make it into this thread, but one about ISOs,
which I had already deleted days earlier but happened to have
skimmed.

  https://lists.debian.org/debian-user/2024/01/msg01218.html

Not a lot here about which filesystems are encrypted, what's in
crypttab, fstab, the initrd, etc. and so on, but just some narrative.

> If no one else has any ideas in the future, I think, we should declare this 
> issue as closed. 
> 
> I got a workaround, this is well enough for me.
> 
> Thank you and all others for your help!

Cheers,
David.



Re: Bug: Tab completion for pdf files with blanks in path

2024-01-29 Thread David Wright
On Mon 29 Jan 2024 at 19:31:50 (+0100), Michael Kiermaier wrote:
> On 1/29/24 18:59, Greg Wooledge wrote:
> > On Tue, Jan 30, 2024 at 12:05:24AM +0700, Max Nikulin wrote:
> > > On 29/01/2024 19:40, Greg Wooledge wrote:
> > > > Let me test that as well
> > > [...]
> > > > unicorn:/tmp$ xyz dir\ with\ blanks/dir2/file
> > > 
> > > "okular" is important here. Only limited set of file name suffixes are
> > > allowed for some commands. You do not need to have okular installed,
> > > completion rules are part of bash-completion.
> > 
> > That's my point as well.  I'm trying to get the OP to determine whether
> > it's the programmable completion for "okular" in particular that's at
> > fault, or bash itself (hint: it's not).
> 
> Thank you for your responses! After 'complete -r' the problem
> disappears. I should add that I never touched the autocomplete settings.

No, but you lose your so-called component (2) filtering.

For me, a better workaround is, when the directory path gets "stuck":

. Press HOME,
. Type any letter that makes a "wrong" command name (eg aokular),
. Press END,
. Press TAB and carry on using completion for directory/filenames,
. Once you reach the right directory, and if you need filtering,
  press HOME DELETE END and you've got filtering back again.
. Obviously press HOME DELETE if you didn't do the previous step.

> I will submit a bug report for the package bash-completion.

Cheers,
David.



Re: Bug: Tab completion for pdf files with blanks in path

2024-01-29 Thread David Wright
On Mon 29 Jan 2024 at 12:59:39 (-0500), Greg Wooledge wrote:
> On Tue, Jan 30, 2024 at 12:05:24AM +0700, Max Nikulin wrote:
> > On 29/01/2024 19:40, Greg Wooledge wrote:
> > > Let me test that as well
> > [...]
> > > unicorn:/tmp$ xyz dir\ with\ blanks/dir2/file
> > 
> > "okular" is important here. Only limited set of file name suffixes are
> > allowed for some commands. You do not need to have okular installed,
> > completion rules are part of bash-completion.
> 
> That's my point as well.  I'm trying to get the OP to determine whether
> it's the programmable completion for "okular" in particular that's at
> fault, or bash itself (hint: it's not).
> 
> In my demonstration, all programmable completions were disabled.  I
> never use them to begin with.  So, in my demonstration, the command
> name is completely irrelevant.

No, it's pretty much any command that wants to match particular
extensions, like xpdf, dvips, unzip, etc. Obviously bash-completion
should always attempt to match directories as it doesn't know what
they might contain.

Cheers,
David.



Re: Q: Gnome network odd

2024-01-29 Thread David Wright
On Mon 29 Jan 2024 at 21:36:39 (+0900), Byunghee HWANG (황병희) wrote:
> 
> For months ago, i did upgrade Debian 12 to Debian Sid. At that time,
> Gnome network icon was odd. That appered as like question mark. So
> after i googling, i removed some file in /etc. Then OK! The Internet is
> started. (i did googling with smartphone).
> 
> 
>  soyeomul@thinkpad-e495:/etc/network$ LANG=C.UTF-8 ls -l
> total 24
> drwxr-xr-x 2 root root 4096 Jan  7 18:51 if-down.d
> drwxr-xr-x 2 root root 4096 Jan  8 19:45 if-post-down.d
> drwxr-xr-x 2 root root 4096 Jan  8 19:45 if-pre-up.d
> drwxr-xr-x 2 root root 4096 Jan  7 18:51 if-up.d
> drwxr-xr-x 2 root root 4096 Jan 24  2023 interfaces.d
> -rw-r--r-- 1 root root  433 Oct  4 17:23 interfaces.orig
> soyeomul@thinkpad-e495:/etc/network$ 
> 
> 
> As you see above, i removed /etc/network/interfaces file. Anyway now it
> works everything! No problem!
> 
> Is this a bug? Or am i wrong?
> 
> Ref: 
> https://unix.stackexchange.com/questions/457856/how-to-fix-debians-networkmanager-with-question-mark-even-though-network-is-wor

AIUI there are several network configuration tools that defer to
configurations that are set up in /e/n/i, which would be handled
by ifupdown preferentially. Generally, removing /e/n/i completely,
as you have, is fine. One side effect is that any entries in
/e/n/interfaces.d/ will also be disabled.

The only machine on which I keep /e/n/i and ifupdown is my travelling
laptop, for tethering with my phone:

  allow-hotplug usb0

  iface usb0 inet dhcp

BTW I don't know why you're running sid, but it's generally expected
that sid users would be familiar with stuff like this, particularly
as your question is already answered in the reference.

Cheers,
David.



Re: Bug: Tab completion for pdf files with blanks in path

2024-01-29 Thread David Wright
On Mon 29 Jan 2024 at 07:40:13 (-0500), Greg Wooledge wrote:
> On Mon, Jan 29, 2024 at 09:32:18AM +0100, Michael Kiermaier wrote:
> > I would like to run okular opening the pdf file
> > ~/dir1\ with\ blanks/dir2/file.pdf
> > via command line. In konsole I type
> > okular ~/dir1\ with\ blanks/
> > and hit the tab key twice for autocomplete. But I won't get offered
> > dir2. After adding more letters like
> 
> My first question would be: does the problem still occur if you disable
> bash-completion?  Open a new instance of bash and run "complete -r" to
> remove all programmable completions.  See if the problem still occurs.
> Then close that instance of bash.
> 
> > okular ~/dir1\ with\ blanks/di
> > to make the completion to dir2 unique
> 
> Oh, there's more than one subdir?  Let me test that as well
> 
> Yeah, even with both dir1 and dir2 (each containing a file), I still get
> the expected behavior in bash without bash-completion in the picture.
> 
> unicorn:~$ cd /tmp
> unicorn:/tmp$ mkdir -p 'dir with blanks'/dir2
> unicorn:/tmp$ touch "$_"/file
> 
> (first experiments with tab completion, not shown)
> 
> unicorn:/tmp$ mkdir -p 'dir with blanks'/dir1
> unicorn:/tmp$ touch "$_"/otherfile
> unicorn:/tmp$ xyz dir\ with\ blanks/dir
> dir1/ dir2/ 
> unicorn:/tmp$ xyz dir\ with\ blanks/dir2/file 
> 
> I'm assuming whatever issue you're seeing is the result of a
> bash-completion bug, not a bash bug.  If you can confirm that, then
> you'll know which package to file a bug against.

Unless I missed a bit in the OP, the bug is actually worse.
Type di and press TAB, and bash-completion gives you
dir\ with\ blanks/ ok. But now rub out the "nks/" at the end
and press TAB. It fails to complete even that directory name.

However, there's a workaround, which you really have to know
about if you're a bash-completion user, and that is:

  ESCAPE /

AFAICT you won't get the list of possibilities as you would normally,
but it should autocomplete as far as the string remains unique.

Cheers,
David.



Re: File has unexpected size (x != y). Mirror sync in progress? [IP: ...] ...

2024-01-28 Thread David Wright
On Sat 27 Jan 2024 at 14:50:25 (+), Albretch Mueller wrote:
> On 1/19/24, David Wright  wrote:
> > On Fri 19 Jan 2024 at 22:19:21 (+), Albretch Mueller wrote:
> >>  Package dependencies to me are just DAGs,
> > Are they? No circular dependencies?
> 
>  The way I see them, "circular dependencies" are "cultural".
> "organizational" issues not essentially technical ones. circular
> dependencies happen in packages which should be part of the same node.
> Show me examples in which it is not the case.

To save time, I just used the list's search, and found a reference
to presumably the wheezy Packages file:

Package: openjdk-6-jre-headless
Version: 6b38-1.13.10-1~deb7u1
Depends: openjdk-6-jre-lib (= 6b38-1.13.10-1~deb7u1), [ … ]

Package: openjdk-6-jre-lib
Version: 6b38-1.13.10-1~deb7u1
Depends: openjdk-6-jre-headless (>= 6b27)

I guess that example gives you something cultural or
organisational to chew on?

> >> [ … ] I haven’t found a book yet, explaining it all.
> >> At times I have found great explanations about single aspects.
> > What sales figures would you expect to see with such a book?
> 
>  ... and since that sounds to me like ransom money aren't you the one
> who would determine the amount yourself?

I haven't a clue what you're rambling on about. Ransom money?

You originally wrote:

> >> [ … ] So, to start I would
> >> like to study the Debian packages and how dpkg establishes and keeps
> >> those dependencies. What happens on the hire and on the repositories
> >> with certificates ... I haven’t found a book yet, explaining it all.
> >> At times I have found great explanations about single aspects.

For there to be a book on the subject, someone has to invest
the time and effort to write it, and persuade others to
proofread and publish it. But who's this book for—a whole
book … on Debian's APT and dpkg?

Perhaps after you've studied your issues long enough, though,
you might write one.

Cheers,
David.



Re: smartctl cannot access my storage, need syntax help

2024-01-28 Thread David Wright
On Thu 25 Jan 2024 at 12:24:21 (-0500), Roy J. Tellason, Sr. wrote:
> On Thursday 25 January 2024 09:03:36 am Anssi Saari wrote:
> > On Tue 23 Jan 2024 at 06:32:54 (-0500), gene heskett wrote:
> > > On 1/23/24 06:12, Gremlin wrote:
> > > > On 1/23/24 06:04, gene heskett wrote:
> > > > > On 1/23/24 00:30, Karl Vogel wrote:
> > > > > > > > On 1/22/24 11:31, gene heskett wrote:
> > > > > > 
> > > > > > G> How does an 8T backup server sound for another $200 in hdwe?  
> > > > > > Very
> > > > > > G> enticing and I do have the sheckel's.
> > > > > > 
> > > > > > https://www.amazon.com/dp/B07CQJBSQL
> > > > > > Seagate Desktop 8TB external Hard Drive, 3.5 Inch, USB 3.0 
> > > > > > STGY8000400
> > > > > > $168.18
> > > > > > 
> > > > > > What if you buy two, use one for a complete backup and the other for
> > > > > > incrementals or differentials?  (I know, more than $200...)
> > > > > > 
> > > > > My disastrous experience with the last pair of seagates
> > > > > preclude exploring that path, ever again. I bought a couple
> > > > > 2T's to replace  2 1T's I had outgrown and had close to 70,000
> > > > > spining hours on the.  They lasted a bit less than 30 days,
> > > > > dropping off the sata cables connecting then, never to be
> > > > > found again. Then I find they were shingled tech, and helium
> > > > > filled so the heads flew lower.

So the helium made the disks "drop off" the SATA cables?
How does that work?

> > > > https://www.howtogeek.com/803276/cmr-vs.-smr-hard-drives-whats-the-difference/
> > > 
> > > I carefully note, the use of Helium and its problems is very carefully
> > > ignored.

What's the connection between shingled disks and helium?

> > Western Digital at least claims to have solved the leaking
> > problem with helium and since they've been making those drives for over
> > a decade, I think it's solved.

When were these leakage incidents? I haven't heard about them;
only Gene's wartime anecdotes about helium passing through inch-thick
walls of Monel with impunity.

> Your source for this?

Indeed, for any of this. As for facts from the internet, I read
this on one page selected at random — well, a top google hit:

  
https://recoverysquad.com.au/what-are-the-advantages-of-helium-sealed-hard-drives/

 "Helium HDDs as compared to standard HDDs

  Helium HDDs offer several advantages over traditional hard drives,
  including:

  [ … ]

  · Their lower power consumption translates into longer battery life for 
portable devices.
  ↑↑↑
  · And lastly, they generate less heat, which can be an issue with traditional 
HDDs.
 ↑↑
  [ … ]

  What are the challenges with Helium Hard Drives?

  The challenges with helium hard drives are that they are expensive to produce 
and
  they have a limited lifespan. The drives tend to run a bit hotter than 
traditional
  hard drives, and they also use more power."  
 ↑↑

WTF?

Cheers,
David.



Monospace fonts, Re: Changing The PSI Definition

2024-01-26 Thread David Wright
On Fri 26 Jan 2024 at 07:25:13 (-0500), Dan Ritter wrote:
> Greg Wooledge wrote: 
> > On Thu, Jan 25, 2024 at 07:32:38PM -0500, Thomas George wrote:
> > > The current PSI works perfectly but I don't like the pale green prompt.
> > > 
> > > Tried editing .bashrd , /ext/fprofile and /ext/bash.bashrc but no changes 
> > > to
> > > the PSI definition had any effect
> > 
> > You appear to be asking about the shell prompt.
> > 
> > In bash, the shell prompt is defined in the PS1 variable, which stands
> > for "Prompt String One (1)".  The last character is the numeral 1, not
> > the capital letter I.
> 
> Might be time for a new font. I like Inconsolata, but l1I!
> should never look similar, nor O0@ or S$. 

I'll give a shout-out for Hack,¹ which I can't fault for use in
xterms. Comparingxterm -geometry 80x25+0+0 -fa hack -fs 16
with   xterm -geometry 80x25+0+0 -fa inconsolata -fs 18
(to make the sizes roughly the same), I find the inconsolata
stroke width on the basic Roman alphabet is a little spindly.

Other criticisms are that the stroke widths (and even the size)
later in the table (eg 0x256–1312) are thicker or larger, and
many single-width characters are slightly oversize and get
truncated at the top & right (eg Ŵ at 0x372, Lj 456). Mixing
fractions is ugly, too: ½ ⅓ ⅔ ¼ ¾ ⅛ ⅜ ⅝ ⅞. The ‘’ quotes
are pretty, though.

Of course, these criticisms only apply to the implementation from
fonts-inconsolata, rendered on xterms, as compared with fonts-hack.
I don't know whether they arise because the font is a work in
progress, and the implementation hasn't yet caught up: eg, the
capitals with diacriticals look fine in the sample off the web at:
  https://levien.com/type/myfonts/textest.pdf

¹ I first saw Hack mentioned by Gene in May 2016, thanks.

Cheers,
David.



Re: Home UPS recommendations (Was Re: rsync --delete vs rsync --delete-after)

2024-01-26 Thread David Wright
On Fri 26 Jan 2024 at 19:03:33 (+0100), Roger Price wrote:

> I currently have two Eaton Ellipse ECO 1600's.  I change the batteries
> every 4-5 years, but this is not as easy as it should be.  It is not
> evident that only one of the four back panel screws needs to be
> removed.  I took me a while to learn this.  The four screws are deeply
> recessed and difficult to see.  They have different heads: some are
> Torx 10, others are a star.  Keep trying different screwdrivers until
> you feel something turning.

20/20 hindsight might suggest that you were only intended
to remove the star, if by that you mean Philips/Pozidrive.

Cheers,
David.



Re: Playing a sound when initrd wants a password

2024-01-26 Thread David Wright
On Fri 26 Jan 2024 at 16:13:26 (+0100), Nicolas George wrote:
> Hi.
> 
> Yet another strange question. Is there a supported¹ way to have
> cryptsetup play a specific sound when it asks the password for the root
> partition from the initrd?
> 
> I think brttty (braille) is already running at this point (no occasion
> to test yet), but a recognizable sound would be something nice to
> propose I think.

It looks as if the root directory is decrypted by
/usr/share/initramfs-tools/scripts/local-top/cryptroot
and, from its prereqs, that this script makes sure it
is the last to run from scripts/local-top, by actually
being run from scripts/local-block/cryptroot.
(Correct me if I'm wrong: I'm a tyro in here.)

I notice that there is a slew of empty directories in
/etc/initramfs-tools/scripts/, and I can only assume
that anything you drop into these gets merged with
those in /usr/share/initramfs-tools/scripts/ when
the initramfs is built.

There is no scripts/local-block/ directory under /etc/,
possibly because it's not intended that you interfere
with the "ordering trick" mentioned above.

So I would try dropping a logging/printing script into
/etc/initramfs-tools/scripts/local-top/ in order to see
whether it runs, and at the right time. The script
could also look and see what support is already
available for making noises.

Cheers,
David.



Re: Seeking a Terminal Emulator on Debian for "Passthrough" Printing

2024-01-24 Thread David Wright
On Wed 24 Jan 2024 at 23:46:31 (+0700), Max Nikulin wrote:
> On 24/01/2024 00:16, David Wright wrote:
> > On Wed 24 Jan 2024 at 00:00:57 (+0700), Max Nikulin wrote:
> > > Server-side code mixing 2 data streams into single channel may be a
> > > bit more simple than association of 2 connections with the same
> > > client, but the price is this long thread.
> 
> > OTOH we've all experienced misconfigurations where printer jobs
> > go to the wrong printer. What's the cost of the wrong till-receipt
> > printer opening an unattended cash drawer? There are some benefits
> > that come with localising connections.
> 
> Just to be clear, I do not suggest to statically configure all POS
> printers on the server. SSH session may handle multiple data streams,
> so it should be possible to associate UI terminal stream and
> printer/scanner links when a client connects to the server.

I guess I find this suggestion more vague than what the OP was
describing, so you'd have to elaborate. But what I was commenting
on (snipped from above) is having "independent connections on any
network layer". There are LAN-connected printers around for sale,
but there are security dangers with such connection methods,
depending on the application.

Cheers,
David.



Re: keyboard buttons

2024-01-24 Thread David Wright
On Tue 23 Jan 2024 at 18:09:00 (-0600), Mike McClain wrote:
> David Wright wrote:
> > You could try running:
> >
> >   $ xmodmap -e 'keycode 124=' # to override XF86PowerOff
> >
> >   $ xmodmap -e 'keycode 150=' # to override XF86Sleep
> >
> >   $ xmodmap -e 'keycode 151=' # to override XF86WakeUp perhaps.
> 
> Given your input I read the xmodmap man page.
> I ran 'xmodmap -pk' and saw the keycode to function mapping as you
> stated.
> 
> I ran the commands you suggested then ran 'xmodmap -pk' again and saw
> that the assignments were cleared. Just to be safe I checked the two
> files I normally keep open were saved then hit the XF86PowerOff button
> and watched my computer shutdown.

Two things: I don't know whether it's necessary to restart the
X server (which might not require rebooting) to make sure that
every part of X is aware of the new mapping.

Also, just check that it really did shutdown and not merely suspend.
I find my ancient noname MS-019O mouse useful in this respect, as
the LEDs inside it stay lit with suspend, but not with poweroff.
If the machine suspended, pressing the key again may wake it up.¹

> I've heard more that once not to believe all you read. With all the
> disinformation on the net by enemies of democracy, both foreign and
> domestic, I take most of the news I read with a grain of salt. I guess
> I need to apply that to Linux man pages too.

Disinformation is malevolent. Misinformation is usually not.

What you might have read about xmodmap will only apply, AIUI,
in an X session. If that's where you spend almost all your time,
then that may be good enough. (I've never used wayland.)

If what I wrote doesn't work, then it may be that we're not
inserting the change into the pathway that the keystroke follows.
So the next place I would try is /etc/systemd/logind.conf where
this line occurs:

  #HandlePowerKey=poweroff

You could try changing it to, say:

  HandlePowerKey=ignore

in the first instance, and seeing whether that made any difference.
(You might have to reboot for the new setting to take effect.)
If so, then you might want the key to suspend instead.

Also be aware that if HandlePowerKey=ignore succeeds, you may
lose the ability to power off with the real, physical switch on
the computer itself, though hard-reset is unaffected. Hence my
suggesting a less invasive manner.

Somewhere between xmodmap and HandlePowerKey there may be a kbd
driver method, but I've never got into that stuff deeply.

I'm aware that none of this will help with your Devuan machine.
I don't know what keyboard you use, but other approaches are
keeping your fingers away, constructing a guard with cut-down
plastic from an old bubble-pack, or using a different keyboard.

¹ That's how my K520 works because, even though the key engraving
  is ⏻ (IEC Power) with PC underneath, it behaves as ⏾, sending
  Suspend.

Cheers,
David.



Re: ip link versus nmcli device, WIFI

2024-01-23 Thread David Wright
On Mon 22 Jan 2024 at 06:36:57 (+0200), Anssi Saari wrote:
> Geert Stappers  writes:
> >
> > Here on a laptop does `ip link` see a WIFI device,
> > but `nmcli device` does not.
> 
> And you're sure wwx028037ec0200 is a WIFI device? My WWAN device
> sometimes comes up with a wwx ID like that, sometimes wwan0. I even
> explicitly rename it to wwan0 if that happens to make life easier.

I think that's a different device, for use with mobile networks.
AIUI that would involve a SIM card, and someone footing the bill.

Of course, it's always possible that distant memories of such usage,
now elapsed, could lead one to suppose that the machine had been
wifi-connected when it hadn't. In our household, we were using WWAN
long before WiFi, when I was still in the world of 33.6 modems.

Cheers,
David.



Re: rfkill list wlan, Hard blocked: yes

2024-01-23 Thread David Wright
On Sun 21 Jan 2024 at 21:57:20 (+0100), Geert Stappers wrote:
> On Sun, Jan 21, 2024 at 12:59:01PM -0600, David Wright wrote:
> > On Sun 21 Jan 2024 at 18:58:43 (+0100), Geert Stappers wrote:
> > > On Sun, Jan 21, 2024 at 10:44:04AM -0600, David Wright wrote:
> > > > On Sun 21 Jan 2024 at 17:33:57 (+0100), Geert Stappers wrote:
> > > > ( https://lists.debian.org/debian-user/2024/01/msg01038.html )
> > > > > [7.854942] iwlwifi :02:00.0: reporting RF_KILL (radio 
> > > > > disabled)
> > > > > [7.860452] iwlwifi :02:00.0: RF_KILL bit toggled to disable 
> > > > > radio.
> > > > > [8.356275] iwlwifi :02:00.0 wlp2s0: renamed from wlan0
> > > > 
> > > > Run rfkill and, if it's blocked, unblock it.
> > > 
> > > Installed package `rfkill`  (it wasn't installed before)
> > > and tried it.
> > > 
> > > It does report "hard blocked", but rfkill can't change it.
> > > 
> > > I always tried a "function key" on the keyboard of the laptop,
> > > also without the desired effect.
> > 
> > Has that worked in the past … on previous Debians … on
> > the originally installed OS?
> 
> I think it has.  Years ago.

You might need to firm up that answer. I now see thinkpad
added to your Subject line, and also occurring in the logs.
A naive search for such a device turns up:
https://www.amazon.com/Centrino-Wireless-N-112BNHMW-300Mbps-Wireless/dp/B009WJ44CA
which warns "About this item // Note: this wireless card
could not work on IBM/Lenovo/Thinkpad and HP version laptop".
Several reviews expressed disappointment with the product.

Cheers,
David.



Re: Seeking a Terminal Emulator on Debian for "Passthrough" Printing

2024-01-23 Thread David Wright
On Wed 24 Jan 2024 at 00:00:57 (+0700), Max Nikulin wrote:
> On 22/01/2024 22:33, Stefan Monnier wrote:
> > > That's the way it was built -- just mimicking the "real terminal cum
> > > firmware" which was replaced with "DOS/Windows PC cum terminal 
> > > application".
> > 
> > I think it's more than that.  It's a design that makes a lot of sense:
> > it would be more complex having to connect both the terminal and the
> > printer to the server, since the terminal and printer really
> > belong together.
> 
> It had a lot of sense at the time when terminals were directly wired
> to servers. Currently it is ssh over TCP/IP over Ethernet or WiFi and
> there is no a terminal emulator application that supports off-band
> communication with printer out of the box. So independent connections
> on any network layer would be more flexible.
> 
> Server-side code mixing 2 data streams into single channel may be a
> bit more simple than association of 2 connections with the same
> client, but the price is this long thread.

OTOH we've all experienced misconfigurations where printer jobs
go to the wrong printer. What's the cost of the wrong till-receipt
printer opening an unattended cash drawer? There are some benefits
that come with localising connections.

Cheers,
David.



Re: I've an editable .pdf form I need to fill out

2024-01-22 Thread David Wright
On Sun 21 Jan 2024 at 14:50:59 (-0500), gene heskett wrote:
> On 1/21/24 14:29, John Hasler wrote:
> > Klaus writes:
> > > Did you notice, that I was talking about the reduced, crippled OpenSource
> > > browser: chromium
> > 
> > I wrote:
> > > In what way is it crippled?
> > 
> > Gene writes:
> > > Port 80 has been hijacked. You cannot send it to monitor your own web
> > > page at http://localhost:80, but the result is a 403 because google
> > > doesn't know WTH to do with localhost...

Why would that cause a permissions (403) error?

> > I just tried that. No hijacking: works fine.
> It was also true here using the file:// prefix, trying look at the
> html versions of the man pages in /usr/share/local/docs.

I don't understand why a file:// prefix would test whether port 80 worked.
Port 80 is for http:// isn't it?

> Firefox-esr
> can use that syntax just fine.

Which syntax, the one in your previous sentence or the one in your
previous post?

> Where the difference be?

Between what and what? You never seem to quote what you actually
put in the address bar together with what the outcome was.

Cheers,
David.



Re: keyboard buttons

2024-01-22 Thread David Wright
On Mon 22 Jan 2024 at 11:43:36 (-0600), Mike McClain wrote:
> On my keyboard there are some buttons in the top right corner above
> the number pad. one marked with  circle with an x over it, one with a
> moon the third with analarm clock ringing.
> Wondering what they were and how they were handled I typed
> 'Control v' in bash on the command line then the button with the Xed
> out circle. Much to my chagrin my computer shutdown while I had files
> open for editing. OOPs.
> I think I now know what those buttons do but am wondering if there
> is a way to disable them short of dismantling the keyboard.
> 
> mike@DevuanPI4b:~> uname -a
> Linux MikesDevuanPI 6.1.70 #1 SMP PREEMPT Sun Jan  7 04:13:59 CET 2024
> aarch64 GNU/Linux
> 
> I'm now on a Raspberry PI running Devuan but also run Debian on a
> different PI and MS Windows 2000 on a Pentium based tower.
> 
> Bumping one of those buttons and inadvertently killing the system
> while in the midst of a task is something I'd like to avoid,
> 
> Be well and Thanks for any suggestions,

You could try running:

  $ xmodmap -e 'keycode 124=' # to override XF86PowerOff

  $ xmodmap -e 'keycode 150=' # to override XF86Sleep

  $ xmodmap -e 'keycode 151=' # to override XF86WakeUp perhaps.

Perhaps don't redefine XF86WakeUp until XF86Sleep is overridden.

Cheers,
David.



Re: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input16

2024-01-22 Thread David Wright
On Mon 22 Jan 2024 at 07:40:00 (+0100), Geert Stappers wrote:
> On Sun, Jan 21, 2024 at 04:34:23PM -0600, David Wright wrote:
> > On Sun 21 Jan 2024 at 22:41:01 (+0100), Geert Stappers wrote:
> > > Pressing "Function key with symbol of computer sending signal" has no
> > > effect. Which could be caused by the horrible state of keyboard.
> > > When keyboard is needed, is an USB-attached keyboard needed. Usual use
> > > case of the laptop is "headless server, server with SSH access".
> > 
> > I'm not sure what you mean by horrible state.
> 
> That the laptop has a worndown (usage damaged) keyboard. [1]
> 
> > > So I'm ask if 
> > >   export KEYCODE=42
> > >   echo $KEYCODE > /devices/platform/thinkpad_acpi/input/input16
> > > could cause "wlan radio enable"? Or should KEYCODE be another magic 
> > > number?
> > 
> > FWIW my wifi hardware button's keycode is 246.
> 
> How was that keycode found?

By running xev and pressing the button, which is on the front edge
of the laptop. Having the button there is really inconvenient, as
it's easy for a belt buckle or such to accidentally press it.
In theory, that should be easily noticed, as the button is translucent
and illuminated when wifi is connected (and flashes when attempting
to connect). However, the light is not consistent in behaviour.

But another suggestion comes from a more modern laptop, which has
an aeroplane Fn-key (action/hot key), and that uses 255.

So that's 246 / XF86WLAN   on an old laptop with a physical button,
and   255 / XF86RFKill on a newer laptop with a Fn-key.

[ … ]

> Back to "send key code".

One can but try. Did you check the BIOS, BTW?

$ xmodmap -pk or -pke will print what keycodes are available,
but I don't claim to know how all this stuff works (if it does).

Cheers,
David.



Re: ThinkPad Extra Buttons as /devices/platform/thinkpad_acpi/input/input16

2024-01-21 Thread David Wright
On Sun 21 Jan 2024 at 22:41:01 (+0100), Geert Stappers wrote:
> Pressing "Function key with symbol of computer sending signal" has no
> effect. Which could be caused by the horrible state of keyboard.
> When keyboard is needed, is an USB-attached keyboard needed. Usual use
> case of the laptop is "headless server, server with SSH access".

I'm not sure what you mean by horrible state.

> So I'm ask if 
>   export KEYCODE=42
>   echo $KEYCODE > /devices/platform/thinkpad_acpi/input/input16
> could cause "wlan radio enable"? Or should KEYCODE be another magic number?

FWIW my wifi hardware button's keycode is 246.

But I would have thought the files to peruse might be:

  $ ls -GlgR /sys/class/rfkill/rfkill0/
  /sys/class/rfkill/rfkill0/:
  total 0
  lrwxrwxrwx 10 Jan 21 16:13 device -> ../../phy0
  -r--r--r-- 1 4096 Jan 21 16:13 hard
  -r--r--r-- 1 4096 Jan 21 16:13 index
  -r--r--r-- 1 4096 Jan 21 16:13 name
  -r--r--r-- 1 4096 Jan 21 16:13 persistent
  drwxr-xr-x 20 Jan 21 16:13 power
  -rw-r--r-- 1 4096 Jan 21 16:13 soft
  -rw-r--r-- 1 4096 Jan 21 16:13 state
  lrwxrwxrwx 10 Jan 21 16:13 subsystem -> ../../../../../../../class/rfkill
  -r--r--r-- 1 4096 Jan 21 16:13 type
  -rw-r--r-- 1 4096 Jan 21 16:13 uevent

  /sys/class/rfkill/rfkill0/power:
  total 0
  -rw-r--r-- 1 4096 Jan 21 16:14 async
  -rw-r--r-- 1 4096 Jan 21 16:14 autosuspend_delay_ms
  -rw-r--r-- 1 4096 Jan 21 16:14 control
  -r--r--r-- 1 4096 Jan 21 16:14 runtime_active_kids
  -r--r--r-- 1 4096 Jan 21 16:14 runtime_active_time
  -r--r--r-- 1 4096 Jan 21 16:14 runtime_enabled
  -r--r--r-- 1 4096 Jan 21 16:14 runtime_status
  -r--r--r-- 1 4096 Jan 21 16:14 runtime_suspended_time
  -r--r--r-- 1 4096 Jan 21 16:14 runtime_usage
  $ 

> What also would be helpfull, is knowning if 
> 
>   echo 4242 > /devics/platform/laptop_chipset/input/input17
> 
> could change brightness (or another visible effect)

Likewise:

  $ ls -GlgR /sys/class/backlight/intel_backlight/
  /sys/class/backlight/intel_backlight/:
  total 0
  -r--r--r-- 1 4096 Jan 21 16:19 actual_brightness
  -rw-r--r-- 1 4096 Jan 21 16:19 bl_power
  -rw-r--r-- 1 4096 Jan 18 21:57 brightness
  lrwxrwxrwx 10 Jan 21 16:19 device -> ../../card1-eDP-1
  -r--r--r-- 1 4096 Jan 18 21:57 max_brightness
  drwxr-xr-x 20 Jan 21 16:19 power
  -r--r--r-- 1 4096 Jan 21 16:19 scale
  lrwxrwxrwx 10 Jan 18 21:57 subsystem -> 
../../../../../../../class/backlight
  -r--r--r-- 1 4096 Jan 18 21:57 type
  -rw-r--r-- 1 4096 Jan 18 21:57 uevent

  /sys/class/backlight/intel_backlight/power:
  total 0
  -rw-r--r-- 1 4096 Jan 21 16:19 async
  -rw-r--r-- 1 4096 Jan 21 16:19 autosuspend_delay_ms
  -rw-r--r-- 1 4096 Jan 21 16:19 control
  -r--r--r-- 1 4096 Jan 21 16:19 runtime_active_kids
  -r--r--r-- 1 4096 Jan 21 16:19 runtime_active_time
  -r--r--r-- 1 4096 Jan 21 16:19 runtime_enabled
  -r--r--r-- 1 4096 Jan 21 16:19 runtime_status
  -r--r--r-- 1 4096 Jan 21 16:19 runtime_suspended_time
  -r--r--r-- 1 4096 Jan 21 16:19 runtime_usage
  $ 

A recent thread on that starts at:

  https://lists.debian.org/debian-user/2023/10/msg00621.html

with a nice algorithm in:

  https://lists.debian.org/debian-user/2023/10/msg00648.html

Cheers,
David.



Re: rfkill list wlan, Hard blocked: yes

2024-01-21 Thread David Wright
On Sun 21 Jan 2024 at 21:57:20 (+0100), Geert Stappers wrote:
> On Sun, Jan 21, 2024 at 12:59:01PM -0600, David Wright wrote:
> > On Sun 21 Jan 2024 at 18:58:43 (+0100), Geert Stappers wrote:
> > > On Sun, Jan 21, 2024 at 10:44:04AM -0600, David Wright wrote:
> > > > On Sun 21 Jan 2024 at 17:33:57 (+0100), Geert Stappers wrote:
> > > > ( https://lists.debian.org/debian-user/2024/01/msg01038.html )
> > > > > [7.854942] iwlwifi :02:00.0: reporting RF_KILL (radio 
> > > > > disabled)
> > > > > [7.860452] iwlwifi :02:00.0: RF_KILL bit toggled to disable 
> > > > > radio.
> > > > > [8.356275] iwlwifi :02:00.0 wlp2s0: renamed from wlan0
> > > > 
> > > > Run rfkill and, if it's blocked, unblock it.
> > > 
> > > Installed package `rfkill`  (it wasn't installed before)
> > > and tried it.
> > > 
> > > It does report "hard blocked", but rfkill can't change it.
> > > 
> > > I always tried a "function key" on the keyboard of the laptop,
> > > also without the desired effect.
> > 
> > Has that worked in the past … on previous Debians … on
> > the originally installed OS?
> 
> I think it has.  Years ago.
> 
> In recent years only the ethernet interface has been used.

Just checking, as some laptops are supplied without a wifi option.

You could try checking the BIOS—my Lenovo has an ?InsydeH2O BIOS
with a section:

WirelessEnabled
Bluetooth   Enabled
Power Beep  Disabled
Intel Virtual TechnologyDisabled
BIOS Back Flash Disabled
HotKey Mode Enabled → Disabled
Always On USB   Disabled
AOAC Configuration  Enabled
Deep S3 FunctionDisabled

You could install the regulatory database if it's not there
(wireless-regdb). However, I think normal behaviour is to
allow wifi to run at the lowest legal power when the
regulatory domain is not known.

After that, I'm getting out of my depth:

> [8.002917] thinkpad_acpi: rfkill switch tpacpi_bluetooth_sw: radio is 
> blocked
> [8.019804] thinkpad_acpi: rfkill switch tpacpi_wwan_sw: radio is blocked
> [8.685725] iwlwifi :02:00.0: can't disable ASPM; OS doesn't have ASPM 
> control

Possibilities here are suggested by:

https://www.reddit.com/r/debian/comments/8c6ytj/active_state_power_management_aspm/

https://www.reddit.com/r/debian/comments/y4ahsh/solution_cant_disable_aspm_os_doesnt_have_aspm/

and:

https://www.kernel.org/doc/html/v5.19/admin-guide/kernel-parameters.html

which warns:

  pcie_aspm=   [PCIE] Forcibly enable or disable PCIe Active State Power 
Management.
   off Disable ASPM.
   force   Enable ASPM even on devices that claim not to support it.
   WARNING: Forcing ASPM on may cause system lockups.

Cheers,
David.



Re: I've an editable .pdf form I need to fill out

2024-01-21 Thread David Wright
On Sun 21 Jan 2024 at 13:11:46 (-0500), gene heskett wrote:
> Most informative. thank you a lot Eike. I have, on another workspace
> after installing it "xournal" has opened that pdf, I have enabled the
> add annotations function but not killed a tree to test print.  I see
> both "print" and "Export as pdf" in the file menu.

In the past, I would export it.

> Are you saying that I should do the annotations, then export to pdf,
> in order to overlay my notes over that file and then print that
> exported pdf in sufficient copies for the AG office's slaves. Or if
> its correct, email the exported pdf back to them. I think that may be
> the expected response from me.

I would encrypt it before returning it. I would use the password
that encoded the original PDF, which contained sensistive information.
Obviously you're not in that situation, but are the one who has to
inform the recipient of the password /before/ sending the document.

I would decode their documents with:
  $ pdftk pw-protected.pdf input_pw pass\!word cat output unprotected.pdf
and encode mine with:
  $ pdftk unprotected.pdf cat output pw-protected.pdf user_pw pass\!word

The attached is a laborious method for generating and adding
annotations, long since replaced by either digital signing
or document uploading.

Cheers,
David.
1) Decrypt the PDF to be annotated.

2) Preparation of transparent text annotation:

$ inkscape

Text>Text and Font
if necessary.

click on text tool (F8)
place the cursor on the page
write the text
click on select tool (F1)

File>Document Properties
click on Background
set everything to zero (especially Alpha) in the background menu
click on Resize Page to Content...
click on Resize Page to Drawing or Selection
click on X (may/may not be necessary).

File>Save As
Plain SVG

3) Preparation of transparent image annotation:

Make a dark copy.

$ inkscape

File>Import
select (PNG) file
select Embed
place the image.

Path>Trace Bitmap
press Update?
select Multiple Scans 2-8, Colours, Remove Background
leave Smooth, Stack scans
press Update
press OK

select the main picture (which is two) and drag one away

If it's not clear which is which,
select
Right click>Object Properties
select each in turn, and the one wanted is the "path", not the "image".

select the path one,
File>Document Properties
click on Background
set everything to zero (especially Alpha) in the background menu
click on Resize Page to Content...
click on Resize Page to Drawing or Selection
click on X (may/may not be necessary)

File>Save As
Plain SVG

4) To capture a bit of text:

Type it in xterm, emacs, anywhere.
If the text is white on black, select it to reverse the colours.
Grab PNG and drag round it rather than grabbing the whole window.

5) Following "PDF annotation" in file:///usr/share/doc/xournal/manual.html ...

$ xournal

File>Annotate PDF
tick "Attach file to the journal",
open the PDF.

Tools>Image
click top-left corner of required placing,
open the BMP,GIF,JPG,PBM,PGM,PNG,PPM,SVG,TIF,XBM,XPM image file
(may need to click on All Files),
resize and position (NB aspect-ratio is not preserved).

Tools>Select Region
allows readjustment of a previously placed image.

File>Export to PDF


Re: Regarding: ip link versus nmcli device, WIFI

2024-01-21 Thread David Wright
On Sun 21 Jan 2024 at 18:24:53 (+0100), Geert Stappers wrote:
> On Sun, Jan 21, 2024 at 05:34:53PM +0100, Marco Moock wrote:
> > Am 21.01.2024 um 17:21:13 Uhr schrieb Geert Stappers privat:
> > 
> > > It was a firmware thing.
> > 
> > How did you solve it?
> > 
> 
> In the private[1] message was, besides 'Hello Marco':

I can see that you might consider that a hint, but
few here or elsewhere would take that greeting into
account as to whether a message is private or otherwise.
That's why I normally clear all the salutations, closing
compliments and signatures from my replies.

> } } Will reporting also to the ML
> 
> 
> That report became https://lists.debian.org/debian-user/2024/01/msg01038.html
> 
> 
> This message now adds to the mailinglist archive
> that Marco Moock felt 2024-01-21 it a "good thing" to reply on-list
> to something that was send off-list.
> 
> Yeah, I'm **not amused** about the "you MUST tell it to others"
> 
> 
> Time will tell if there will future misbehaviours like that.
> [1] non-public. However, "private" is a much more complex concept.

Are you saying that "It was a firmware thing."
was private? I don't see any other information in
https://lists.debian.org/debian-user/2024/01/msg01039.html

Cheers,
David.



Re: rfkill list wlan, Hard blocked: yes

2024-01-21 Thread David Wright
On Sun 21 Jan 2024 at 18:58:43 (+0100), Geert Stappers wrote:
> On Sun, Jan 21, 2024 at 10:44:04AM -0600, David Wright wrote:
> > On Sun 21 Jan 2024 at 17:33:57 (+0100), Geert Stappers wrote:
> > ( https://lists.debian.org/debian-user/2024/01/msg01038.html )
> > > [7.854942] iwlwifi :02:00.0: reporting RF_KILL (radio disabled)
> > > [7.860452] iwlwifi :02:00.0: RF_KILL bit toggled to disable radio.
> > > [8.356275] iwlwifi :02:00.0 wlp2s0: renamed from wlan0
> > 
> > Run rfkill and, if it's blocked, unblock it.
> 
> Installed package `rfkill`  (it wasn't installed before)
> and tried it.
> 
> It does report "hard blocked", but rfkill can't change it.
> 
> I always tried a "function key" on the keyboard of the laptop,
> also without the desired effect.

Has that worked in the past … on previous Debians … on
the originally installed OS?

Do you see any reaction in the logs (daemon.log and syslog)
when you press that function key? Does xev show a XF86WLAN
keysym occurring (or anything)?

Presumably as there's a function key, there's no button
on the laptop, as commonly found on ones old enough.

Cheers,
David.



Re: ip link versus nmcli device, WIFI firmware related

2024-01-21 Thread David Wright
On Mon 22 Jan 2024 at 00:05:08 (+0700), Max Nikulin wrote:
> On 21/01/2024 23:33, Geert Stappers wrote:
> > The repair:
> > 
> > wget 
> > http://deb.debian.org/debian/pool/non-free/f/firmware-nonfree/firmware-iwlwifi_20210315-3_all.deb
> > 
> > sudo dpkg -i firmware-iwlwifi_20210315-3_all.deb
> 
> https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.en.html#non-free-split
> Chapter 5. Issues to be aware of for bookworm
> 5.1.1.  Non-free firmware moved to its own component in the archive
> 
> the updated APT source-list entry could look like:
> 
> deb https://deb.debian.org/debian bookworm main non-free-firmware

The firmware iwlwifi-1000-5.ucode is the same in both suites,
so the problem will be found more quickly, but not fixed by
the update.

Cheers,
David.



Re: ip link versus nmcli device, WIFI firmware related

2024-01-21 Thread David Wright
On Sun 21 Jan 2024 at 17:33:57 (+0100), Geert Stappers wrote:
> [7.854942] iwlwifi :02:00.0: reporting RF_KILL (radio disabled)
> [7.860452] iwlwifi :02:00.0: RF_KILL bit toggled to disable radio.
> [8.356275] iwlwifi :02:00.0 wlp2s0: renamed from wlan0

Run rfkill and, if it's blocked, unblock it.

Cheers,
David.



Re: counting commas

2024-01-20 Thread David Wright
On Sat 20 Jan 2024 at 17:09:58 (-), Curt wrote:
> On 2024-01-19, David Wright  wrote:
> > On Fri 19 Jan 2024 at 17:25:10 (+), debian-u...@howorth.org.uk wrote:
> >> Greg Wooledge  wrote:
> >> 
> >> > I won, and you lost
> >> 
> >> There shouldn't be a comma in that sentence, in English. There is in
> >> the closely related expression "I won, you lost."
> >
> > That's rather proscriptive. "I won and you lost." and
> > "I won, and you lost." are two different sentences.
> >
> 
> AFAIK, "you lost" is an independent clause and should be separated from
> the independent clause that precedes it with a comma before the
> coordinating conjunction.



Definition of Coordinating Conjunctions

Coordinating conjunctions join grammatically similar elements
(two nouns, two verbs, two modifiers, two independent clauses):

and
or
nor
so
but
for
yet

How to punctuate coordinating conjunctions

When a coordinating conjunction joins two independent clauses,
a comma is used before the coordinating conjunction
(unless the two independent clauses are very short).



  https://writing.wisc.edu/handbook/grammarpunct/coordconj/

Cheers,
David.



Re: su su- sudo dont work

2024-01-20 Thread David Wright
On Sat 20 Jan 2024 at 09:14:30 (-0500), Greg Wooledge wrote:
> On Sat, Jan 20, 2024 at 01:26:06PM +, Schwibinger Michael wrote:
> > Good afternoon.
> > Root terminal is fine.
> > What do I do wrong?
> > What did I destroy?
> > 
> > PC does have only one user=admin.
> > 
> > Regards Sophie
> > Is it the rescue mode?
> 
> Explain, please.
> 
> Your Subject: header says "su su- sudo dont work".  What does this MEAN?
> 
> Please show us your attempts to USE each of these commands, and the
> results that you got.  This means, run the commands in a terminal
> window, and then PASTE the contents of that terminal window into the
> body of your next email.  Show us the shell prompt, the command as you
> typed it, and the full output.
> 
> In other words, show us WHAT IS WRONG, or at least what appears wrong.
> 
> In addition, please give basic background information -- what version
> of Debian you are running, what desktop environment if any, how you
> logged in (*especially* if it isn't just a "standard graphical login
> for your desktop environment"), and anything else you can think of
> that might be relevant.
> 
> How does "rescue mode" factor into the problem?
> 
> When you installed Debian, did you give a root password, or did you
> leave it blank?
> 
> Finally, it would be helpful for you to run the "id" command (with no
> arguments), in the same terminal session as your failed su or sudo
> command(s), and include that command and its output in your paste.

Welcome to the world of déjà vu.

  https://lists.debian.org/debian-user/2022/07/msg00601.html

Cheers,
David.



Re: counting commas

2024-01-19 Thread David Wright
On Fri 19 Jan 2024 at 17:25:10 (+), debian-u...@howorth.org.uk wrote:
> Greg Wooledge  wrote:
> 
> > I won, and you lost
> 
> There shouldn't be a comma in that sentence, in English. There is in
> the closely related expression "I won, you lost."

That's rather proscriptive. "I won and you lost." and
"I won, and you lost." are two different sentences.

The first is a more neutral statement of fact. The
second carries an implication of triumphalism or
mockery: many speakers would expect a swoop upwards
in intonation on "won", a pause, and a steep drop
between "you" and "lost"; kinda like:

  -⭜   ·¯⭝

if that works in your font.

What you lose (sorry) in "I won, you lost." is the
anacrusis, the ·, which many would pronounce "ən",
as in ənyeeoo. Without it, I'd be inclined to write
"I won. You lost." (similar intonation).

Disclaimer: my choice of intonation was to illustrate
one difference. There are many more ways of saying
all of those sentences.

Cheers,
David.



Re: standardize uid:gid?

2024-01-19 Thread David Wright
On Thu 18 Jan 2024 at 07:31:05 (-0500), Greg Wooledge wrote:
> On Thu, Jan 18, 2024 at 05:38:37AM -, David Chmelik wrote:
> > Couldn't Debian standardize uid:gid numbers for daemons?
> 
> The thing is, Debian has tens of thousands of packages, and any one
> of these packages is capable of creating new UIDs and/or GIDs if it
> feels like doing so.  There is no centralized place where all of the
> possible UIDs and GIDs are registered.  It's all ad hoc.
> 
> If a centralized UID/GID registry were to be created, the following
> results would occur:

Debian does have four very small ID registries, two are in
base-passwd: /usr/share/base-passwd/{passwd,group}.master.¹
At a purely local level, what would be the consequences of
extending those files to cover all the expected UID/GIDs on
a network of pet PCs (as opposed to cattle). Obviously this
would have to be done at the earliest opportunity.

>  * Every package that creates one would have to be updated in a
>non-trivial manner.  By its maintainer.  Thousands of separate
>maintainers.  A cat-herd of Debian developers, who do this work
>in their spare time, as they get around to it.

A local sysadmin might try wrapping adduser/useradd, or whatever,
to insert/override choices. Or else new packages would have to be
examined before their installation, and UID/GIDs added manually.

>  * Every obscure, niche package's users and groups would have to be
>added to every Debian system. [ … ]
>  * Did I mention that every Debian system in existence would have to
>have ALL of its users and groups redone? [ … ]
>  * This change would have to be made by a human being running a
>conversion script as root in single-user mode, [ … ]
> 
> This is one of those "the boat has already left the dock" situations.
> If this were going to happen, it would have to have happened in the
> early 1990s.  There is no feasible way to make it happen now.

Agreed, for any sort of Debian or non-local reconfiguration.

¹ There are some reserved high IDs documented in the README, which
  are set when the relevant packages are installed.

Cheers,
David.



Re: File has unexpected size (x != y). Mirror sync in progress? [IP: ...] ...

2024-01-19 Thread David Wright
On Fri 19 Jan 2024 at 22:19:21 (+), Albretch Mueller wrote:

>  Package dependencies to me are just DAGs,

Are they? No circular dependencies?

> [ … ] I haven’t found a book yet, explaining it all.
> At times I have found great explanations about single aspects.

What sales figures would you expect to see with such a book?

Cheers,
David.



Re: normally start new xterms

2024-01-19 Thread David Wright
On Fri 19 Jan 2024 at 09:06:05 (+0100), Thomas Schmitt wrote:
> to...@tuxteam.de wrote:
> > I coopted the otherwise useless "Windows" key (aka "Left Super" for
> > WM things: Super-L makes an xterm:
> >  # Terminal
> >  Key   "t"   A   4  Exec exec xterm
> 
> For me the Flying Windows keys pop up or push down the affected window:
> 
>   Key Super_L A N RaiseLower
>   Key Super_R A N RaiseLower
> 
> What i don't understand in your example is the Keyname "t".
> man fvwm points me to /usr/include/X11/keysymdef.h or
> /usr/X11R6/lib/X11/XKeysymDB (which seems not exist in Debian except
> a file "XKeysymDB" of ipackage "xemacs21-support").
> 
> Do you know documentation which describes your "t" ?
> 
> (I see in my configuration that in the past i bound a pseudo-key F34 to
> keycodes 115 and 116 by xmodmap(1) and used the Keyname F34 with fvwm
> command "Key". After some system change i had to google and learned that
> "Super_L" and "Super_R" work without help of xmodmap.)

For my layout, I think these basic querty symbols come from:
/usr/share/X11/xkb/symbols/us, specifically:

key  {[ t,T   ]   };

with the gb file added for some of my keyboards. For you, perhaps,
I think /usr/share/X11/xkb/symbols/de is complete on its own.

An interactive method of finding the appropriate keysym is to run
xev and look at the keysym in the third line:

  KeyPress event, serial 36, synthetic NO, window 0x461,
root 0x6ab, subw 0x0, time 5446542, (2,170), root:(1324,199),
state 0x0, keycode 28 (keysym 0x74, t), same_screen YES,
XLookupString gives 1 bytes: (74) "t"
XmbLookupString gives 1 bytes: (74) "t"
XFilterEvent returns: False

  KeyRelease event, serial 36, synthetic NO, window 0x461,
root 0x6ab, subw 0x0, time 5446622, (2,170), root:(1324,199),
state 0x0, keycode 28 (keysym 0x74, t), same_screen YES,
XLookupString gives 1 bytes: (74) "t"
XFilterEvent returns: False

This is useful for finding out what all those keys with weird labels
send, like XF86AudioLowerVolume, XF86WakeUp, XF86TouchpadOff/On
and so on.

From the examples in man FvwmProxy, it would appear the quotes round
"t" are unnecessary:

   Undo and redo can be easily mapped to any keys.

   Key Z A 3 SendToModule FvwmProxy Undo
   Key R A 3 SendToModule FvwmProxy Redo

The only ordinary key I've modified is "/", which has the name slash,
and must be named as such. I substituted "m" without quotes, and that
worked correctly:

Key  slash  A  CMS  Exec exec xinput-xsession #quiet
 ↓
Key  m  A  CMS  Exec exec xinput-xsession #quiet

Cheers,
David.



Re: Libreoffice hangs at start

2024-01-18 Thread David Wright
On Thu 11 Jan 2024 at 16:41:36 (+0100), Hans wrote:
> I am running Debian/stable with Libreoffice 7.4.7.2. (ok, this is not the 
> problem :)  ) 
> 
> But: When I start Libreoffice, then the logo appears, the progress bar is 
> showing about 25 percent, then hangs for about 1 Minute. After it libreoffice 
> is 
> going on further starting and is then running without any problems.
> 
> I remeber, that the last time it had something to do with the network 
> settings. Libreoffice is searchin for an IP, but could not find it, then 
> running 
> into a timeout (the 1 minute I mentioned above) and then after it, going on 
> starting.
> 
> Of course this is annoying.
> 
> I remember, the fix was antering the IP of the computer it is running into a 
> file below /etc. Dunno, if it is /etc/hosts or similar.
> 
> The host has got a fixed IP address, here 192.168.2.101.

It sounds rather like a computer that doesn't know its hostname, or
its IP address. So can you elaborate on how you "fix" the address.

For example, my /etc/hosts file on ahost contains at a minimum:

  127.0.0.1 localhost
  127.0.1.1 ahost.corp  ahost   # 192.168.1.123
  ::1 localhost ip6-localhost ip6-loopback
  ff02::1 ip6-allnodes
  ff02::2 ip6-allrouters

and the router's DHCP server issues 192.168.1.123 when asked by
a PC with ahost's MAC. (All other hosts' /etc/hosts files contain
  192.168.1.123 ahost.corp  ahost)

> Strange thing: If I login from the host into the host by using 
> 
> "ssh -X -l myusername 192.168.2.101"
> 
> then soffice is starting at once and without any break.
> 
> For searching the reoson of the break, I also tried to start soffice by using 
> strace, but that gave me no clue.
> 
> Reinstallation of Libreoffice and purging ~/.config/libreoffice* did not help.
> 
> Maybe, the is also related to this: Sometimes, but not everytime, Libreoffice 
> pops a window up, telling, "it does not find a proxy network script..."
> 
> I checked, there is no proxy set, neither in the operating system, nor in 
> Libreoffice itself. If there is a choice of setting, all proxy settings are 
> set 
> ot "NONE" or "System". However, this proxy-thingi appears only sometimes and 
> may not cause any harm., Just wanted to mention it.
> 
> It would be nice, if one could give me some hints, where to look and what can 
> I do, to check of this issue.
> 
> I am very sure, it is a setting problem and NOT a bug.

Cheers,
David.



Re: smartctl cannot access my storage, need syntax help

2024-01-18 Thread David Wright
On Thu 18 Jan 2024 at 00:57:07 (-0800), David Christensen wrote:
> On 1/17/24 22:44, gene heskett wrote:
> > One thing that bothers me is there is no way the installers parted
> > shows partition names for non-raid disks. To me that is a serious
> > bug. It appears from the help that it can LABEL a partition but
> > can't read that LABEL.
> 
> When installing to UEFI/GPT, I am able to label partitions in the
> Debian Installer, the labels are visible in the installer, and the
> labels persist on disk after installation is complete.

Agreed, and that doesn't depend on UEFI; MBR/GPT disks show
the same behaviour. But those are PARTLABELS.

But it may be that Gene meant filesystem LABELs.

Gene, to check/display the LABELs, just place, in turn, the
highlight on the line for each partition, like:

  │   >   #5   31.5 GBext4Viva-B▒ │

press Return for it to display:

  │ Partition settings: │   
  │ │   
  │Name:  Viva-B│   
  │Use as:Ext4 journaling file system   │   
  │ │   
  │Format the partition:  yes, format it│   
  │Mount point:   / │   
  │Mount options: defaults  │   
  │Label: viva05 ←← │   
  │Reserved blocks:   5%│   
  │ │   
  │Done setting up the partition│   

where Name: ⇒ PARTLABEL and Label: ⇒ LABEL.

Then select "Done setting up …" or  to back out each time.

Cheers,
David.



<    1   2   3   4   5   6   7   8   9   10   >