Re: OT: Question to shell script

2024-09-06 Thread Nicolas George
Andy Smith (12024-09-06):
> cd "$(dirname "$0")"

… || exit

Regards,

-- 
  Nicolas George



Re: Why are module parameters under /etc/modprobe.d not respected?

2024-09-03 Thread Nicolas George
ael (12024-09-03):
> options snd_hda_intel id=[HDMI,PCH] index=1,0

Might be you need to write with dashes, as the module files is named
with dashes.

Might be brackets are not the correct syntax for an array option.

Regards,

-- 
  Nicolas George



Re: KDE - Wayland vs X11

2024-09-02 Thread Nicolas George
Dan Ritter (12024-09-01):
> It is unlikely that X will be actually abandoned until all of
> these problems with Wayland are solved.

oneko and xeyes do not work properly with Wayland, that is definitely a
deal breaker.

Regards,

-- 
  Nicolas George



Re: Using - journalctl -

2024-08-28 Thread Nicolas George
Arbol One (12024-08-28):
> Having said that, I would like to keep my 'events' log showing only the last
> two days; as explain here
> <https://unix.stackexchange.com/questions/139513/how-to-clear-journalctl>,
> using the following command : *journalctl --vacuum-time=2d*. However, when I
> use the 'journal' command to see the log record, it shows dates as back as
> January-2021. Just for the record, we are in August-2024.
> 
> What am I doing wrong?

#   --vacuum-time= removes archived journal files older than the

I notice the *archived* word. Maybe your journal since January is not
archived.

You should look at the size and timestamps of the files in
/var/log/journal/.

Maybe also try to run “journalctl --rotate” before or after “journalctl
--vacuum-time=2d”, to have a point to discard the next time.

Regards,

-- 
  Nicolas George



Re: internal keyboard does not work

2024-08-23 Thread Nicolas George
Nilesh Patra (12024-08-23):
> What drives such a hostile and uncalled-for reply?

It was sarcastic, but in no way hostile.

And you might notice that (1) it also contained the useful answer and
(2) it is for now the only reply. So we might wonder which is best: no
reply at all, or a reply with sarcasm that inattentive readers might
take for hostility?

Regards,

-- 
  Nicolas George



Re: internal keyboard does not work

2024-08-22 Thread Nicolas George
lina (12024-08-22):
> however, the internal keyboard does not work

Sorry to ear it. Did it been laid off? Is it eligible for unemployment
benefits?

More seriously, start by explaining your problem with more accuracy than
“does not work”.

Regards,

-- 
  Nicolas George



Re: UEFI multiboot

2024-08-21 Thread Nicolas George
Max Nikulin (12024-08-21):
> Have I missed something or GRUB_DISTRIBUTOR affects *grub* menu, but not
> *UEFI* boot menu?

Indeed, it is not just as simple as that.

>I still suspect it is a UEFI+SecureBoot design
> shortcoming that it is not possible to install the same loader (the same
> vendor) on the same ESP twice with different configurations.

   --bootloader-id=ID
  the  ID  of  bootloader. This option is only available on EFI and
  Macs.

I it as simple as this.

-- 
  Nicolas George



Re: UEFI multiboot

2024-08-20 Thread Nicolas George
Max Nikulin (12024-08-21):
> Do you mean 3rd party bootloader (e.g. grub)?

There is nothing “3rd party” about GRUB.

>   I was responding to "AIUI
> UEFI/GPT were designed to support multi-boot".

Yes, and so was I. If you want half a dozen different GRUBs configured
for half a dozen installed distros, it is possible. Completely useless
because:

>Custom configuration of grub
> (earlier lilo) was possible before UEFI and GPT.

… and more convenient. But it is possible.

> Erwan posted directory tree for debian+ubuntu ESP, but it is a case of
> different vendors. Richard wants 2 variants of Debian (however UEFI may be
> irrelevant to that machine).

As I said, perfectly possible.

>   I was experimenting trying to get 2 entries
> from the same vendor in the UEFI (firmware) boot menu and found it tricky
> and inconvenient.

“Tricky and inconvenient” ≠ “impossible”

-- 
  Nicolas George



Re: UEFI multiboot (was: Re: Default partition mounts [ "Installation Guide" lacks index ])

2024-08-20 Thread Nicolas George
Max Nikulin (12024-08-20):
> Single EFI System Partition may contain loaders from different vendors, but
> not 2 Debian systems installed on different partitions.

This is not true. The only problem you will have with this setup is that
you will need to install and/or configure the bootloader manually.

> EFI files are signed
> for Secure Boot, so vendor paths can not be easily adjusted.

Secure boot is a joke when it comes to security, its only “merit” is to
prevent lusers from installing software with disabled DRM.

>   I have no idea
> how much trouble may cause multiple ESP on the same drive.

Once the bootloader is installed, the partition is referred by UUID, it
does not matter if it is the ESP or not.

-- 
  Nicolas George



Re: anyone uses ReiserFS today

2024-08-15 Thread Nicolas George
Michael Stone (12024-08-14):
> The short answer is that the reason it handles small files well is because
> Reiser wanted the filesystem to be used for direct storage of small objects,
> whereas most applications dealing with small objects combine them into a
> larger object which is what is stored in the filesystem. E.g., a database
> like sqlite stores records in a large file which the database software
> manages internally rather than storing each record as a separate file. If
> the database wanted to take advantage of this paradigm and store small
> records in individual files, it would exhibit ridiculously poor performance
> on every other filesystem and OS, and writing a database only for reiserfs
> seemed overly limiting. Remember reiserfs was always a research project, and
> never quite done;
> reiser4 pushed these concepts further (e.g., added various atomic
> transaction modes) but never got merged.

Except the original plan did not hold water, even at the time.

The blocks at using the file system instead of a more advanced format is
not just the inefficiency of the storage.

First, there are system calls, they are expensive. Reading a file takes
at least three system calls: open, read, close, that is assuming you
already have enough memory and the file is small enough to fit in it in
a single read.

With one record per file, you need three system calls per record. With
multiple records per file, you can read thousands of records with the
same number of system calls. Or use mmap and have all the records
available without system calls — but with page faults.


Second, the file system offers only key → value conversion and
hierarchical enumeration: you can efficiently get at a file if you know
its name, or a set of files if they are all one directory.

But if you want, for example, the files in a certain interval of time,
no luck. You could organize your directories to make the kind of request
you make frequently efficient, like having a /MM/DD/HH hierarchy,
but it is made awkward by the very limited API of the file system, and
cannot even remotely compete with the indexing abilities of structured
formats with multiple records per file.


Third (and last of what I think of right now), libraries or servers to
handle structured data often infrastructure to ensure non-trivial
consistency in the data. For example it can delete automatically
sub-records associated with a main record you just deleted. With the
file system, you would have to reinvent all that.


Do not get me wrong, I am not a fan at all of “if all you've got is SQL,
everything looks like a flat list, even a straightforward tree
structure”, but the “just use the file system” people do not even
realize the kind of services they do render.

Regards,

-- 
  Nicolas George



Re: Can a standard USB have sub directives?

2024-08-08 Thread Nicolas George
John Conover (12024-08-08):
> Can a standard USB have sub directives?
> 
> I was doing some stress testing, and some sub directives had very long
> write latency's. (All less than 4GB.)

What is that thing you call “directive” or “sub directive”?

Regards,

-- 
  Nicolas George



Re: systemd may silently break your system!

2024-08-01 Thread Nicolas George
Vincent Lefevre (12024-08-01):
> so the silent breakage was known and done on purpose.

Cutting yourself on Hanlon's Razor.

-- 
  Nicolas George



Re: Tool to store on IMAP server

2024-07-30 Thread Nicolas George
Tim Woodall (12024-07-30):
> Yes, I use unison to keep some imap servers in sync.

Be precise: you use unison to keep the directories that serve as mail
storage for some IMAP servers in sync. Your unison does not know that
there is IMAP involved.

-- 
  Nicolas George



Re: Tool to store on IMAP server

2024-07-30 Thread Nicolas George
James Cloos (12024-07-29):
> How about keeping a locally patched version of curl on hand (you could
> call it something like /usr/local/bin/imap-upload) which sets the flags
> as you want them to be?

I did not need to ask for help for the obvious solution “write it
yourself”, be it from scratch or from parts.

Regards,

-- 
  Nicolas George



Re: Tool to store on IMAP server

2024-07-29 Thread Nicolas George
Greg Wooledge (12024-07-29):
> You did not say you wanted to do this NON-INTERACTIVELY.

Yes, I did, in the very first message:

“The goal would be to provide our users an alternative to forwarding
their mail to another mail provider”

> Why do you want to do it non-interactively?  It's ONE MESSAGE, ONE TIME!

It is ONE message, thousands of time per hour.

> Can anyone guess what my next response is going to be?  I have a guess.
> It will involve the letters X and Y.

Oh, I know where you are going, but apparently you did not read the
first question carefully enough. I expected that from other people on
the list but not you.

Regards,

-- 
  Nicolas George



Re: Tool to store on IMAP server

2024-07-29 Thread Nicolas George
Greg Wooledge (12024-07-29):
> https://superuser.com/questions/191719/transferring-lots-of-messages-between-imap-accounts

Closer, but no:

I want: transfer ONE message to an IMAP account.

This: transfer LOTS OF messages to an IMAP account.

imapsync (actually mbsync) is really good for what it is good at but
much too heavy for the task at hand, it sets up an infrastructure to
check which mail has already been uploaded.

And mutt's behavior is too unpredictable to be used in a non-interactive
way.

Regards,

-- 
  Nicolas George



Re: Tool to store on IMAP server

2024-07-29 Thread Nicolas George
mick.crane (12024-07-29):
> > I am looking for a tool that reads a mail from its input and stores it
> > into an IMAP mailbox:
> With a new Dovecot install

Thanks, but this is not at all what I am asking. Dovecot is the server,
I am asking for a client.

-- 
  Nicolas George



Tool to store on IMAP server

2024-07-29 Thread Nicolas George
Hi.

I am looking for a tool that reads a mail from its input and stores it
into an IMAP mailbox:

cat mail_file | imapupload imaps://george@server/Mail/incoming

The goal would be to provide our users an alternative to forwarding
their mail to another mail provider that we will have to forbid lest the
other mail providers accuse us of spamming.

I got curl to work (I did not know that curl could do IMAP):

curl --user george --url imaps://server/Mail/testcurl --upload-file /tmp/mail

Unfortunately, curl hardcodes that mail uploaded that way are seen:

  /* Send the APPEND command */
  result = imap_sendf(data,
  "APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}",
  mailbox, data->state.infilesize);

… and I need them to be new.

Alternatively, I have considered using GNU mailutils:

movemail /tmp/mail imaps://george@server/Mail/testcurl

This time, the issue is it insists on finding the password in
~/.mu-tickets without an option to use another file or preferably a
pipe.

Does anybody here have an idea to make all this better?

Thanks in advance,

-- 
  Nicolas George



Re: [SOLVED] potential bug? - was Re: Problem with cryptsetup-initramfs

2024-07-26 Thread Nicolas George
Ian Molton (12024-07-26):
> Now what?

Now maybe you fix your MUA configuration to not omit “Re: ”.

Regards,

-- 
  Nicolas George



Re: cant login if --- (Filesystem / Use 100%)

2024-07-23 Thread Nicolas George
Michael Kjörling (12024-07-23):
> If you can log in as root, then try doing that to either delete or
> move some things out of the way; specifically, to a different file
> system. If you can't do that (for example, because you never set up a
> root password, or because that login also fails in a similar way), you
> will need to boot from some kind of rescue or live media to access the
> file system through there to do the same thing.

No need for all that, just log in on a text console, it will work. The
issue here is GNOME, as usual.

Regards,

-- 
  Nicolas George



Re: debian distro on compact disk

2024-07-23 Thread Nicolas George
> > i was wondering withall the AI in software computer opertings systems where

I wonder what Advertorial Imbecility has to do with small Linux distros.

Thomas Schmitt (12024-07-23):
> Well, on real Compact Disc there will be problems with the size of
> contemporary operating systems. A maximum capacity of 800 MB will
> suffice only for the tiniest distros.

GRML-small (Debian-based rescue/tinkering distro) is 500 mega-octets.

On the other hand, good luck *buying* it ;-D

Regards,

-- 
  Nicolas George



Re: /var/run disappear after reboot

2024-07-22 Thread Nicolas George
George at Clug (12024-07-22):
> Would it be appropriate to use the /opt directory?

No. If it is VARiable, then it should go under /var. /var/lib/somehting
is traditional, /var/opt/something is an option if you installed under
/opt/something.

Regards,

-- 
  Nicolas George



Re: /var/run disappear after reboot

2024-07-22 Thread Nicolas George
Greg Wooledge (12024-07-22):
> The contents of /run (which /var/run points to) are temporary.

And even before /var/run was a link to /run, it was meant to be cleaned
at boot.

Regards,

-- 
  Nicolas George



Re: Remote desktop Debian -> ChromeBook

2024-07-22 Thread Nicolas George
Nicolas George (12024-07-18):
> I want to display a desktop and applications running on a Debian box on
> the screen and keyboard of a ChromeBook. Over LAN+WLAN mostly, but if it
> can also work more remotely in degraded mode it would be nice.
> 
> I see various options to try: VNC with a native Android client, VNC with
> a client running in the Linux sandbox, x2go in the sandbox, Xpra in the
> sandbox, etc.
> 
> Would perchance somebody here have already investigated a similar need
> and be able to tell which solutions are the most promising in terms of
> reliability and user experience.

Thanks everybody for your suggestions.

I was hoping some insight about the client side too, especially the user
comfort, but it was not the correct mailing-list.

I tried Xpra, which is the one I am already familiar with, but the Xpra
client in the Linux sandbox only showed black windows, even with
GDK_BACKEND=x11.

Then before trying anything more fancy I tried just plain “ssh -Y” and
it was plenty fluid enough, so I did not try anything fancier.

(But that means I have to find out why Firefox is disastrously slow when
I run it from the classrooms to my office on our gigabit network with
millisecond latency.)

Regards,

-- 
  Nicolas George



Re: why reliable linux hasn't gained more market share?

2024-07-21 Thread Nicolas George
Joe (12024-07-21):
> And the important phrase there is 'if you want to'. The point is that
> many people, especially those accustomed to running with admin
> privileges on their Windows computers, would continue to do that.

 No, they will not. They will continue to follow the system
default, whatever it is.

And once again, this is a waste of time because being root is not what
matters on a personal computer.

-- 
  Nicolas George



Re: why reliable linux hasn't gained more market share?

2024-07-21 Thread Nicolas George
Alain D D Williams (12024-07-21):
> I only needed root as it was for another user.

Exactly. On a computer with only one user account, once the pirate have
access to that account, they can do everything that matters. Including
spy the root password next time it is typed, but why waste the time when
everything profitable is already there.

The root account is important for multi-users systems and servers with
privilege separation of services.

Regards,

-- 
  Nicolas George



Re: why reliable linux hasn't gained more market share?

2024-07-21 Thread Nicolas George
Joe (12024-07-21):
> I accept what you say, the point I was making is that the more users,
> and they will be less IT-competent users, the more will login as root.

No, they will not.

And it does not matter, because on a personal computer the root account
is not what matters, what matters is the user account where you can
install a key logger and get banking credentials or encrypt all the data
and ask for a ransom.

Regards,

-- 
  Nicolas George



Re: Detecting change in running kernel version between reboots

2024-07-21 Thread Nicolas George
Mike (12024-07-21):
> 1) lsmod | grep 
> 
> I conceed that doesn't actually indicate the kernel has changed, just
> that the kernel module is missing.  However, so far, it being missing
> has consistent indicated a kernel change and rebuilding the driver on a
> false positive isn't really an issue

If the module is not loaded even though the kernel did not change, it
still is an issue you need to investigate, is it not? So this is the
version I would recommend.

You can double that with testing if
/lib/modules/$(uname -r)/path/to/the/module.ko exists.

Regards,

-- 
  Nicolas George



Re: why reliable linux hasn't gained more market share?

2024-07-21 Thread Nicolas George
hlyg (12024-07-21):
> is it possible to remap keyboard to Dvorak in X Window?

Yes, of course.

https://letmegooglethat.com/?q=Debian+dvorak

> does anyone use it
> to speed up typing?

No, only to feel smug.

# Later experiments have shown that many keyboard designs, including some
# alphabetical ones, allow very similar typing speeds to QWERTY and Dvorak
# when typists have been trained for them, suggesting that Dvorak's
# careful design principles may have had little effect because keyboard
# layout is only a small part of the complicated physical activity of
# typing.[19]

https://en.wikipedia.org/wiki/Dvorak_keyboard_layout

Regards,

-- 
  Nicolas George



Re: why reliable linux hasn't gained more market share?

2024-07-20 Thread Nicolas George
Andy Smith (12024-07-20):
> And yes here in the UK where we allowed the Post Office to pay
> billions to Fujitsu to develop the Horizon IT system that
> incorrectly accused hundreds of postmasters of fraud, resulting in
> criminal prosecutions and at least one case of suicide.

That was not a bug, that was a feature.

This kind of thing happens not because the industry is clumsy: all
industries are somewhat clumsy.

This kind of thing happens because politicians are perfectly to let a
clumsy industry handle people' lives. The scope statement probably
insisted more in avoiding false negatives than false positives.

Regards,

-- 
  Nicolas George



Re: why reliable linux hasn't gained more market share?

2024-07-20 Thread Nicolas George
gene heskett (12024-07-20):
> > If they were, you'd have support for software-defined radio signal
> > processing in FFmpeg, for example.
> Which the current rules for such does not allow, by FCC edicts, only sealed
> FCC approved blobs are allowed to play in the rf field.
> So don't blame the coders, blame the regukatory agencies.

signal processing ≠ emitting

-- 
  Nicolas George



Re: why reliable linux hasn't gained more market share?

2024-07-20 Thread Nicolas George
hlyg (12024-07-20):
> Thank David! market share is important though it isn't "reliable
> recommendation for quality": more users attract more programmers, who
> develop more apps,

The programmers who are attracted by market share are not necessarily
the ones who are interested in developing quality and/or innovative
software, though.

If they were, you'd have support for software-defined radio signal
processing in FFmpeg, for example.

Regards,

-- 
  Nicolas George



Re: Remote desktop Debian -> ChromeBook

2024-07-18 Thread Nicolas George
Xiyue Deng (12024-07-18):
> I have been using Chrome Remote Desktop[1] for a few years, and it has
> been very reliable.  Everything is handled through a web page so you
> need not install anything in the Android subsystem.  Recently (about a
> year actually) it added support for pipewire so sound handling is also
> seamless now.

Thanks. But it looks that it has the traffic going through Google's
servers, which is absolutely not an option for me. I definitely want
something local and entirely under my control. Even better if the
Android client comes from F-Droid.

Regards,

-- 
  Nicolas George



Remote desktop Debian -> ChromeBook

2024-07-18 Thread Nicolas George
Hi.

I want to display a desktop and applications running on a Debian box on
the screen and keyboard of a ChromeBook. Over LAN+WLAN mostly, but if it
can also work more remotely in degraded mode it would be nice.

I see various options to try: VNC with a native Android client, VNC with
a client running in the Linux sandbox, x2go in the sandbox, Xpra in the
sandbox, etc.

Would perchance somebody here have already investigated a similar need
and be able to tell which solutions are the most promising in terms of
reliability and user experience.

If not, I will post my findings eventually.

Thanks in advance.

-- 
  Nicolas George



Re: systemd-cryptsetup

2024-07-16 Thread Nicolas George
Lists (12024-07-16):
> In that case you were correct. I had found posts online where people were
> pointing in the direction of systemd and due to the problem with
> systemd-cryptsetup you warned us about I was inclined to take those posts at
> face value. It seems that was not "fair".

That happens.

Note that the systemd-cryptsetup I had is not the fault of systemd
either:

Package: systemd-cryptsetup
Source: systemd

It happened because Debian chose to split it into a separate package,
probably to avoid pulling libcryptsetup and its dependencies into the
core system.

Regards,

-- 
  Nicolas George



Re: systemd-cryptsetup

2024-07-16 Thread Nicolas George
Lists (12024-07-16):
> That referred to a warning I got after booting up after d-i finished
> installing the system. The exact message shown was this:
> 
> cryptsetup: WARNING nvme1n1p3_crypt: ignoring unknown option
> 'x-initrd.attach'


This message comes from /usr/lib/cryptsetup/functions, a file added by
the Debian packaging. Nothing to do with systemd.

Regards,

-- 
  Nicolas George



Re: systemd-cryptsetup

2024-07-16 Thread Nicolas George
Lists (12024-07-15):
> For the most part I understand your point of view. As a matter of fact I am
> not even opposed to systemd as such [1], but over the years I have had my
> share of problems that in the end proved to be caused by some transition to
> systemd. This has made me a bit wary of it.

A complex transition will always have bugs. Even when the target of the
transition is undoubtedly the best, which is not the case here.

> That might be, but to me notices about things like x-initrd.attach not being
> recognized do point in the direction of incompatibility or at least
> differences in the way cryptsetup is handled that shouldn't happen for
> something that is relied upon by so many.

I do not know what you are referring to when you talk about
x-initrd.attach, you were too terse. But I notice that you talked about
it in the same paragraph that you reported the inaccurate information
that systemd has its own implementation of cryptsetup, so I suggest you
might want to check if what you read about is is not inaccurate too.

Anyway, remember that x- means that it is a non-standard option.

> To be clear: I wasn't aiming to restart the heated discussions on systemd on
> this list again! That is long behind us. It was just a personal feeling of
> someone who has been bitten once again by changes with systemd involved. In
> this case it was more of a d-i thing than a systemd thing anyway.

There is little doubt that along with the enhancement compared to the
bunch of unreliable shell scripts, systemd brought its own set of
trouble in the form of a resolute break from the Unix tradition and
habits.

It is a tragedy that modern boot and monitoring systems that respect the
tradition were not mature enough at the right time.

Regards,

-- 
  Nicolas George



Re: umask - default user settings?

2024-07-16 Thread Nicolas George
Greg Wooledge (12024-07-15):
> Neither am I.  But more to the point, it appears that the default umask
> literally *cannot* be changed in any kind of universal way.  There are,
> like, half a dozen different places you'd have to apply a change in
> order to cover just the *most common* workflows.  Who knows how many
> more corner cases would be missed?

This is very true. And alas, it is not limited to umask: environment
variables, limits, etc.

The solution I chose for myself is to put it in .zshenv, zsh being my
shell, and making sure all my other startup scripts are #!/bin/zsh. But
I am sure modern display managers manage to start modern desktop
environments that manage to run user applications without ever invoking
the login shell. Yay for modernity.

Anyway, this whole discussion is moot, because:

- Experienced users can find a solution for the specific system they
  use.

- Even though the default umask is permissive, the permissions on ~ can
  be restrictive, and for lusers it is functionally equivalent, and the
  default permissions on ~ is asked by debconf.

Regards,

-- 
  Nicolas George



Re: systemd-cryptsetup

2024-07-15 Thread Nicolas George
Lists (12024-07-14):
> When I researched the problem I encountered some posts stating that systemd
> had its own implementation for cryptsetup

This is not true. systemd-cryptsetup uses libcryptsetup, it is mostly
only glue.

> 
> Why the *&^%#@! it is necessary to have this borg-like behaviour of systemd
> is beyond me. This is not the first time it is causing problems. TBH, this
> is more an ommission of d-i than of systemd. But then again, it would not
> have happened if there was just one implementation of cryptsetup.
> 

It is not necessary to use systemd: you are free to use a bunch of
unreliable shell scripts to boot your system, as used to be the case, or
to use any of the other replacements for the bunch of unreliable shell
scripts that are better than systemd.

But the bunch of unreliable shell scripts had reached its limits with
hot-pluggable devices, and the other replacements are more obscure, and
usually less mature due to lack of hackerpower. That is why when Debian
decided to ditch the bunch of unreliable shell scripts, it chose
systemd: Debian developers are here to package things, not develop them.

So if you want to either go back or go forward in a different direction,
you have to do it on your own efforts.

Now, why does systemd have this “borg-like” behavior of having its own
package to handle crypptab?

Unlike the bunch of unreliable shell scripts, where there is a long list
of commands and if that list is executed in sequence it should result in
a booted system, if you are lucky, systemd has concepts of running or
failed units with dependencies, so that it knows that it must start the
database before running the web app, but mount the database storage
before starting the database, and it can notify that an unit has
suddenly failed, and so on.

systemd knows to read /etc/fstab, so when it sees:

/dev/mapper/aimlin-tempswapnoneswapdefaults 0 0

it defines an unit “swap” that depends on an unit “device”. But then it
finds the device does not exist: is it slow to initialize? is it
failing? is there a bug in the configuration? systemd cannot guess.

Installing systemd-cryptsetup teaches systemd to parse /etc/crypttab.
Now, systemd sees:

aimlin-tempswap /dev/disk/by-partlabel/aimlin_swap /dev/urandom 
swap,cipher=aes-cbc-essiv:sha256,size=256

and it knows that in order to get /dev/mapper/aimlin-tempswap it needs
/dev/disk/by-partlabel/aimlin_swap and invoke a few commands, and lo!,
/dev/disk/by-partlabel/aimlin_swap does exist, because lvm2 is an early
dependency.


If somebody is not capable of writing whatever necessary to turn a
kernel just executing init into a fully usable system, even if it is
fragile and completely specific for a particular setup, the relevance of
their criticism about systemd will be fatally limited.


Regards,

-- 
  Nicolas George



Re: umask - default user settings?

2024-07-14 Thread Nicolas George
Hans (12024-07-14):
> Greg, I do not agree. If I am writing a document with private content, then I 

If you are writing something confidential, it is your responsibility to
lock the door of your office.

Regards,

-- 
  Nicolas George



Re: systemd-cryptsetup

2024-07-14 Thread Nicolas George
Erwan David (12024-07-14):
> You are a bit cryptic here : should it be installed or should it be removed

Sorry. For me it was not installed and installing it fixed the problem.

> ? I am running testing without problem and systemd-cryptsetup is not
> installed. If I should install it I'd prefer to do it now rather than having
> to go through a rescue system

Do you have encrypted volumes defined in crypttab?

Regards,

-- 
  Nicolas George



systemd-cryptsetup

2024-07-14 Thread Nicolas George
Hi.

In case you are running unstable or testing and it recently started
blocking at boot waiting for encrypted swap or something to do with
encrypted disks:

Check if systemd-cryptsetup is installed.

HtH

-- 
  Nicolas George



Re: Bug?

2024-07-14 Thread Nicolas George
Richard Bostrom (12024-07-14):
> tar -zcvf bak.tar.gz /home/user/Documents &&

Information missing: what is the current directory.

> gpg -r backup@user.local -e bak.tar.gz &&
> rm -rf bak.tar.gz &&

> rsync -vac --delete /home/user/Documents/bak.tar.gz.gpg /media/user/6548-2136 
> &&rm -rf bak.tar.gz.gpg

Fortunately, we have the information: the current directory is
/home/user/Documents.

> tar: file changed as we read it.

The message says it exactly as it is.

Solution: do not use the directory you are trying to backup as a
directory for temporary files at the same time.

Regards,

-- 
  Nicolas George



Re: stty permanently undef "start"

2024-07-11 Thread Nicolas George
songbird (12024-07-10):
>   but for my own purposes i also like to do things for
> terminals when they open up (my session manager and the
> overall desktop will store multiple desktops and all of
> the terminals i have open in each of them when i ask it
> to).

This is absolutely legitimate.

Note that tings in .bashrc will not affect terminals that run directly
another program, like “xterm -e vim”.

>   then in my .bashrc file i check to see what directory
> the terminal opens in and create aliases and other things
> for the specific project that i've got in that directory.
> it's very nice to have just the aliases and environment
> variables and other commands all set up and ready to go.

This too is absolutely fine. I have even seen done this in pre-prompt
functions to have it exec when changing directory in the same shell.

>   it's not a hack

This is not the hack. The hack comes when (1) you put things to
initialize the extended environment in .bashrc, (2) you source .bashrc
when it is not sourced.

All because this idiot bash does not have a .bashenv.

Regards,

-- 
  Nicolas George



Re: stty permanently undef "start"

2024-07-10 Thread Nicolas George
Greg Wooledge (12024-07-10):
> hobbit:~$ echo 'echo I AM BASHRC' >> .bashrc
> hobbit:~$ ssh localhost date
> greg@localhost's password: 
> I AM BASHRC
> Wed Jul 10 11:01:00 EDT 2024
> hobbit:~$ 

~ $ echo "I am in zshrc" >> .zshrc
~ $ ssh localhost date
~ $ ssh localhost date   
Wed Jul 10 17:05:01 CEST 2024

> Debian is, by your definition, a hack made by people who cannot be
> bothered to organize their configuration properly.
> 
> Good to know.

Indeed. Anything that uses bash is, because bash lacks one config file
to make it possible to organize its configuration in a way that always
work. Hence, when using bash, hacks upon hacks to work around that core
issue.

> (I won't even bother explaining because you CLEARLY know better than I
> do about all topics.  Enjoy your day.)

The risk of passive-aggressive like that is that you risk to be right.

Regards,

-- 
  Nicolas George



Re: stty permanently undef "start"

2024-07-10 Thread Nicolas George
Greg Wooledge (12024-07-10):
> There are many legitimate or semi-legitimate situations where a .bashrc
> file might be read by a shell that's not running inside a terminal.
> 
> One of them is if someone chooses to dot in ~/.profile from their
> ~/.xsession file, or something analogous to it.  Or perhaps their
> operating system does this automatically in certain kinds of login.
> 
> Another might be a scripted ssh session being run from cron, or some
> other parent that's not in a terminal.  Analogously, the ancient
> predecessors of ssh (rsh, rexec) had exactly the same issues.

What you describe is not legitimate, even semi-, these are hacks by
people who cannot be bothered to organize their configuration properly.

> When adding new commands to your shell dot files, always wrap commands
> that assume/require the presence of a terminal in a check for a terminal.
> You'll save yourself a *lot* of headaches.

I save myself a lot of headaches by proper places for each snippet of
configuration. Which I can do because I use zsh instead of bash. zshrc
for interactive shell, zshenv for all shells, zprofile for interactive
login shells, etc.

We should not encourage people to pile hacks upon hacks.

Regards,

-- 
  Nicolas George



Re: stty permanently undef "start"

2024-07-10 Thread Nicolas George
David Wright (12024-07-10):
> Someone might source .bashrc from a binary in order to
> access functions that are defined within it.

That would be shooting oneself in the foot. No need to cater for them.

Regards,

-- 
  Nicolas George



Re: stty permanently undef "start"

2024-07-10 Thread Nicolas George
Greg Wooledge (12024-07-10):
> You could -- but if you do so, you should definitely surround it with
> a check for stdin being a terminal (test -t 0 or equivalent).

Does bash execute .bashrc when it is not interactive?

Does bash think it is interactive when its input is not a tty?

Regards,

-- 
  Nicolas George



Re: Automatic creation of last-known-good boot configuration

2024-07-10 Thread Nicolas George
Jens Schmidt (12024-07-10):
> On Debian testing I've been bitten by the systemd upgrade and the
> systemd package split recently, rendering my dracut-LUKS-based
> system unbootable.  I know that my warranty is void since I'm on
> testing, but both these issues would have been much easier to cope
> with if there had been some good backup of my initramfs and kernel
> below /boot.
> 
> So I thought that there might be some automatism like this:
> 
>   If the currently used kernel and initramfs have been in use
>   already N times and if the boot time has been lower then M
>   minutes each time (and if some other conditions are fulfilled),
>   then consider that kernel and initramfs good and save them away
>   where they will not be overwritten by regular kernel/initramfs
>   maintenance.
> 
> Scripting something like that shouldn't be too hard, but I wonder
> if there already is a package implementing that?  A cursory search
> hasn't brought up anything.  There is package dracut-config-rescue,
> but that only configures a variable that does not seem to be used
> by dracut itself.

I will say: this is probably not possible with Debian, since an apt-get
(dist-)uupgrade replaces distributed files, and initrds are rebuilt,
etc.

You can consider using a LVM snapshot, but you can only make one
reliably when the system is read-only. You can consider using a
filesystem snapshot, but filesystems that support snapshots have their
own set of problems.

On the other hand, I can say it is a feature of NixOS, I saw it last
week when somebody asked me “I made a mistake, our VM doesn't boot
anymore, can I access the GRUB console?” and they just rebooted on the
previous configuration. But NixOS is not Debian, it is barely Unix as
far as I can see.

Regards,

-- 
  Nicolas George



Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Nicolas George
debian-u...@howorth.org.uk (12024-07-10):
> Levenshtein distance isn't suited to the problem.

Either your crystal ball is much better than mine or you are trusting
yours too much, because we have not been told what the problem is.

>   It compares the
> entirety of two strings. Emanuel is interesting in comparing one string
> against substrings of a potentially much larger string,

This is not what I read in the messages.

> or even
> substrings of the first string in random order against portions of the
> second string!

This is what I am trying to get the OP to explicit.

Regards,

-- 
  Nicolas George



Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Nicolas George
Emanuel Berg (12024-07-10):
> Indeed, one can have a bunch of such rules and apply them and
> award points and stuff.
> 
> But maybe one could also have a more general, basic
> mechanical/math/stats inspired algorithm?

You cannot have a more general basic mechanical algorithm unless you
know what you want it to do.

> One can also see the data as a bunch of entries, say one for
> each line. To what extent is the new entry unlike all others?

You still need to define unlike.

> See? How can we define what is original in a way that 1.
> makes sense and 2. is useful for this application?

Only you know what “this application” is.

Regards,

-- 
  Nicolas George



Re: [OT] Re: the 'original' string function?

2024-07-10 Thread Nicolas George
jeremy ardley (12024-07-10):
> The modern way would be to use a LLM in API mode and set a context to
> achieve your aims.

All modern languages have some kind of rand() function. I assumed the OP
wanted to do something useful with the answers.

Regards,

-- 
  Nicolas George



[OT] Re: the 'original' string function?

2024-07-10 Thread Nicolas George
Emanuel Berg (12024-07-10):
> Okay, this is gonna be a challenge to most guys who have been
> processing text for a long time.
> 
> So, I would like a command, function or script, 'original',
> that takes a string STR and a text file TXT and outputs
> a score, from 0 to 100, how _original_ STR is, compared to
> what is already in TXT.
> 
> So if I do
> 
> $ original "This isn't just another party" comments.txt
> 
> this will score 0 if that exact phrase to the letter already
> exists in comments.txt.
> 
> But it will score 100 if not a single of those words exists in
> the file! Because that would be 100% original.
> 
> Those endpoints are easy. But how to make it score - say - 62%
> if some of the words are present, mostly spelled like that and
> combined in ways that are not completely different?
> 
> Note: The above examples are examples, other definitions of
> originality are okay. That is not the important part now - but
> can be as interesting a part, later.

You can use that:

https://en.wikipedia.org/wiki/Levenshtein_distance

But you also need to define what you want with more precision:

How do you count the replacement of a word by a synonym?

How do you count a change in the order of the words?

How do you count a transparent spelling mistake?

How do you count a spelling mistake that turns a word into another
existing word?

Not related to Debian, putting “[OT]” in the subject.

Regards,

-- 
  Nicolas George



Re: small font

2024-07-05 Thread Nicolas George
Richard (12024-07-05):
> You really need to better read who writes what. I didn't start the
> discussion on message sizes due to HTML, I simply ended it because of
> irrelevance.

And that ended the willingness of many people to help you.

Good luck with your problems.

-- 
  Nicolas George



Re: Using packaged Nix

2024-07-05 Thread Nicolas George
didier gaumet (12024-07-04):
> I tried the Debian way (installing nix-setup-systemd, which install nix-bin)
> without success. I then tried the method quoted in this webpage:
> https://ariya.io/2020/05/nix-package-manager-on-ubuntu-or-debian
> also without success but I indicate it because perhaps it will give you more
> hints about what to do

This or something similar will be the next step if I cannot get the
packaged version to work.

It is not the first time I am left wondering why something reaches the
Debian archive if it does not work. I already noticed that the ARM
installer advertised support for the RockPi nanocomputers but did not
manage to boot at all. How?

> While Pkgsrc has long been source only, nowadays it is a whole packaging
> system, both source and binary since the introduction of Pkgin.
> This webpage seems to confirm what I was suspecting: Pkgsrc would be able
> manage binary packages on linux:
> https://opensource.com/article/19/11/pkgsrc-netbsd-linux
> (but I was too lazy to verify by installing and trying  myself)

Thanks.

There is another property of Nix I need: Nix never replaces a file, it
only creates new files under different directories. This is important
for me as I intend to use the same snapshot of the /nix volume connected
read-only on multiple virtual machines. That way, I can install a new
version of, say, PostgreSQL for one VM but the other VMs running the
older version will not be affected at all until I upgrade them too.

Do you know if pkgsrc can give the same guarantee?

(I have also put the Debian /usr on a separate volume with a read-only
snapshot shared between VMs. The fact that on Debian stable an upgrade
does not require change in configuration files means I can upgrade the
system, make a new snapshot and reboot the VMs on it and it will work. I
even “mv /boot /usr && ln -s usr/boot /boot”. It seems to work. At some
point I will write a blog article about it.)

Regards,

-- 
  Nicolas George



Re: Using packaged Nix

2024-07-05 Thread Nicolas George
didier gaumet (12024-07-04):
> (sorry Nicolas, I first sent you a private mail instead of posting on this
> list, my bad)

No problem, I just wondered for a few seconds why it arrived twice.

> Guix, the GNU version of Nix, seems (at least basically) functional from the
> start on Debian:
> 
> sudo apt install guix
> guix search $PACKAGE
> 
> but while there are packages for postgresql and boost, apparently there is
> none for libossp or ossp

“GNU Guix provides 28,177 packages” — https://packages.guix.gnu.org/

“Search more than 100 000 packages” — https://search.nixos.org/packages

The GNU version seems… less mature.

Thanks for the pointer though.

Regards,

-- 
  Nicolas George



Re: Using packaged Nix

2024-07-04 Thread Nicolas George
didier gaumet (12024-06-28):
> Disclaimer: I have never used Nix

Thanks for the heads up. I kind of hoped somebody who did would see this
mail.

> from the Nix to Debian phrasebook
> ( https://nixos.wiki/wiki/Nix_to_Debian_phrasebook )
> I would try:
> $ nix-env -qaP '.*libossp_uuid.*'

Unfortunately, no luck.

error: selector '.*libossp_uuid.*' matches no derivations

This phrasebook looked promising, but what it explains is how to use
Debian when you know Nix and how to use Nix when you know Debian.

What I need is something that explains how to use Nix on Debian when all
you have are documentations about Nix not on Debian.

> As an answer to your other question (is there another package system
> managing dependencies available on Debian?), I have never used NetBSD
> pkgsrc/pkg on Linux but it has long been possible.

Oh, sorry, I should have been more specific: I would like binary
packages.

Thanks for the pointers, even if they do not help.

Regards,

-- 
  Nicolas George



Using packaged Nix

2024-06-28 Thread Nicolas George
Hi.

I am trying to use Nix on Debian, with the packaged version.

My goal is to have a pristine Debian OS and the ability to install
binaries for specific versions of common software independently from the
OS.

The problem is: none of the commands I find on the web work in this
setup.

For example, I did:

nix-channel --add https://nixos.org/channels/nixos-24.05 nixos
nix-channel --update

Then I check the packages I want:

https://search.nixos.org/packages?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=postgresql
https://search.nixos.org/packages?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=ossp
https://search.nixos.org/packages?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=boost

And type the commands they suggest:

nix-shell -p libossp_uuid

and it fails miserably:

error: file 'nixpkgs' was not found in the Nix search path (add it using 
$NIX_PATH or -I)

Or:

nix-env -iA nixpkgs.libossp_uuid

fails too:

error: attribute 'nixpkgs' in selection path 'nixpkgs.libossp_uuid' not found

Can somebody tell me what I am doing wrong and/or give me hints on how
to get started?

Alternatively, if you know other packages systems that can achieve a
similar goal, I can consider using it instead. But it has to handle
shared dependencies.

Thanks in advance.

-- 
  Nicolas George



Re: Needed tool for vision-impaired - was [Re: PDF Editor for Debian]

2024-06-24 Thread Nicolas George
Karen Lewellen (12024-06-24):
> Good afternoon.
> I am providing another option that might help here.
> robobraille,
> 
> www.robobraille.org
> Provides services, free of charge, that will convert pdf files  to a number
> of different formats, including .html
> They provide audio, mobi, and  convert epub files too..but I digress.
> As a test, consider sending your file to
> convert at robobraille.org
>  correctly of course.
> in the subjectline put html
> leaving the body blank, and attach the file.
> See if the .html file returned meets your needs.

Interesting.

Do you know how they fare with math? I mean real, non-trivial formulas
produced by LaTeX like you would find in
https://arxiv.org/abs/1803.05929 ?

(I know, I could test. I will if you do not know the answer.)

Regards,

-- 
  Nicolas George



Re: About dash as sh

2024-06-23 Thread Nicolas George
Stefan Monnier (12024-06-21):
> And if it's not a tty, you get some kind of Undefined Behavior?

Knowing that “undefined behavior” is just an expression invented by C
standards authors to make “we make no guarantee about it, use it at your
own risk” sound more scary, I do not think it is a severe problem.

> I don't think I'd like that because I don't think the benefit would be worth
> the UB troubles.

The reasoning is the other way around: this feature should not be used,
and therefore the trouble of standardizing it is a waste of time.

The reason this feature should not be used is that it is exceptional. It
does not work with scripting languages that read their whole script
before running. It does not work with chained commands: “(head -n 2 >
/tmp/1 ; head -n 4 > /tmp/2)” will not put the next four lines in the
/tmp/2 file. None of the standard shell utilities makes any effort to
control buffering, and doing so would either change their semantics or
ruin their performances. Only the shell itself has this constraint.

So in order to use this guarantee properly, you need to be absolutely
sure you are in the exact case it covers. And odds are you will realize
it does not work because you added something in between that does
buffering.

Better just design your script in a way that does not rely on buffering
subtleties.

Regards,

-- 
  Nicolas George



Re: About dash as sh

2024-06-21 Thread Nicolas George
Greg Wooledge (12024-06-21):
> The original message began with the assertion that the OP had run
> across a bug in dash, and gave two URLs, with no description of the bug
> or the impact it was having on their life.
> 
> I read one of the URLs, and the bug is rather obscure.  It involves a
> second script embedded inside a here document inside the first script,
> with the second script being passed to an interpreter process on stdin.
> I'm not surprised that nobody knew about the bug for many years.

The purported bug boils down to this: if you pipe to a non-interactive
shell a command and data for that command, then the non-interactive
shell might read more than just the command as part of its input
buffering and leave less or nothing as data to the command itself.

It is indeed a bug, since the standard says:

  When the shell is using standard input and it invokes a command that
  also uses standard input, the shell shall ensure that the standard
  input file pointer points directly after the command it has read when
  the command begins execution.

But I consider this clause is misguided, it should apply only when the
input is a tty. Relying on it is a terrible idea.

Regards,

-- 
  Nicolas George



Re: can't connect to eduroam due to SSL3 unsupported protocol

2024-06-17 Thread Nicolas George
Richard (12024-06-17):
> There is a coordination, so you can use the same login data all over the
> world. At least that's how it's supposed to work. But afaik the protocols
> themselves aren't predefined. That's up to the local IT department how they
> implement this. Authentication should always be done locally, with
> synchronization between facilities. At least to my understanding, but I'm
> no eduroam professional.

That would require that all establishments download and keep in sync the
whole database of users of all other establishments. That is not
sustainable, and I am not even talking about the privacy concerns.

What happens is the local Radius for Eduroam forwards the authentication
request to the Radius from the origin institution.

For example, if the security officer of here.edu knows there was an
incident on a local Eduroam IP, they can know it was authenticated for
“anonym...@somewhere-else.edu”, and they need to ask to the security
officer of somewhere-else.edu to get further details.


> Am Mo., 17. Juni 2024 um 17:02 Uhr schrieb Vincent Lefevre <
> vinc...@vinc17.net>:

Please do not top-post.

Regards,

-- 
  Nicolas George



Re: Uninstalling a package and its entourage

2024-05-27 Thread Nicolas George
Eben King (12024-05-27):
> Is there an easier way to uninstall a package and everything it brought in
> at one swell foop?  Thanks.

The packages you did not choose to install but were installed as a
consequence are shown by apt-get when you do almost anything:

The following packages were automatically installed and are no longer required:
  

Regards,

-- 
  Nicolas George



Re: OT: Top Posting

2024-05-15 Thread Nicolas George
Cindy Sue Causey (12024-05-15):
> PS Afterthought is that email signatures are another of that widely
> accepted netiquette set of standards.

You can add the “Re: ” to that list.

It is the sequence of four octets 0x52, 0x65, 0x3a, 0x20, and nothing
else.

The MUAs who write “RE: ” are wrong.

The MUAs who write “Re : ” are wrong.

The MUAs who write “AW: ” are wrong.

The MUAs who put it in base64 are wrong.

It is not a string that is designed to be internationalized, we cannot
expect every MUA to know every stupid local or vanity variant of “Re: ”.

Regards,

-- 
  Nicolas George



Re: OT: Top Posting

2024-05-15 Thread Nicolas George
Cindy Sue Causey (12024-05-15):
> Best as I was able to discern from the Net [0], 72 characters is the
> magic number for line length because 4 extra characters are added to
> both ends when e.g. git processes submissions. Makes good common sense
> to me.

Git is an order of magnitude younger than the limit at 72 characters.

> PS I thought it was 80. Guess it was about those extra 8 characters.

It is 80 but you anticipate that people will be adding “> ” in front of
your lines.

> "Pretty well agreed upon..." That's implying that unspoken list
> standards are really not users "picking on each other." Listserv
> standards is a concept that has evolved over decades for rational
> reasons as Developer and User communications evolved.

Indeed.

> It's easy to mess up badly while moving emails around

As a general rule, GUIs suck at anything but trivial tasks.

> Evolution appears to do some form of maybe symlinking instead of
> downloading so everything is available almost immediately seconds after
> the first time Evolution is ever fired up.

The IMAP protocol is designed to let us manipulate mails directly on the
server without downloading the bulk of them. A lot of GUI MUA are still
designed around the old paradigm where mails are downloaded, and turned
it into some kind of cache: it rarely works well.

Manipulate mails directly on the server. Have a backup. If your server
is often down and accessing the mails is urgent, have a local *copy* of
it.

> reach back a limited time span into history before I a-sume Gmail cut
> off access to touching older emails.

If you want mail that works well, start by avoiding services meant for
the lowest common denominator of the general public.

Regards,

-- 
  Nicolas George



Re: OT: Top Posting

2024-05-14 Thread Nicolas George
Greg Wooledge (12024-05-14):
> Usenet news.  For people in this culture, there is a well-defined set
> of "netiquette" rules -- plain text messages, inline quoting with "> "
> citation characters, lines limited to ~72 characters, etc.

I slightly disagree with this wording: you make it sound like we follow
the rules just because they are there. Not so: we follow the rules
because they make sense, because they make conversations more fluid:

- Limiting to 72 characters was good because a lot of terminals were 80
  columns, and it is still good because longer lines are hard to read
  but mail software still is not smart enough to rewrap text by the mile
  but not code.

- Trimmed interleaved quoting presents to the reader the exact
  information they need in the order they need it to understand the
  reply and what it is about.

In summary, the hackers culture expects the sender to spend a little
effort into making the mail easy to read for the recipient(s) while the
culture of the general population expects the sender to make as little
effort as possible and the recipient(s) to bear the burden that the
software in between cannot take, i.e. most of it.

And the “(s)” tells us which culture is more efficient and why.

> The second culture are Windows users who grew up with Microsoft products
> in their school or workplace.  In this culture, top-posting is the norm,
> and inline quoting is nigh impossible.  Messages are often sent in either
> HTML or markdown format.

Messages in Markdown in the Windows world? I have never seen it.

> The best course of action in this case is to drop it

Indeed. But we can still discuss cultural issues relevant to
mailing-lists around it.

Regards,

-- 
  Nicolas George



Re: Dovecot correct ownership for logs

2024-05-14 Thread Nicolas George
Alain D D Williams (12024-05-14):
> PS: check the dictionary definition of "literally".

I think you should have checked first that it makes the point you want
to make and not the opposite:

2. (degree, figuratively, proscribed, contranym) Used non-literally as
   an intensifier for figurative statements: virtually, so to speak
   (often considered incorrect; see usage notes)
3. (colloquial) Used to intensify or dramatize non-figurative
   statements.
4. (colloquial) Used as a generic downtoner: just, merely.
<https://en.wiktionary.org/wiki/literally>

2. in effect : virtually—used in an exaggerated way to emphasize a
   statement or description that is not literally true or possible
<https://www.merriam-webster.com/dictionary/literally>

* used to emphasize what you are saying:
* simply or just:
<https://dictionary.cambridge.org/dictionary/english/literally>

Regards,

-- 
  Nicolas George



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

2024-05-13 Thread Nicolas George
Mario Marietto (12024-05-13):
> The command iptables -A POSTROUTING -t nat -s 192.168.1.5 -j MASQUERADE
> doesn't work if invoked as a user,it says "you must be root". So,as
> user,the script seems to be working fine like this :
> 
> function jumpto
> {
> label=$1
> cmd=$(sed -n "/$label:/{:a;n;p;ba};" $0 | grep -v ':$')
> eval "$cmd"
> exit
> }

You seem to be investing a lot of effort into a fragile solution to
emulate a deprecated execution control primitive.

Regards,

-- 
  Nicolas George



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

2024-05-13 Thread Nicolas George
Richmond (12024-05-13):
> sudo bash -c "echo 1 > hello"

Use sh for that.

Regards,

-- 
  Nicolas George



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

2024-05-13 Thread Nicolas George
to...@tuxteam.de (12024-05-13):
> That's like slicing your morning baguette with the chainsaw.

Worse than that, it will only work from an X11 environment. Certainly
not at boot.

Regards,

-- 
  Nicolas George



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

2024-05-13 Thread Nicolas George
Dan Ritter (12024-05-13):
> Mario Marietto wrote:> If you run 
> 
> sudo echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> then the shell you are running it from will run "sudo echo 1"
> and then try to put the output in that file.

Other way around: the shell first tries to redirect the output to the
file and then (if it succeeds) runs sudo that way.

Regards,

-- 
  Nicolas George



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

2024-05-13 Thread Nicolas George
Stefan Monnier (12024-05-13):
> > echo 1 > /proc/sys/net/ipv4/ip_forward
> >
> > work only if I'm root. It does not work using sudo.
> This doesn't sound right.  Maybe you should investigate why you're
> seeing this behavior, rather than work around the problem.
> 
> `sudo` *is* root.

No need to “investigate”, the answer is obvious: in

sudo foo > bar

… the > bar comes before the sudo.

Regards,

-- 
  Nicolas George



Re: Installing testing on Acer Aspire 315

2024-05-01 Thread Nicolas George
Paul Scott (12024-05-01):
> I read that I should try a more complete image which I am downloading
> (jigdo) now.

Waste of time. The drivers are either in the kernel image or in
individual packages, you can install them on top of what you have.

> I would appreciate any thoughts or suggestions,

Check the PCI ids of your Ethernet controller. Download the kernel image
you are considering, check if any of its modules matches these ids.

Regards,

-- 
  Nicolas George



Re: *****SPAM***** Marking as spam [was: *****SPAM***** Re: LibreOffice removed from Debian]

2024-04-18 Thread Nicolas George
rtnetz...@windstream.net (12024-04-18):
> As I understand what he wrote, the SPAM tag is added after the message leaves 
> his control.

I very much doubt it, we would see “*SPAM* Re:” rather than
“Re: *SPAM*”.

And his recent “Sorry” mail was not tagged.

https://lists.debian.org/debian-user/2024/04/msg00294.html

Regards,

-- 
  Nicolas George



Re: *****SPAM***** Marking as spam [was: *****SPAM***** Re: LibreOffice removed from Debian]

2024-04-18 Thread Nicolas George
Hans (12024-04-18):
> As I can not fix it

You can manually remove “*SPAM*” from the mail when you reply.

You could even automate it on your end.

-- 
  Nicolas George



Re: Automatic reboot on kernel crash in Debian 12 - how?

2024-04-16 Thread Nicolas George
Michael Kjörling (12024-04-16):
> Are you saying that the settings themselves are reasonable for the
> purpose, and that this particular crash just happened to be such a one
> that no software running on the system in question can reasonably help
> with that scenario?

No, unfortunately I do not have the gift of divination, it would be
convenient. I am saying that you cannot use software to protect yourself
entirely from software bugs.

> This happened on a VM that I can't directly influence the hardware
> configuration of (a commercially provided VPS), but I should be able
> to jury-rig something using the provider's API if necessary.

You probably can. But first check if your VM has an emulated hardware
watchdog.

Regards,

-- 
  Nicolas George



Re: Automatic reboot on kernel crash in Debian 12 - how?

2024-04-16 Thread Nicolas George
Michael Kjörling (12024-04-16):
> However, this morning I woke up to one of those systems showing a
> kernel crash dump and being frozen. Unfortunately the first part of
> the crash dump had scrolled past so I couldn't tell what class of
> problem caused the crash.
> 
> Do I need to set some more settings to ensure that the system will
> automatically reboot on a panic? If so, what?

If the crash was bad enough to freeze the kernel before it could
trigger the reboot, there is nothing the software can do.

You need a hardware watchdog. If your motherboard has one, just install
and enable the corresponding daemon, and check it works by SIGSTOPing
it.

If your motherboard does not have one, you can probably DIY one from a
RPi or an Arduino.

Regards,

-- 
  Nicolas George



Re: config files - newline possible?

2024-04-11 Thread Nicolas George
Hans (12024-04-11):
> But can this be done in config-files, too?

Depends entirely on the software reading the config file. Some will use
\, some will use something else, some will offer no solution.

Regards,

-- 
  Nicolas George



Re: Root password strength

2024-03-19 Thread Nicolas George
Jan Krapivin (12024-03-19):
> The thing is my password is very easy now, and i haven't thought about
> *"automated
> connection attempts"*, that sounds rather... scary? My password is easy
> because i am not afraid of direct physical access to the computer.

Hi.

Do you have some kind of remote access enabled or do you intend to in
the near future?

If not, then you do not need to worry. Even less if you have a firewall
to block any service that might appear by mistake.

Regards,

-- 
  Nicolas George



Re: Hyphen-minus passwd

2024-03-07 Thread Nicolas George
Greg Wooledge (12024-03-07):
> Looks like you want the -- to separate options from non-option arguments,

Of course.

> What threw me for a
> few moments was that "-salt username" is a single option with argument.
> I wasn't expecting "username" to be the salt.  It looked like a non-option
> argument at first.

Yes, that is super weird, possibly a mistake. All the more reason to
have the original poster clarify their needs.

Regards,

-- 
  Nicolas George



Re: Hyphen-minus passwd

2024-03-07 Thread Nicolas George
Lee (12024-03-07):
> You're going to rag on him for not copy-pasting EXACTLY when you could
> have just told him the standard way to get a leading hyphen accepted
> on the command line is to backslash escape it!??

Uh, yes, of course. And that would be best even if your answer was not
wrong.

-- 
  Nicolas George



Re: Hyphen-minus passwd

2024-03-07 Thread Nicolas George
Lee (12024-03-07):
> $ openssl passwd -6 -salt username \\-password
> $6$username$7 ..etc..

Wrong answer: this gives the encrypted string for “\-password”, not for
“-password”.

~ $ openssl passwd -6 -salt username \\-password
$6$username$7Vzj6uFI0bs770qb.tIdqyMDbBWCoF93TKbZ7GSmU0ktiCcMu5rxgjpumDUram2ulYhVlWycvUMf1jGKbu8sC1
~ $ perl -e 'print crypt("-password", "\$6\$username\$"), "\n"'
$6$username$FCvGwi21H/uVp89BtnZHWQsL.vZKajZ3lRbfB7Jnjr2C.5qBgx7TB3Ul3PbcyCIArts/C2lfQgYOLp418oH7C0
~ $ perl -e 'print crypt("\\-password", "\$6\$username\$"), "\n"'
$6$username$7Vzj6uFI0bs770qb.tIdqyMDbBWCoF93TKbZ7GSmU0ktiCcMu5rxgjpumDUram2ulYhVlWycvUMf1jGKbu8sC1

-- 
  Nicolas George



Re: Hyphen-minus passwd

2024-03-07 Thread Nicolas George
Computer Planet (12024-03-07):
> How can I create this password with a hyphen in front?
> 
> # openssl passwd -6 -salt username -password
> 
> This is the response message when I try:
> passwd: Unknown option: -passwd

Hi. No it is not. Start by copy-pasting EXACTLY what is in your
terminal.

Also, do not be root when you do not need to.

Regards,

-- 
  Nicolas George



Re: *****SPAM***** Re: Spam from the list?

2024-03-06 Thread Nicolas George
Hans (12024-03-06):
> I am using this spamfilter now for several years. It should be well trained 
> and 
> almost until about 4 months I never had any problems with it.

Hi.

It is probably not the reason for you problem now, but it is important
to note that in the “several years” since your spam filter was trained,
spammers have not stayed idle, they have learned, they have refined
their mail to bypass the most common protections. And in turn,
protections have evolved to fight the new stealthiness of spammers.

Spammers also have changed topics, they used to sell pills, now they
sell cryptocurrencies. If your Bayesian filter is trained to recognize
mails that sell pills, they might accept mails that seem to talk about
technical points of computing.

So if your own mail filter has not evolved, it is not surprising that it
becomes progressively less efficient.

> Am Mittwoch, 6. März 2024, 12:22:53 CET schrieb Brad Rogers:

Please remember not to top-post.

Regards,

-- 
  Nicolas George



Re: where are the crontab files in Trixie?

2024-02-28 Thread Nicolas George
Max Nikulin (12024-02-28):
> I am in doubts if it is a task for cron. Wouldn't udev rules be better?

Or even the good old simple way that still works:

   install modulename command...
   This command instructs modprobe to run your command instead of
   inserting the module in the kernel as normal. The command can be
   any shell command: this allows you to do any kind of complex
   processing you might wish. For example, if the module "fred" works
   better with the module "barney" already installed (but it doesn't
   depend on it, so modprobe won't automatically load it), you could
   say "install fred /sbin/modprobe barney; /sbin/modprobe
   --ignore-install fred", which would do what you wanted. Note the
   --ignore-install, which stops the second modprobe from running the
   same install command again. See also remove below.

Regards,

-- 
  Nicolas George



Re: Selective rotation of journald logs

2024-02-26 Thread Nicolas George
Max Nikulin (12024-02-23):
> I am realizing that the following is not an answer to the asked question.
> The thread is no more than useless arguing anyway.
> 
> Some ideas that might be useful in close cases:
> - a bunch of filtering options and --output=export as a part of log rotation
> to have selective copy of the journal in an alternative directory

Hi.

You know what? I think it is exactly the right answer.

I think the principle for this thing is: journald maintains the current
logs in a best-effort manner, but when it comes to archival, the needs
and manners are too varied, it does not try to provide a ready-to-use
solution, but journalctl provides all the tools necessary to implement
what we want.

If I am right, if it is indeed the way it is meant to be used, I just
wish somebody would have bothered writing it in so many words at the
start of a documentation.

Thanks.

-- 
  Nicolas George



Re: Selective rotation of journald logs

2024-02-23 Thread Nicolas George
Mariusz Gronczewski (12024-02-23):
> Like, really what kind of person gets angry when they get too much
> details in instruction?

What kind of person writes pages of angry mail when the details are not
liked?

-- 
  Nicolas George



Re: Selective rotation of journald logs

2024-02-23 Thread Nicolas George
Greg Wooledge (12024-02-23):
> Have you even *read* this mailing list?  Most of the people who ask
> for help here lack experience that you might consider "baby sysadmin"
> level, and would greatly appreciate the explanations.

It is usually quite easy to tell the difference by the phrasing and
accuracy of the question.

Regards,

-- 
  Nicolas George



Re: Selective rotation of journald logs

2024-02-23 Thread Nicolas George
Greg Wooledge (12024-02-23):
> What was "blind" about his anaylsis?  It looked pretty well thought out
> to me.  He showed actual examples of how space-inefficient it is, and
> provided a theoretical example of how one misbehaved service could
> flush out the important logs of well-behaved services.

The selective blindness here is to look only at the bad things. The
drawbacks mentioned exist, but they are in part there for reasons, in
order to fix the issues of the previous solutions.

An analysis that mentions only the bad things and conclude to recommend
using the previous solutions without even discussing their own drawbacks
is not worth our time.

> If anything, the person who's blindly following a path is *you*.  You're
> looking to do something that multiple people have said is not possible,

Multiple?

> and when they offer you an alternative, your claws come out.

When somebody spends one line answering the question and then pages
“offering an alternative” by explaining things a baby sysadmin would
already know, I deduce they are not much above the level of baby
sysadmin themselves, and it cancels any trust I could have put in the
one-line answer.

Regards,

-- 
  Nicolas George



Re: Selective rotation of journald logs

2024-02-23 Thread Nicolas George
Mariusz Gronczewski (12024-02-23):
> So to say it short: It is horrid.

Generic bashing of systemd in favor of a blind cult of the good old ways
are not what I am looking for either, and the unbalanced tone of your
reply makes it look like precisely that.

-- 
  Nicolas George



Re: Selective rotation of journald logs

2024-02-23 Thread Nicolas George
Mariusz Gronczewski (12024-02-23):
> That is not a feature systemd's logging have.

That is what it seems, but I would like second opinions.

>   You'd have to make a
> rsyslogd rule to put it in one directory

Thanks, but my question was about systemd's infrastructure. Answers
about the old systlog/logrotate infrastructure are a waste of time since
I already know how they work and they are amply documented elsewhere.

-- 
  Nicolas George



Selective rotation of journald logs

2024-02-23 Thread Nicolas George
Hi.

It might be an obvious question, but I do not manage to find the obvious
answer:

How do I tell systemd's logging system to keep authentication logs for
one year and mail logs for one month?

Regards,

-- 
  Nicolas George



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

2024-02-13 Thread Nicolas George
Gremlin (12024-02-13):
> Oh like debian does?
> 
> cat /etc/default/locale
> #  File generated by update-locale
> LANG=en_US.UTF-8
> LANGUAGE=en_US.UTF-8
> LC_ALL=en_US.UTF-8

I do not observe this, even after “sudo dpkg-reconfigure locales”. Can
you explain how you reached this state?

-- 
  Nicolas George



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

2024-02-13 Thread Nicolas George
Will Mengarini (12024-02-13):
> * Greg Wooledge  [24-02/13=Tu 15:59 -0500]:
> > In csh, you need to use env.  Like this:


> What Greg posted also works, because it's an
> invocation of the 'env' command, not csh syntax.

Yes. What made Greg's statement false was not the fact that it does not
work but the verb “need”.

> What you posted also works, but it runs the command in a subshell of
> csh, so I doubt it gains efficiency over running the command under env.

env is also executed in a subshell, but unlike what I posted, env will
also require an exec() and probably some dynamic linking.

-- 
  Nicolas George



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

2024-02-13 Thread Nicolas George
John Conover (12024-02-13):
> > variable LC_ALL to "C" inline of the command e.g.:
   ^
> egrep ALL .bashrc
> LC_ALL=C
> 
> set | egrep ALL
> LC_ALL=C
> 
> dash
> set | egrep ALL

You missed part of the question, what you are showing is not “inline of
the command”.

-- 
  Nicolas George



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

2024-02-13 Thread Nicolas George
Greg Wooledge (12024-02-13):
> This syntax works in all the Bourne family shells, which is all of the
> above *except* csh.
> 
> In csh, you need to use env.

No, ( setenv var something ; command ) works with csh.

> % env LC_ALL=C apt install
> 
> This works in all shells, at the cost of being slightly less efficient.

And even without a shell.

Regards,

-- 
  Nicolas George



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

2024-02-13 Thread Nicolas George
Franco Martelli (12024-02-13):
> This is useful when it's needed to submit a bug report or to speak with
> other people in one international mailing list like this :) (apropos sorry
> for my English).

Your English does not look bad. And therefore you would probably be
better making this the default. Translations of software are often
mediocre or worse. (I remember when the French translation of df broke
the alignment of columns.) Use the software in its original version and
you will not have to guess if you misunderstood or if the translator
did.

> So the question is: does anybody know if this syntax works on all shells
> other than bash? csh, korn, dash, zsh …

apt-get install csh
csh
LC_CTYPE=C ls /doesnotexist
^D
apt-get purge csh

Repeat with other shells. And then tell us what you found out.

Regards,

-- 
  Nicolas George



Re: Combining Distro DVD's

2024-02-12 Thread Nicolas George
Steve Matzura (12024-02-12):
> I thought it'd be a nice idea to combine any and all distribution media for
> a release into a single medium--a USB drive, of course. I'd start by
> creating my USB drive by extracting the first DVD to it, thereby ensuring
> the boot block and boot material is where it should be. But then what do I
> do with the additional media? Surely there will be some files with the same
> name among the individual pieces of media, and some will probably contain
> the same info while others probably will not. What do I have to watch for
> and make sure I don't overwrite, but add to, when extracting files from the
> additional disks to bag it all up and make a single medium which contains
> everything in one place?

If the live media are compatible with GRUB's loopback mechanism, you can
follow these instructions:

https://nsup.org/~george/comp/live_iso_usb/grub_hybrid.html
https://nsup.org/~george/comp/live_iso_usb/

Regards,

-- 
  Nicolas George



Re: xterm PRIMARY and CLIPBOARD selection [was: Re: Copy from Firefox and paste into Terminal with Vim]

2024-02-07 Thread Nicolas George
Max Nikulin (12024-02-07):
> It may be a convention for applications other than terminals, however I am
> unsure what "standard" means for terminals.

I have not said it is more “standard for terminals”, I have that it is
more “standard” fullstop. It is more standard by the virtue of having
worked for decades, C-Ins S-Ins S-Del existed way before the C-C C-V C-X
tryptich, and still working today in most contexts.

> Thanks, it seems, it works in bookworm. Several years ago xterm did not
> support ownership of independent CLIPBOARD and PRIMARY simultaneously. It
> was a workaround for the following scenario:
> 
> - select some text
> - copy it to CLIPBOARD
> - select another fragment of text (PRIMARY)
> - switch to another application
> - paste from PRIMARY
> - paste from CLIPBOARD

Works for me. The author of XTerm is quite reactive if you can explain
the issue clearly, I am not surprised it was fixed.

Regards,

-- 
  Nicolas George



Re: Copy from Firefox and paste into Terminal with Vim

2024-02-06 Thread Nicolas George
Max Nikulin (12024-02-07):
> Shift Ctrl C:

CtrlInsert is the standard counterpart to ShiftInsert.

>   exec-formatted("sh -c 'xsel --output --primary |
> \
> exec xsel --input --clipboard'", PRIMARY)\n\

copy-selection(CLIPBOARD)

… is simpler.

Regards,

-- 
  Nicolas George



  1   2   3   4   5   6   7   8   9   10   >