Re: Address 127.0.1.1

2024-05-24 Thread David Wright
On Fri 24 May 2024 at 13:40:38 (-0400), Jeffrey Walton wrote:
> On Fri, May 24, 2024 at 11:13 AM Paul M Foster  
> wrote:
> >
> > Folks:
> >
> > In my /etc/hosts file, there's a line:
> >
> > 127.0.1.1 yosemite.mars.lan yosemite
> >
> > I think Debian put it there.
> >
> > Later in the file, I've got:
> >
> > 192.168.254.30  yosemite.mars.lan   yosemite
> >
> > So there are two entries for the same (my) machine. Is this a problem?
> > Specifically, could it cause problems with email (Exim4 or OpenSMTPD)?
> 
> 127.0.1.1 is traditionally used for the fully qualified domain name
> (fqdn). So I would expect to see 'yosemite.mars.lan', but not
> 'yosemite'.
> 
> Also, fqdn's end in dot '.' to denote the top of the dns tree. So I
> would expect to see 'yosemite.mars.lan.' (note the trailing dot), and
> not 'yosemite.mars.lan' (note the lack of the trailing dot). What can
> happen with 'yosemite.mars.lan' is, search domains can be added to it.
> So if dhcp says 'isp.com' is a search domain, then your network stack
> might make requests for 'yosemite.mars.lan.isp.com'.

You must have a very unusual hosts file then, on both those counts.

I would expect just the 127.0.1.1 line as written, and I'm going to
guess that the 192.168.254.30 line was added as a misguided attempt
to get LAN mail working. As noted by others, /etc/hosts is not the
correct place for that.

Cheers,
David.



Re: Aliases and OpenSMTPD

2024-05-24 Thread David Wright
On Fri 24 May 2024 at 13:08:56 (-0400), Paul M Foster wrote:
> On Fri, May 24, 2024 at 06:40:09PM +0200, to...@tuxteam.de wrote:
> > On Fri, May 24, 2024 at 11:45:56AM -0400, Paul M Foster wrote:
> > 
> > > If I send an email directly to pa...@yosemite.mars.lan from buckaroo, it
> > > arrives. That means this config can do what it's designed to do, 
> > > basically.
> > > However, mails to "root" on buckaroo don't get to yosemite. They should,
> > > because my /etc/aliases table looks like this:
> > > 
> > > ---
> > > ...
> > > rootpa...@yosemite.mars.lan
> > > ---
> > 
> > Still out of my depth with OpenSMTPD, but... good ol' aliases,of sendmail
> > lore would have a colon after the "root" up there. The MTAs I know of
> > all have inherited that.
> 
> There is a colon in my aliases file. I just omitted it in the email.

I don't know anything about opensmtpd, but use exim4 where, to send
emails to other hosts on the LAN, AIUI you either need a DNS server
that can resolve the LAN addresses or, instead, a hubbed hosts file.

Cheers,
David.



Re: Will te UUID or blkid of a device change?

2024-05-23 Thread David Wright
On Wed 22 May 2024 at 21:19:35 (+0200), Hans wrote:
> I am booting a lie system from USB-stick. In this live system I am creating 
> an 
> ISO-file, which I then want to dd onto another USB-stick.

Do you want to copy the ISO to a file, a partition, or
the whole device?

> As I am doing this with a script, I want to make sure, that the correct USB-
> stick is used. 
> 
> Thus I can do by using the UUID of the target stick like 

I don't know what you mean by the UUID of a USB stick. Could you
paste a command that you suppose prints it, and its output.

> dd if=/path/to/myfile.iso of=UUID="123456-abcd-"
> 
> This is working.

I've never seen a dd command line like that. Can you paste that
command, from the prompt before it to the one after it.

> Now my question:
> 
> Whenever I dd to the target stick, does the UUID change? I know, the UUID of 
> the partitions are changing, but what is with the device itself?

If you copy a filesystem to a partition, the partition's old
filesystem and its UUID will be destroyed, being replaced by the new
filesystem and its UUID. Note that the target partition's UUID
(PARTUUID) and LABEL (PARTLABEL) are not changed, because they are
properties of the partition as a container, not its contents.

If you copy to a device, the old partition structure, its PARTUUIDs,
filesystems, and filesystem UUIDs will all be destroyed, being
overwritten by whatever was copied.¹

> Or is there a better way? Maybe by using a label? I read also about blkid, 
> but 
> does this change, too when dd to the device?

To identify a device, you could naturally use its id. That is,
unless it's one of those very cheap ones where they all have the
same id: for example, ID_MODEL=UDisk ID_MODEL_ID=1234
ID_SERIAL=General_UDisk-0:0 . I have two like this, and obviously
the computer is unable to distinguish between them except by what
/I/ write onto them.

A device id command line could look something like:

  # dd of=/dev/disk/by-id/JetFlash_Transcend_4GB_JKNB2FYG-0:0  …  …

> At all, is my idea possible at all or are ALL UUIDs changing, whenever I do a 
> dd? If yes, then how can this be prohibited, if any.

In view of all the above, your question is vague and ambiguous.
When you "do a dd", what you are doing is copying. What gets changed
depends on what you copy and where to.

I don't know what you mean by prohibitions, beyond what normal unix
permissions allow and disallow.

¹ I'm ignoring any problems caused by old data remnants on the target device.

Cheers,
David.



Re: How to run automatically a script as soon root login

2024-05-13 Thread David Wright
On Mon 13 May 2024 at 21:18:30 (+0200), Mario Marietto wrote:
> On Mon, May 13, 2024 at 9:05 PM Greg Wooledge  wrote:
> > On Mon, May 13, 2024 at 06:06:37PM +0200, Hans wrote:
> > > Am Montag, 13. Mai 2024, 13:24:17 CEST schrieb Greg Wooledge:
> > > > On Mon, May 13, 2024 at 07:36:07AM +0200, Richard wrote:
> > > > > .profile
> > >
> > > Sorry, dumb question: Depending of the shell, the user is using (let's
> > say, he
> > > will use bash), can the script not be added into ~/.bashrc?
> >
> > The context has been snipped out.  The context for this was "OP is trying
> > to run a command when root logs in".  The method of login was not stated.
> > First responder said ".profile works for every method of login".  I said
> > that this is incorrect: it doesn't work for many GUI login setups.
> >
> > In those same GUI login setups, .bashrc is *also* not read when the
> > user logs in.  None of the shell startup files are read at all.
> >
> > All of this is a tangent to the actual problem, though.
> >
> > > If yes, second dumb question: Coiuld it be ANY script or command?
> > > (also running as non-rootuser, like adding "runuser -u myuser
> > > command_whatever").
> >
> > We're several layers deep into an X-Y problem here.  The *actual* problem
> > is that the system's networking configuration is not correct/complete.
> >
> > The *workaround* is that the OP is logging in and running commands to
> > change the networking configuration temporarily.
> >
> > The question resulting from the workaround (the Y in the X-Y) was "How
> > can I automate these commands that I keep having to type?"
> >
> > The proper question should have been "How can I fix my system's networking
> > configuration permanently?"
> > 
> ---> The context has been snipped out
> 
> nope. Read well what I said on my first post :
> 
> 
> *[Forgot to say that I switched boot target to text with this command :*
> 
> *sudo systemctl set-default multi-user.target]*
> 
> What does this mean for you ?

To me, it means just one more change while trying to get your
networking to work. Your OP finished with "It does not work and anyway
it does not seem to be what I want..." and "I suspect that the
solution is easier than what I'm trying to do...". Again, to me,
that suggests that after settling on a better, permanent solution
to your problem, you would roll back the other changes that you
made along the way.

> The context is that I was not using any
> desktop manager.

My understanding of this statement is that "the context" is what
is described in your OP. As you said you "switched boot target to
text", I would assume you originally had a different target, likely
a DM, and that you might revert back to it after solving the problem.

Cheers,
David.



Re: Installing testing on Acer Aspire 315

2024-05-12 Thread David Wright
On Sun 12 May 2024 at 21:10:16 (-0700), Paul Scott wrote:
> On 5/9/2024 1:59 PM, Charles Curley wrote:
> > On Thu, 9 May 2024 09:32:32 -0700 Paul Scott wrote:
> > 
> > > The error I'm getting is during "Install base system."  The only way
> > > I knew to save the log was with a camera. Even though I resized the
> > > image this list apparently didn't allow the attachment. How else can
> > > I save the log during install?
> > Installation logs are saved during installation to the target's
> > /var/log/installer/. You can save them to a USB stick after
> > installation is complete, or reboot and find them.
> 
> Is this possible if the base installation failed?  If so, how?

Depends on how it failed. The last three entries in the main menu
are:

  Save debug logs
  Execute a shell
  Abort the installation

You can use the first one and follow its instructions. You can use
the second, and type suitable mount/cp/umount commands to achieve
the same thing.

During the installation, if you get a shell, then

  # more /var/log/syslog

will allow you to pick over the logs, rather like less does, with
the disadvantage that you can't go backwards. If you overshoot the
lines of interest, you have to run the more command again.

Cheers,
David.



Re: [off topic] High Sierra, was: Cindex

2024-05-12 Thread David Wright
On Sun 12 May 2024 at 21:52:05 (+0100), Brad Rogers wrote:
> On Sun, 12 May 2024 22:27:58 +0200 "Thomas Schmitt" wrote:
> 
> >Hah ! Do they think that ISO 9660 is dead enough so they can highjack
> >its birth name ?
> 
> Happens all the time (just saying - not condoning);
> 
> Solid State Drive - referring to HDs without moving parts.
> 
> BITD, Solid State referred to equipment that operates using transistors,
> not valves.  By that definition, *all* HDs are Solid State.

High Sierra is a proper noun, not just a lofty mountain range.
You'd normally only capitalise solid state drive in a heading,
or when defining SSD.

Of course, the company has history; think Apple Corps,
McIntosh Laboratory, etc.

Cheers,
David.



Re: Adding package to Debian Distro

2024-05-09 Thread David Wright
On Thu 09 May 2024 at 16:24:55 (-), Curt wrote:
> On 2024-05-09, Charles Curley wrote:
> > On Thu, 9 May 2024 14:09:52 - (UTC) Curt wrote:
> >
> >> I don't think there is a process by which you could add closed-source
> >> IBM software to a bona fide Debian depository, even the non-free one,
> >> which only seems to contain firmware and drivers for closed-sourced
> >> *hardware*.
> >
> > Isn't that what the non-free archive is for?
> > https://www.debian.org/doc/debian-policy/ch-archive#s-non-free
> 
> Maybe you're right. I can't seem to find a comprehensive list of
> non-free packages,

Would APT's lists do, assuming you have non-free in your sources.list?

  
/var/lib/apt/lists/deb.debian.org_debian_dists_bookworm_non-free_{binary-amd64_Packages,i18n_Translation-en}

(Adjust for source address, distribution, architecture, language, etc.)

> nor anything equivalent to this intricate IBM
> software.

No idea. Cluster Technology is beyond my pay-grade.

> I mean, if non-free means: "anything at all that can be
> reverse-engineered by our software teams," then I've misunderstood its
> meaning and purpose (which is perfectly possible).

Well, no; you could have software that's gratis, open-source,
and redistributable, but if it couldn't be used, say, for
commercial purposes, that would have to go into Debian's
non-free archive rather than the main distribution.
It has nothing to do with reverse engineering per se.

Cheers,
David.



Re: Lightweight Emacs for container?

2024-05-06 Thread David Wright
On Mon 06 May 2024 at 19:37:39 (+), Dr. Jennifer Nussbaum wrote:
> I usually use Emacs on full-blown Debian distributions, so I don't pay much 
> attention to how large it is. But I'm now starting to
> play around with lightweight LXC containers, obviously headless, and would 
> like to keep using Emacs in these, but just for basic 
> text editing and so forth, I don't need a whole IDE environment. But to my 
> surprise, even emacs-nox is a gigantic installation, 
> that even wants to pull in MySQL, for heaven's sake.
> 
> Is there some package, or a simple workaround, that will allow me to use a 
> basic Emacs without all the cruft?

Are you allowing APT to install Recommends and/or Suggests?

If you haven't yet installed emacs-nox, it might be interesting
to see the list of packages you get listed if you:

 $ apt-get -s --no-install-recommends install emacs-nox

as a /user/.

Or OTOH, if you have installed emacs-nox:

 $ apt-get -s purge 

as a /user/, where  is the names of the mysql packages
you're complaining about.

The only mysql package I have (on bullseye, I'm afraid)
is mysql-common (which is very small), and that shows:

$  apt-get -s purge mysql-common
NOTE: This is only a simulation!
  apt-get needs root privileges for real execution.
  Keep also in mind that locking is deactivated,
  so don't depend on the relevance to the real current situation!
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  gsasl-common guile-2.2-libs libgsasl7 libntlm0 mailutils-common
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  libmailutils7* libmariadb3* libreoffice-sdbc-mysql* mailutils* 
mariadb-common* mysql-common*
0 upgraded, 0 newly installed, 6 to remove and 0 not upgraded.
Purg mailutils [1:3.10-3+b1]
Purg libmailutils7 [1:3.10-3+b1]
Purg libreoffice-sdbc-mysql [1:7.0.4-4+deb11u8]
Purg libmariadb3 [1:10.5.23-0+deb11u1]
Purg mariadb-common [1:10.5.23-0+deb11u1]
Purg mysql-common [5.8+1.0.7]

(I have emacs-gtk installed, rather than -nox.)

Cheers,
David.



Re: Bookworm's /etc/mailcap seems to break s-nail

2024-05-06 Thread David Wright
On Mon 06 May 2024 at 14:53:10 (+0200), Jesper Dybdal wrote:

> The package versions involved are:
> * in Bullseye:
>    mailcap/oldstable,now 3.69 all [installed,automatic]
>    s-nail/oldstable,now 14.9.22-1 amd64 [installed]
> * In Bookworm:
>    mailcap/stable,now 3.70+nmu1 all [installed,automatic]
>    j-nail/stable,now 14.9.24-2 amd64 [installed]

 ↑

> Has anyone else seen this?

No.

Cheers,
David.



Re: [SOLVED] Trouble/bug with initramfs-tools adding encrypted swap partition

2024-04-25 Thread David Wright
On Fri 26 Apr 2024 at 11:27:24 (+0900), John Crawley wrote:
> On 24/04/2024 22:37, David Wright wrote:
> > On Wed 24 Apr 2024 at 14:50:36 (+0200), Richard wrote:
> > > upon gathering my thoughts for answering to you I found the solution to
> > > this: update-initramfs can't handle the case that crypttab ends in the 
> > > line
> > > of the last entry and not in a new line character. I think there either
> > > should be a fix for this or at least a way to handle this case with a much
> > > clearer error message. So I'll probably open a bug report for the package
> > > and the maintainer can decide if that should be forwarded upstream. Such a
> > > rather trivial case shouldn't be resulting in such fatal errors.
> > 
> > Some time at the end of the last century, I remember some startup script
> > that cat'd its configuration file for that very reason. It taught me
> > the habit of always finishing files with a blank comment line:
> > 
> > $ cat /etc/crypttab
> > # 
> > swapLABEL=cryptswap /dev/urandom
> > swap,offset=2048,cipher=aes-xts-plain64,size=512
> > #
> > $
> > 
> 
> Innocent question: what difference does the comment make vs just ending the 
> file with an empty line?

Nothing for the computer, but visibility for me.

Say you print the file on paper. All you see is white space after
the end of the printed text. Is there an empty line?

Or take, for instance, my example above, and think back to those VDUs,
as we called them, where the firmware added a newline as soon as the
cursor reached the right side of the screen, without waiting to see
whether the next character was itself a newline or not.¹ So using an
empty line approach, you might find yourself looking at a screen like:

Last character position on the screen ---↓

swap LABEL= … … … … … … … … … … … … … … … … … … … … … =512

$ 

Now, is that an empty line before the prompt, or did the terminal
add the extra newline itself because the swap line was exactly
80 characters long?

Editor examples: a windowed emacs buffer has a ≣ decoration at the
extreme left edge after the last line of text, so that you can
distinguish an absence of lines from empty lines. However, a
non-windowed emacs in an xterm has no such decoration: you have to
provoke an "end of buffer" message to be certain where the file ends.
And nano is worse: to know you've reached the bottom, you have to
check the cursor doesn't advance when you pound on the downarrow key.

¹ IIRC, there's a terminfo capability, am, to work around this.

Cheers,
David.



Re: youtube-dl blocked?

2024-04-24 Thread David Wright
On Wed 24 Apr 2024 at 10:50:06 (-0400), Greg Wooledge wrote:
> On Wed, Apr 24, 2024 at 10:31:44PM +0800, Bret Busby wrote:
> > The latest version of youtube-dl , makes it too old to try to use now; if
> > you can get it working with youtube, good luck to you.
> > 
> > An unmaintained package, that is three years since last updated, for
> > accessing web sites on the World Wide Web?
> > 
> > H.
> 
> The youtube-dl package in Debian 12 is a transitional package which
> brings in yt-dlp (version 2023.03.04-1 currently).
> 
> Whether that's too old to be usable is a good question, but it's
> definitely not "three years since last updated".

My experience was similar to Bret's, only I'd long got used to not
just taking Debian's proferred version, but checking whether there
was a newer version somewhere around. It was in February 2023 when
I found that even the most modern version of youtube-dl that I could
find would still not work with some sites that had worked before.
That's when I stumbled upon yt-dlp, and realised the world had
quietly moved on.

This was in the days of bullseye, and note that bullseye still has
a /normal/ youtube-dl package, 34 months old, and no yt-dlp package.
For the latter, you need to be running backports (and I have no idea
when yt-dlp entered bullseye-backports).

It kind of reminds me of the mplayer, mpv, and the debian multimedia
site melange of a few years ago, only there there was more discussion
of rival versions (and the perils of using that site) on the list.

Cheers,
David.



Re: [SOLVED] Trouble/bug with initramfs-tools adding encrypted swap partition

2024-04-24 Thread David Wright
On Wed 24 Apr 2024 at 14:50:36 (+0200), Richard wrote:
> upon gathering my thoughts for answering to you I found the solution to
> this: update-initramfs can't handle the case that crypttab ends in the line
> of the last entry and not in a new line character. I think there either
> should be a fix for this or at least a way to handle this case with a much
> clearer error message. So I'll probably open a bug report for the package
> and the maintainer can decide if that should be forwarded upstream. Such a
> rather trivial case shouldn't be resulting in such fatal errors.

Some time at the end of the last century, I remember some startup script
that cat'd its configuration file for that very reason. It taught me
the habit of always finishing files with a blank comment line:

$ cat /etc/crypttab 
# 
swapLABEL=cryptswap /dev/urandom
swap,offset=2048,cipher=aes-xts-plain64,size=512
#
$ 

Cheers,
David.



Re: youtube-dl blocked?

2024-04-24 Thread David Wright
On Wed 24 Apr 2024 at 06:58:02 (+0200), Marco Moock wrote:
> Am 23.04.2024 um 23:15:17 Uhr schrieb Markos:
> 
> > The site https://ytdl-org.github.io/youtube-dl/download.html
> > 
> > is blocked?
> 
> Please specify that more precisely.
> Run
> 
> host ytdl-org.github.io

$ host ytdl-org.github.io
ytdl-org.github.io has address 185.199.111.153
ytdl-org.github.io has address 185.199.108.153
ytdl-org.github.io has address 185.199.109.153
ytdl-org.github.io has address 185.199.110.153
ytdl-org.github.io has IPv6 address 2606:50c0:8002::153
ytdl-org.github.io has IPv6 address 2606:50c0:8003::153
ytdl-org.github.io has IPv6 address 2606:50c0:8000::153
ytdl-org.github.io has IPv6 address 2606:50c0:8001::153
$ 

$ wget https://ytdl-org.github.io/youtube-dl/download.html
--2024-04-24 07:59:25--  https://ytdl-org.github.io/youtube-dl/download.html
Resolving ytdl-org.github.io (ytdl-org.github.io)... 185.199.109.153, 
185.199.110.153, 185.199.111.153, ...
Connecting to ytdl-org.github.io (ytdl-org.github.io)|185.199.109.153|:443... 
connected.
HTTP request sent, awaiting response... 200 OK
Length: 3834 (3.7K) [text/html]
Saving to: ‘download.html’

download.html   100%[=>]   
3.74K  --.-KB/sin 0s  

2024-04-24 07:59:25 (18.4 MB/s) - ‘download.html’ saved [3834/3834]

$ ls -Glg download.html 
-rw-r- 1 3834 Aug  1  2023 download.html
$ 

From the middle of the US.

Cheers,
David.



Re: [OFFTOPIC] youtube-dl blocked?

2024-04-23 Thread David Wright
On Tue 23 Apr 2024 at 23:19:48 (-0400), Stefan Monnier wrote:
> > The site https://ytdl-org.github.io/youtube-dl/download.html
> > is blocked?
> 
> Now that you got answers, a question: what made you post this here?
> AFAICT this has nothing to do with Debian (if you use Debian, you'd
> more naturally install that tool from `apt` which won't fetch it from
> Github).

Possibly they just searched for youtube-dl on google, and got
something like what I saw in the topright corner:

Cheers,
David.


Re: youtube-dl blocked?

2024-04-23 Thread David Wright
On Tue 23 Apr 2024 at 23:15:17 (-0300), Markos wrote:
> The site https://ytdl-org.github.io/youtube-dl/download.html
> 
> is blocked?
> 
> Is there any other alternative to download videos from Youtube in
> Linux command line?

That site works here, but I don't think that's important. It appears
to offer youtube-dl 2021.12.17, which is /ancient/.

You'd be better off just installing Debian's yt-dlp in the usual
manner. And you can do better than that at the moment, by using
the backports version, 2024.04.09-1~bpo12+1.

If the backports version falls behind, you can usually install the
version from unstable (now trixie), because yt-dlp's dependencies
are all unversioned. The medium term disadvantage of this approach
is that it won't be upgraded automatically when a new version
appears: you have to keep an eye out.

Cheers,
David.



Re: Debian non-free-firmware policy making OS misleading and Free Software unfriendly

2024-04-21 Thread David Wright
On Sun 21 Apr 2024 at 21:59:21 (-0400), Stefan Monnier wrote:
> > Do you have any suggestion as to which list would be better to contact?
> > Original: https://lists.debian.org/debian-user/2024/04/msg00324.html
> 
> Maybe `reportbug debian-installer`?

but perhaps without all the deception crap, unless you really mean
to impugn the developers' motives.

Cheers,
David.



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

2024-04-15 Thread David Wright
On Mon 15 Apr 2024 at 18:52:33 (-), Curt wrote:
> On 2024-04-15, David Wright  wrote:
> > On Sun 14 Apr 2024 at 14:24:29 (-), Curt wrote:
> >> On 2024-04-04, Max Nikulin  wrote:
> >> >
> >> > If you do not trust Gmail as a web application, use a mail application 
> >> > that supports IMAP.
> >> >
> >> 
> >> Gmail supports IMAP since more or less forever.
> >
> > AIUI the OP's problem was not when reading mail, but with mail
> > submission of attachments.
> 
> And in what way does that affect a true statement and a phraseology that
> clearly implies an nonexistent incompatibility?

It doesn't, and wasn't intended to. The OP was worried about security
of the attachment process during mail submission. IMAP is not involved.

I'm told that gmail offers an SMTP interface, but I don't know how
well it works, or its pros and cons. That's why I wrote "the OP's
problem was … with mail submission …", in case that had got forgotten
with the thread drifting across to the topic of reading emails.
Clearer?

Cheers,
David.



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

2024-04-15 Thread David Wright
On Sun 14 Apr 2024 at 14:24:29 (-), Curt wrote:
> On 2024-04-04, Max Nikulin  wrote:
> >
> > If you do not trust Gmail as a web application, use a mail application 
> > that supports IMAP.
> >
> 
> Gmail supports IMAP since more or less forever.

AIUI the OP's problem was not when reading mail, but with mail
submission of attachments.

Cheers,
David.



Re: tbird troubles

2024-04-15 Thread David Wright
On Tue 16 Apr 2024 at 01:20:03 (+0800), Bret Busby wrote:
> On 16/4/24 00:49, Greg Wooledge wrote:
> > On Mon, Apr 15, 2024 at 10:59:25AM -0400, e...@gmx.us wrote:
> > > On 4/15/24 10:01, gene heskett wrote:
> > > > On 4/15/24 09:09, Greg Wooledge wrote:
> > > > > On Mon, Apr 15, 2024 at 08:28:24AM -0400, gene heskett wrote:
> > > > > > For the last 2 or 3 reboots, when launching t-bird, I get 2 copies 
> > > > > > of the
> > > > > > gui stacked on top of each other. I can move them separately to 2 
> > > > > > separate
> > > > > > workspaces, and both appear to work for some definition of working, 
> > > > > > but
> > > > > > quitting one actually quits both.
> > > > > 
> > > > > How do you launch it?  Are you clicking something?  Are you 
> > > > > DOUBLE-clicking
> > > > > something?
> > > > > 
> > > > A single click on the name from the internet section of the xfce menu.
> > 
> > I'm wondering whether Gene's mouse might be physically failing, and
> > sending multiple click events when he presses the button once.  This
> > is one of the possible failure modes for mouse buttons.
> > 
> > > Try running "thunderbird" from a terminal emulator and see what happens.
> > 
> > Yes, that's a reasonable thing to try.
> > 
> > To see whether the mouse button might be misbehaving, Gene could try
> > running xev, and slowly clicking the (left) mouse button inside the
> > xev window.  There should be exactly one press event, and one release
> > event, each time the button is clicked, regardless of how long it's
> I think that, from memory, a utility for adjusting the mouse click
> speed, also is available, for adjusting the mouse click speed.

I don't think double-click speed can be used to debounce the mouse
button, because it lengthens the time interval that two clicks are
interpreted as a double-click. It can't turn two quick clicks into
a single click.

I have a mouse that can turn one long press into two clicks: what's
happening is that the wire loses continuity for a moment. I can see
the xconsole logging a "New" USB device being connected, as it occurs.
When it's bad, moving the mouse produces a stream of such logs.

But I would recommend Gene start tbird from a command line, to
distinguish a tbird configuration fault from a menu action fault.

Cheers,
David.



Re: inconsistency in the symlinks under /etc/systemd

2024-04-12 Thread David Wright
On Wed 10 Apr 2024 at 14:36:20 (-0400), Jeffrey Walton wrote:
> On Wed, Apr 10, 2024 at 7:00 AM 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?
> 
> Be careful of fiddling with the Systemd symlinks. If you convert the
> relative ones to absolute ones, then the machine will fail to boot.

I don't think there should be any relative systemd symlinks in
/etc/systemd/ unless, for some peculiar reason, you've hand-crafted
them yourself.

Cheers,
David.



Re: inconsistency in the symlinks under /etc/systemd

2024-04-12 Thread David Wright
On Thu 11 Apr 2024 at 19:28:48 (+0200), Vincent Lefevre wrote:
> On 2024-04-10 23:47:36 -0500, David Wright wrote:
> > On Thu 11 Apr 2024 at 03:36:59 (+0200), Vincent Lefevre wrote:
> > > On 2024-04-10 09:52:51 -0400, Dan Purgert wrote:
> > > > I'd hazard it's a consequence of usrmerge being the "default state" in
> > > > one installation and not the other.
> > > 
> > > Both machines have always been usr-merged (i.e. from the Debian
> > > installation).
> > 
> > This is trixie, is it not, so perhaps bugs are being fixed
> > in package installation support programs. You should be able
> > to see the symlinks being created in /var/log/apt/term.log*
> > if they haven't yet rotated away.
> 
> On the first machine:
> 
> Setting up dmeventd (2:1.02.185-2) ...
> Created symlink /etc/systemd/system/sockets.target.wants/dm-event.socket → 
> /lib/systemd/system/dm-event.socket.
> Setting up lvm2 (2.03.16-2) ...
> Created symlink 
> /etc/systemd/system/sysinit.target.wants/blk-availability.service → 
> /lib/systemd/system/blk-availability.service.
> Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-monitor.service 
> → /lib/systemd/system/lvm2-monitor.service.
> Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmpolld.socket 
> → /lib/systemd/system/lvm2-lvmpolld.socket.
> 
> On the second machine:
> 
> Setting up dmeventd (2:1.02.185-2) ...
> Created symlink /etc/systemd/system/sockets.target.wants/dm-event.socket → 
> /usr/lib/systemd/system/dm-event.socket.
> Setting up lvm2 (2.03.16-2) ...
> Created symlink 
> /etc/systemd/system/sysinit.target.wants/blk-availability.service → 
> /usr/lib/systemd/system/blk-availability.service.
> Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-monitor.service 
> → /usr/lib/systemd/system/lvm2-monitor.service.
> Created symlink /etc/systemd/system/sysinit.target.wants/lvm2-lvmpolld.socket 
> → /usr/lib/systemd/system/lvm2-lvmpolld.socket.
> 
> > Or else, have you run systemctl on dmeventd, in order to change its
> > status?
> 
> I'm not sure what to do.

I don't know anything about your machine, or the service provided by
these symlinks. But my own experience is that systemd is not bothered
about which of the two paths is the target, and renaming links with
ln -sf   doesn't affect running instances.

But for easing the task of comparing configurations, you could just
massage your listings so that any symlink targets listed as /lib…
appear as /usr/lib….

Cheers,
David.



Re: inconsistency in the symlinks under /etc/systemd

2024-04-10 Thread David Wright
On Thu 11 Apr 2024 at 03:36:59 (+0200), Vincent Lefevre wrote:
> On 2024-04-10 09:52:51 -0400, Dan Purgert wrote:
> > I'd hazard it's a consequence of usrmerge being the "default state" in
> > one installation and not the other.
> 
> Both machines have always been usr-merged (i.e. from the Debian
> installation).

This is trixie, is it not, so perhaps bugs are being fixed
in package installation support programs. You should be able
to see the symlinks being created in /var/log/apt/term.log*
if they haven't yet rotated away. Or else, have you run
systemctl on dmeventd, in order to change its status?

Cheers,
David.



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_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_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
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=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=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.flickr.com/photos/triplehaata/albums/72157650296043599/with/15857592493
looks ancient enough not to be USB, but

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
> every keyboard?  That's not only useful laptops ...  I could use like
> F20 for it if I could configure that, but unfortunately, my
&g

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_DRIVER=usb-storage
E:ID_PATH=pci-:00:14.0-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 ‘>’", though there could be a better name for ‘>’.
> 
> 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 ‘>’", though there could be a better name for ‘>’.

>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
> make a difference.
> 
> I could connect both at the same time.  What do you think what happens
> when I press the same key on either, like the = key

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 

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.



  1   2   3   4   5   6   7   8   9   10   >