Re: Help upgrade to JDK-21

2024-09-06 Thread Dan Ritter
Arbol One wrote: 
> I'd like to upgrade from JDK-17 to JDK-21.
> Since I am new to, well, Linux in general, I'd like to know from anyone
> who'd done this upgrade if this would be OK under Debian 12 (No
> free-firmwarepackages please).
> Any advice would be much appreciated.


Debian stable (12) does not have openjdk 21; you will need to
get it from another source.

https://openjdk.org/install/

If you install it in /opt, and reference it specifically
whenever you want a program to use it, that should not cause
problems.

-dsr-



Help upgrade to JDK-21

2024-09-06 Thread Arbol One

I'd like to upgrade from JDK-17 to JDK-21.
Since I am new to, well, Linux in general, I'd like to know from anyone 
who'd done this upgrade if this would be OK under Debian 12 (No 
free-firmwarepackages please).

Any advice would be much appreciated.

--
*/ArbolOne ™/*
Using Fire Fox and Thunderbird.
ArbolOne is composed of students and volunteers dedicated to providing 
free services to charitable organizations.
ArbolOne's development on Java, PostgreSQL, HTML and Jakarta EE is in 
progress [ í ]

Re: need help killing screen blanker

2024-09-01 Thread Max Nikulin

On 28/08/2024 01:58, gene heskett wrote:
wakeup time is 5 + seconds by which time a sleeve caught on a chuck jaw 
has already tried to rip an arm off.


Taking into account your approach to configure applications


so sudo chmod 644 /etc/xdp/autostart/xscreensaver.desktop


You need a larger red hardware button works independently of power 
saving and screen locking applications.




Re: need help killing screen blanker

2024-09-01 Thread Lee
On Sun, Sep 1, 2024 at 10:57 AM David Wright wrote:
>
> On Sun 01 Sep 2024 at 01:05:21 (-0400), gene heskett wrote:
> > On 8/31/24 22:58, David Wright wrote:
> > > And so should we assume Gene's report that he needs to actually login
> > > again after the screen locks itself is likely caused by confusing the
> > > unlocking screen with a login screen?

Sounds right.  The only difference between the login screen I get
after booting up the machine and the login screen I get after the
screensaver starts and I press a key is that the screensaver login
screen has my username already filled in.

Regards,
Lee



Re: need help killing screen blanker

2024-09-01 Thread David Wright
On Sun 01 Sep 2024 at 01:05:21 (-0400), gene heskett wrote:
> On 8/31/24 22:58, David Wright wrote:
> > And so should we assume Gene's report that he needs to actually login
> > again after the screen locks itself is likely caused by confusing the
> > unlocking screen with a login screen? Being DE-less, I haven't seen
> > either screen, and am unable to make a judgment, but several webpages
> > mentioned that confusion.
> 
> Picking nits David, the effect is exactly the same, plus 2-4 seconds
> to actually restore the screen to the linuxcnc control gui. Presumably
> the pi has to pull the gui back out of swap or cache, which is
> potentially dangerous which is reason enough to disable it forever. I
> have not gotten around to moving that stuff to a much faster SSD on a
> USB3 interface. Even a 128GB u-sd is slower by far.

AIUI there's a range of behaviours that the Power Manager controls,
things like blanking, standby, screensaver programs, monitor-off and
locking, amongst others.

What I haven't seen unambiguously mentioned is forced logoff, and
I can't see a reason why there necessarily would be, because I think
of forced logoff as something used when a resource is in contention;
like when there were 1000+ dumb teminals in a university connected
to a front-end that could handle, say, 250 simultaneous logins.

So if the behaviour you report /is/ actually locking, and not logoff,
you are saved the business of wondering whether there's still a
feature that your Power Manager settings haven't allowed you to
control and that you've got to find.

When I was driving a travelling stage around, underneath a laser and an
optical microscope, I didn't worry about screen blanking because in an
emergency, I could hit any active key before I'd even noticed whether
the screen was black or not. Understand, the monitor was fully powered
up, but the phosphor wasn't glowing. Under normal conditions, I'd
unblank the screen with Ctrl, as that didn't send any action to the
programs running: these programs were completely unaware that the
screen was blanked.

Of course, you should test whether the same is true for the Power
Manager settings you choose, and retest after any upgrades, but
I understand that never blanking anything may be your preference.

Cheers,
David.



Re: need help killing screen blanker

2024-08-31 Thread gene heskett

On 8/31/24 22:58, David Wright wrote:

On Sat 31 Aug 2024 at 18:01:59 (+1000), George at Clug wrote:

On Wednesday, 28-08-2024 at 11:31 Trish Fraser wrote:

On 8/26/24 13:27, Trish Fraser wrote:



S, what do I remove to absolutely, permanently disable the
screen blanker? And I mean no chance it can ever do that to me
again.


Seems like, in XFCE, you need to go into settings and disable the
screensaver.


If this helps anyone, my comment is:  I don't use screensavers
either, so as described above, in XFCE's Power Manager, Display tab, I
set 'Blank after' to 'Never', 'Put to sleep after' to 'Never', 'Switch
off after' to 'Never, and then I select the "Display power management"
slider to off.

In XFCE's Session and Startup, General tab, I unchecked "Lock screen
before sleep".

I cannot remember making any other changes that are relevant to screen
savers or power management.

I made these settings a year or so go, I have not had need to reapply
these settings (after updates or power off/on), and my screen does not
go blank while I am using my computer, my two monitors just continue
to show my linux screens.


And so should we assume Gene's report that he needs to actually login
again after the screen locks itself is likely caused by confusing the
unlocking screen with a login screen? Being DE-less, I haven't seen
either screen, and am unable to make a judgment, but several webpages
mentioned that confusion.


Picking nits David, the effect is exactly the same, plus 2-4 seconds to 
actually restore the screen to the linuxcnc control gui. Presumably the 
pi has to pull the gui back out of swap or cache, which is potentially 
dangerous which is reason enough to disable it forever. I have not 
gotten around to moving that stuff to a much faster SSD on a USB3 
interface. Even a 128GB u-sd is slower by far.


Thank you.


Cheers,
David.

.


Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: need help killing screen blanker

2024-08-31 Thread gene heskett

On 8/31/24 22:58, David Wright wrote:

On Sat 31 Aug 2024 at 18:01:59 (+1000), George at Clug wrote:

On Wednesday, 28-08-2024 at 11:31 Trish Fraser wrote:

On 8/26/24 13:27, Trish Fraser wrote:



S, what do I remove to absolutely, permanently disable the
screen blanker? And I mean no chance it can ever do that to me
again.


Seems like, in XFCE, you need to go into settings and disable the
screensaver.


If this helps anyone, my comment is:  I don't use screensavers
either, so as described above, in XFCE's Power Manager, Display tab, I
set 'Blank after' to 'Never', 'Put to sleep after' to 'Never', 'Switch
off after' to 'Never, and then I select the "Display power management"
slider to off.

In XFCE's Session and Startup, General tab, I unchecked "Lock screen
before sleep".

I cannot remember making any other changes that are relevant to screen
savers or power management.

I made these settings a year or so go, I have not had need to reapply
these settings (after updates or power off/on), and my screen does not
go blank while I am using my computer, my two monitors just continue
to show my linux screens.


And so should we assume Gene's report that he needs to actually login
again after the screen locks itself is likely caused by confusing the
unlocking screen with a login screen? Being DE-less, I haven't seen
either screen, and am unable to make a judgment, but several webpages
mentioned that confusion.

Cheers,
David.


Which is exactly the advice I needed.  Thank you!

.


Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: need help killing screen blanker

2024-08-31 Thread David Wright
On Sat 31 Aug 2024 at 18:01:59 (+1000), George at Clug wrote:
> On Wednesday, 28-08-2024 at 11:31 Trish Fraser wrote:
> > >On 8/26/24 13:27, Trish Fraser wrote:
> > >> 
> > >>> S, what do I remove to absolutely, permanently disable the
> > >>> screen blanker? And I mean no chance it can ever do that to me
> > >>> again.
> > >> 
> > >> Seems like, in XFCE, you need to go into settings and disable the
> > >> screensaver.
> 
> If this helps anyone, my comment is:  I don't use screensavers
> either, so as described above, in XFCE's Power Manager, Display tab, I
> set 'Blank after' to 'Never', 'Put to sleep after' to 'Never', 'Switch
> off after' to 'Never, and then I select the "Display power management"
> slider to off.
> 
> In XFCE's Session and Startup, General tab, I unchecked "Lock screen
> before sleep".
> 
> I cannot remember making any other changes that are relevant to screen
> savers or power management.
> 
> I made these settings a year or so go, I have not had need to reapply
> these settings (after updates or power off/on), and my screen does not
> go blank while I am using my computer, my two monitors just continue
> to show my linux screens.

And so should we assume Gene's report that he needs to actually login
again after the screen locks itself is likely caused by confusing the
unlocking screen with a login screen? Being DE-less, I haven't seen
either screen, and am unable to make a judgment, but several webpages
mentioned that confusion.

Cheers,
David.



Re: need help killing screen blanker

2024-08-31 Thread George at Clug



On Saturday, 31-08-2024 at 18:01 George at Clug wrote:
> On Wednesday, 28-08-2024 at 11:31 Trish Fraser wrote:
> > >On 8/26/24 13:27, Trish Fraser wrote:
> > >> 
> > >>> S, what do I remove to absolutely, permanently disable the
> > >>> screen blanker? And I mean no chance it can ever do that to me
> > >>> again.
> > >> 
> > >> Seems like, in XFCE, you need to go into settings and disable the
> > >> screensaver.
> 
> If this helps anyone, my comment is:  I don't use screensavers
> either, so as described above, in XFCE's Power Manager, Display tab, I
> set 'Blank after' to 'Never', 'Put to sleep after' to 'Never', 'Switch
> off after' to 'Never, and then I select the "Display power management"
> slider to off.
> 
> In XFCE's Session and Startup, General tab, I unchecked "Lock screen
> before sleep".
> 
> I cannot remember making any other changes that are relevant to screen
> savers or power management.
> 
> I made these settings a year or so go, I have not had need to reapply
> these settings (after updates or power off/on), and my screen does not
> go blank while I am using my computer, my two monitors just continue
> to show my linux screens.
> 
> 
> George.

I should have mentioned that I am using Debian 12 (Bookworm), so I do not know 
if Debian 10 performed the same or not. I would assume it would but as my year 
2 teach used say about "assuming"...

George.

 
> 
> 
> 
> 
> > >> 
> > >> Good luck!
> > >> 
> > >That I'm assuming is canceled by the next reboot. And I get killed
> by 
> > >linuxcnc starting up while I can't see it. So to make it permanent,
> 
> > >either uninstall the perpetrator, or put something into
> /etc/Xsessions 
> > >or its option file. The question is what do I do to make it
> permanent?
> > 
> > Disabling it in settings *is* permanent.
> > -- 
> > Trish Fraser, VVMZ4 91L2V -35.67910, 142.66607
> > Wed 28 Aug 2024 11:31:10 AEST
> > GNU/Linux 1997-2024 #283226 counter.li.org
> > andromeda up up 1 hour, 7 minutes
> > Debian GNU/Linux 12 (bookworm)
> > kernel 6.1.0-23-amd64
> > 
> >
> 



Re: need help killing screen blanker

2024-08-31 Thread George at Clug
On Wednesday, 28-08-2024 at 11:31 Trish Fraser wrote:
> >On 8/26/24 13:27, Trish Fraser wrote:
> >> 
> >>> S, what do I remove to absolutely, permanently disable the
> >>> screen blanker? And I mean no chance it can ever do that to me
> >>> again.
> >> 
> >> Seems like, in XFCE, you need to go into settings and disable the
> >> screensaver.

If this helps anyone, my comment is:  I don't use screensavers
either, so as described above, in XFCE's Power Manager, Display tab, I
set 'Blank after' to 'Never', 'Put to sleep after' to 'Never', 'Switch
off after' to 'Never, and then I select the "Display power management"
slider to off.

In XFCE's Session and Startup, General tab, I unchecked "Lock screen
before sleep".

I cannot remember making any other changes that are relevant to screen
savers or power management.

I made these settings a year or so go, I have not had need to reapply
these settings (after updates or power off/on), and my screen does not
go blank while I am using my computer, my two monitors just continue
to show my linux screens.


George.




> >> 
> >> Good luck!
> >> 
> >That I'm assuming is canceled by the next reboot. And I get killed
by 
> >linuxcnc starting up while I can't see it. So to make it permanent,

> >either uninstall the perpetrator, or put something into
/etc/Xsessions 
> >or its option file. The question is what do I do to make it
permanent?
> 
> Disabling it in settings *is* permanent.
> -- 
> Trish Fraser, VVMZ4 91L2V -35.67910, 142.66607
> Wed 28 Aug 2024 11:31:10 AEST
> GNU/Linux 1997-2024 #283226 counter.li.org
> andromeda up up 1 hour, 7 minutes
> Debian GNU/Linux 12 (bookworm)
> kernel 6.1.0-23-amd64
> 
>


Re: need help killing screen blanker

2024-08-30 Thread David Wright
On Wed 28 Aug 2024 at 11:13:16 (-0400), gene heskett wrote⁰:
> On 8/27/24 21:03, David Wright wrote:
> > On Mon 26 Aug 2024 at 15:42:56 (-0400), Felix Miata wrote:
> > > David Wright composed on 2024-08-26 14:36 (UTC-0400):
> > > 
> > > > ¹ touch Ctrl, the key at the extreme bottom left of the keyboard,
> > > >to defeat it.
> > > Are you sure?
> > 
> > Well, all four of the laptops in this house, the previous two we
> > disposed of, and all the assorted keybords I've acquired over the
> > last twenty years or so
> 
> My last lappy was disposed of 10 years ago. The touchpad interface was
> the least of its problems.
> 
> > But finding the safest key to use may be irrelevant if Gene doesn't
> > trust even basic screen blanking to occur (see above).
> > 
> Sorry but you don't understand the problem David. I could be killed
> while trying to log back into it, and the 30 seconds it takes to login
> again, when I could stop it with one keypress w/o that damned blanker.

It's very difficult to communicate with you about the various screen
behaviours when you only seem able to use the one term, "blanker".

Blanking the screen is something that linux has done as far back as
I can remember. It has absolutely no effect on your pressing one key,
because unlike with Windows, that keystroke, which unblanks the screen,
is not thrown away, but treated as normal, as if the screen hadn't
been blank at all.

But, as I wrote above, I don't think you will even tolerate the screen
blanking in that, or any other manner, so discussion of an aside about
keyboard layout is not something I thought anyone would raise, nor
that you would want to engage in.

So cut to the chase: you're interested in preventing screen /locking/
and/or forced logout. And yet you entirely ignored the greater part
of my post, which was on that topic.

> > On Tue 27 Aug 2024 at 14:58:14 (-0400), gene heskett wrote:
> > > On 8/26/24 14:37, David Wright wrote:
> > > > On Mon 26 Aug 2024 at 10:29:10 (-0400), gene heskett wrote:
> > > > > xfce4 desktop, running linuxcnc, [ … ]
> > > > > came across a dangerous situation yesterday.
> > > > > 
> > > > > Basically using the lathe as a jig to hold a long piece I was tapping
> > > > > by hand, powered up but stopped. screen blanker came on and locked me
> > > > > out till I logged back in leaving linuxcnc live but hidden behind a
> > > > > black screen.  This is a dangerous condition if he wrong key is hit to
> > > > > wake it up.
> > > > 
> > > > Surely it's not screen /blanking/ that's your problem¹ but screen
> > > > /locking/. BTW were you really logging back in, or just unlocking
> > > > the session?
> > > 
> > > total login to get back to my session.
> > 
> > How did you distinguish between the two cases?
> > 
> > > > > That monitor AND the idling rpi4b draw about 22 watts, and is turned
> > > > > off only for maintenance.  UPS, standby generator, uptimes might be
> > > > > years.
> > > > > 
> > > > > Replacing a CRT power hungry monitor means the only reason to blank a
> > > > > screen
> > > > 
> > > > tomas mentioned xset, which should deal with that. You need to decide
> > > > on whether a couple of seconds is too long to wait for recovery from
> > > > anything more than simple blanking.
> > > If the machine starts, while trying to wake it up and log back in to
> > > get control back to me, its already 5 seconds too damned late. With
> > > the pi, wakeup time is 5 + seconds by which time a sleeve caught on a
> > > chuck jaw has already tried to rip an arm off.
> > 
> > Agreed, but my paragraph was distinguishing between simple blanking
> > and powersaving. (Of course you don't want to be typing a password.)
> > 
> > In the past, I found the instant recovery from blanking (with no
> > powersaving) was quite satisfactory, while preventing burn-in from
> > being run 24/7. (This was in a lab with restricted access.)
> > 
> > > > > and interpose a login is security against prying eyes in an
> > > > > office environment.
> > > > 
> > > > That's the troublesome one for you.
> > > 
> > > Absolutely. This is not an office environment. The path thru this
> > > garage is hardly wide enough for me, let alone company.
> > 
> > There are plenty of google hits on this topic, some posted by people
> > who get fed up logging in over and over again in meetings. Various
> > OSes plus xfce.org itself. Have you made any progress yourself? I get
> > the impression

I left that sentence incomplete because I thought I'd see whether you
would have a response after reading some of the references given below.
But as there has been none, I'll finish it: I get the impression that
you might be enjoying the rant rather more than fixing the problem.

> > > > > S, what do I remove to absolutely, permanently disable the screen
> > > > > blanker? And I mean no chance it can ever do that to me again.

If there's someone here that runs the same desktop etc as you, has
exactly the same problem (and sees it /as/ a problem to fix), and ha

Re: need help killing screen blanker

2024-08-27 Thread Trish Fraser
>On 8/26/24 13:27, Trish Fraser wrote:
>> 
>>> S, what do I remove to absolutely, permanently disable the
>>> screen blanker? And I mean no chance it can ever do that to me
>>> again.
>> 
>> Seems like, in XFCE, you need to go into settings and disable the
>> screensaver.
>> 
>> Good luck!
>> 
>That I'm assuming is canceled by the next reboot. And I get killed by 
>linuxcnc starting up while I can't see it. So to make it permanent, 
>either uninstall the perpetrator, or put something into /etc/Xsessions 
>or its option file. The question is what do I do to make it permanent?

Disabling it in settings *is* permanent.
-- 
Trish Fraser, VVMZ4 91L2V -35.67910, 142.66607
Wed 28 Aug 2024 11:31:10 AEST
GNU/Linux 1997-2024 #283226 counter.li.org
andromeda up up 1 hour, 7 minutes
Debian GNU/Linux 12 (bookworm)
kernel 6.1.0-23-amd64



Re: need help killing screen blanker

2024-08-27 Thread David Wright
On Tue 27 Aug 2024 at 14:58:14 (-0400), gene heskett wrote:
> On 8/26/24 14:37, David Wright wrote:
> > On Mon 26 Aug 2024 at 10:29:10 (-0400), gene heskett wrote:
> > > xfce4 desktop, running linuxcnc, [ … ]
> > > came across a dangerous situation yesterday.
> > > 
> > > Basically using the lathe as a jig to hold a long piece I was tapping
> > > by hand, powered up but stopped. screen blanker came on and locked me
> > > out till I logged back in leaving linuxcnc live but hidden behind a
> > > black screen.  This is a dangerous condition if he wrong key is hit to
> > > wake it up.
> > 
> > Surely it's not screen /blanking/ that's your problem¹ but screen
> > /locking/. BTW were you really logging back in, or just unlocking
> > the session?
> 
> total login to get back to my session.

How did you distinguish between the two cases?

> > > That monitor AND the idling rpi4b draw about 22 watts, and is turned
> > > off only for maintenance.  UPS, standby generator, uptimes might be
> > > years.
> > > 
> > > Replacing a CRT power hungry monitor means the only reason to blank a
> > > screen
> > 
> > tomas mentioned xset, which should deal with that. You need to decide
> > on whether a couple of seconds is too long to wait for recovery from
> > anything more than simple blanking.
> If the machine starts, while trying to wake it up and log back in to
> get control back to me, its already 5 seconds too damned late. With
> the pi, wakeup time is 5 + seconds by which time a sleeve caught on a
> chuck jaw has already tried to rip an arm off.

Agreed, but my paragraph was distinguishing between simple blanking
and powersaving. (Of course you don't want to be typing a password.)

In the past, I found the instant recovery from blanking (with no
powersaving) was quite satisfactory, while preventing burn-in from
being run 24/7. (This was in a lab with restricted access.)

> > > and interpose a login is security against prying eyes in an
> > > office environment.
> > 
> > That's the troublesome one for you.
> 
> Absolutely. This is not an office environment. The path thru this
> garage is hardly wide enough for me, let alone company.

There are plenty of google hits on this topic, some posted by people
who get fed up logging in over and over again in meetings. Various
OSes plus xfce.org itself. Have you made any progress yourself? I get
the impression 

> > > S, what do I remove to absolutely, permanently disable the screen
> > > blanker? And I mean no chance it can ever do that to me again.

There are odd reports of a very long timeout working better than Off.
Perhaps bear that in mind.

> > AFAICT you need to investigate XFCE's Power Manager. A quick google
> > turned up these:
> >https://forum.manjaro.org/t/how-to-disable-auto-black-screen/127827/2
> >https://forum.xfce.org/viewtopic.php?id=13535
> >https://forum.manjaro.org/t/lock-screen-vs-login-screen/166644
> > but there may be better ones too.

On Mon 26 Aug 2024 at 15:42:56 (-0400), Felix Miata wrote:
> David Wright composed on 2024-08-26 14:36 (UTC-0400):
> 
> > ¹ touch Ctrl, the key at the extreme bottom left of the keyboard,
> >   to defeat it.
>  
> Are you sure? 

Well, all four of the laptops in this house, the previous two we
disposed of, and all the assorted keybords I've acquired over the
last twenty years or so.

But finding the safest key to use may be irrelevant if Gene doesn't
trust even basic screen blanking to occur (see above).

Cheers,
David.



Re: need help killing screen blanker

2024-08-27 Thread Andrew M.A. Cater
On Tue, Aug 27, 2024 at 02:44:52PM -0400, gene heskett wrote:
> On 8/26/24 14:25, Andrew M.A. Cater wrote:
> > On Mon, Aug 26, 2024 at 10:29:10AM -0400, gene heskett wrote:
> > 
> > Gene,
> > 
> > First things first: where did the image come from?
> > 32 or 64 bit? Exact version string from uname -a please
> > 
> 64 bit arm64 debian bookworm, modified with a later rt kernal to run
> linuxcnc, built for me by an aussie named Rod Webster,, RT kernels are not a
> problem. This one has more latency that one I built about a decade back but
> good enough to run lcnc in real time with no stuttering. 200microsecs, mine
> is much faster at 12. Its a 4.19 I actually built on the pi, armhf flavor.
> 

That still doesn't say where the original software came from - whether yours
is based on Raspberry Pi OS or on straightforward Debian. That can make a
difference.

> In case its not obvious, linuxcnc generally runs in its own little world.
> Your code base moves several times faster than ours. I built this machine a
> decade ago just to see if a pi3b could do it. It could but stumbled a bit,
> with a pi4b, its kool at twice the speed.  Stepper driven, its also a
> showcase for the newest motor tech, stepper/servo's. Several more times more
> accurate than normal steppers. And the motors run much cooler.  You see that
> in your power bill.
> 

Now that there is a Debian maintainer maintaining linuxcnc in stable -
_maybe_ just use that and save patching?

> > 
> > rt-preempt kernel - so home built?
> By Rod.
> > linuxcnc - your install or the Debian-provided package?

See above. The more you patch / move away from Debian, the less anyone
here is able to help directly. 

> debian's lcnc-2.9 with some later patches. I'm used to running 3.0/master on
> this machine as I've played the canary in the coal mine for that last 2
> decades. Finding problems hopefully before they bite a shop producing a
> profit. But my next bday will be my 90th so I'm scaling back.  We are 100%
> volunteer, doing this either because we are retired and have the time(me &
> several others), or are involved because of the $dayjob.
> 
> > 
> > You have a real time kernel to reduce latency but also put a desktop on 
> > there?
> > You have two incompatible use cases and there has to be some compromise.
> Sure, if the puter has the hp, why not
> .

Because the requirements of a desktop / GUI may *not* be compatible with
instant response and RT kernel. Two different functions, use cases, biases
in how they run. And the Pi4b, even though it is fairly capable, is not scaled
for ultimate performance. You are complaining about a desktop feature here.

> > 
> > How - and from where did you install XFCE?
> I used the package manager, usually synaptic, I assume Rod used a similar
> procedure. It worked, I didn't ask.

So _you_ didn't install it, it was already installed?
> > 
> > > S, what do I remove to absolutely, permanently disable the screen
> > > blanker? And I mean no chance it can ever do that to me again.
> > > 
> > 
> > "How to disable screen blanking in XFCE" into a search engine yields
> > https://forum.xfce.org/viewtopic.php?id=8303
> > 
> > Last comment is
> > 
> > "Go to application menu, then hover over settings. One of the options 
> > should Power Manager. In there click on display. Turn off Display Power 
> > Management.
> > 
> > Do Not Go Through All Settings"

Did you try this? You never quite seem to know what software you are running,
whether you're running on X or on Wayland. That's one of the reasons we ask
questions to _try_ and establish what's going on.

Andy

> > > Thanks.
> > > 
> > > Cheers, Gene Heskett, CET.
> > 
> > Hope this helps - all best, as ever,
> 
> Thanks Andy.
> 
> > Andy Cater
> > (amaca...@debian.org)
> > > -- 
> > > "There are four boxes to be used in defense of liberty:
> > >   soap, ballot, jury, and ammo. Please use in that order."
> > > -Ed Howdershelt (Author, 1940)
> > > If we desire respect for the law, we must first make the law respectable.
> > >   - Louis D. Brandeis
> > > 
> > 
> > .
> 
> Cheers, Gene Heskett, CET.
> -- 
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> 



Re: need help killing screen blanker

2024-08-27 Thread gene heskett

On 8/26/24 14:37, David Wright wrote:

On Mon 26 Aug 2024 at 10:29:10 (-0400), gene heskett wrote:

xfce4 desktop, running linuxcnc, [ … ]
came across a dangerous situation yesterday.

Basically using the lathe as a jig to hold a long piece I was tapping
by hand, powered up but stopped. screen blanker came on and locked me
out till I logged back in leaving linuxcnc live but hidden behind a
black screen.  This is a dangerous condition if he wrong key is hit to
wake it up.


Surely it's not screen /blanking/ that's your problem¹ but screen
/locking/. BTW were you really logging back in, or just unlocking
the session?


total login to get back to my session.


That monitor AND the idling rpi4b draw about 22 watts, and is turned
off only for maintenance.  UPS, standby generator, uptimes might be
years.

Replacing a CRT power hungry monitor means the only reason to blank a
screen


tomas mentioned xset, which should deal with that. You need to decide
on whether a couple of seconds is too long to wait for recovery from
anything more than simple blanking.
If the machine starts, while trying to wake it up and log back in to get 
control back to me, its already 5 seconds too damned late. With the pi, 
wakeup time is 5 + seconds by which time a sleeve caught on a chuck jaw 
has already tried to rip an arm off.



and interpose a login is security against prying eyes in an
office environment.


That's the troublesome one for you.


Absolutely. This is not an office environment. The path thru this garage 
is hardly wide enough for me, let alone company.





S, what do I remove to absolutely, permanently disable the screen
blanker? And I mean no chance it can ever do that to me again.


AFAICT you need to investigate XFCE's Power Manager. A quick google
turned up these:
   https://forum.manjaro.org/t/how-to-disable-auto-black-screen/127827/2
   https://forum.xfce.org/viewtopic.php?id=13535
   https://forum.manjaro.org/t/lock-screen-vs-login-screen/166644
but there may be better ones too.

¹ touch Ctrl, the key at the extreme bottom left of the keyboard,
   to defeat it.

Cheers,
David.


Thank you David.

.


Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: need help killing screen blanker

2024-08-27 Thread gene heskett

On 8/26/24 14:25, Andrew M.A. Cater wrote:

On Mon, Aug 26, 2024 at 10:29:10AM -0400, gene heskett wrote:

rpib runniing bookworm. Private net. rt-preempt kernel. Security is a closed
garage door and lead projectiles for unwanted guests.



Gene,

First things first: where did the image come from?
Is it originally from Raspberry Pi OS?
If not, is it from raspi.debian.net and originally built from *Debian* sources?
32 or 64 bit? Exact version string from uname -a please

64 bit arm64 debian bookworm, modified with a later rt kernal to run 
linuxcnc, built for me by an aussie named Rod Webster,, RT kernels are 
not a problem. This one has more latency that one I built about a decade 
back but good enough to run lcnc in real time with no stuttering. 
200microsecs, mine is much faster at 12. Its a 4.19 I actually built on 
the pi, armhf flavor.


In case its not obvious, linuxcnc generally runs in its own little 
world. Your code base moves several times faster than ours. I built this 
machine a decade ago just to see if a pi3b could do it. It could but 
stumbled a bit, with a pi4b, its kool at twice the speed.  Stepper 
driven, its also a showcase for the newest motor tech, stepper/servo's. 
Several more times more accurate than normal steppers. And the motors 
run much cooler.  You see that in your power bill.



xfce4 desktop, running linuxcnc, which controls all 255 volt power to an
11x56" lathe with several horsepower at its disposal. New install, came
across a dangerous situation yesterday.



rt-preempt kernel - so home built?

By Rod.

linuxcnc - your install or the Debian-provided package?
debian's lcnc-2.9 with some later patches. I'm used to running 
3.0/master on this machine as I've played the canary in the coal mine 
for that last 2 decades. Finding problems hopefully before they bite a 
shop producing a profit. But my next bday will be my 90th so I'm scaling 
back.  We are 100% volunteer, doing this either because we are retired 
and have the time(me & several others), or are involved because of the 
$dayjob.



Basically using the lathe as a jig to hold a long piece I was tapping by
hand, powered up but stopped. screen blanker came on and locked me out till
I logged back in leaving linuxcnc live but hidden behind a black screen.
This is a dangerous condition if he wrong key is hit to wake it up.



You have a real time kernel to reduce latency but also put a desktop on there?
You have two incompatible use cases and there has to be some compromise.

Sure, if the puter has the hp, why not
.
I have 4 cnc machines, and soon 3 3d-printers. With bananapi's running 
the printers by way of klipper and friends, why not, the horsepower is 
there, use it.



That monitor AND the idling rpi4b draw about 22 watts, and is turned off
only for maintenance.  UPS, standby generator, uptimes might be years.



How - and from where did you install XFCE?
I used the package manager, usually synaptic, I assume Rod used a 
similar procedure. It worked, I didn't ask.



Replacing a CRT power hungry monitor means the only reason to blank a screen
and interpose a login is security against prying eyes in an office
environment.



XFCE settings should do it - _your_ requirement for screen blanking is not
everyone's requirement for screen blanking / security. People's needs vary
- most of the desktop environments incorporate some element of screen blanking
for security (or power saving).


S, what do I remove to absolutely, permanently disable the screen
blanker? And I mean no chance it can ever do that to me again.



"How to disable screen blanking in XFCE" into a search engine yields
https://forum.xfce.org/viewtopic.php?id=8303

Last comment is

"Go to application menu, then hover over settings. One of the options should 
Power Manager. In there click on display. Turn off Display Power Management.

Do Not Go Through All Settings"

Thanks.

Cheers, Gene Heskett, CET.


Hope this helps - all best, as ever,


Thanks Andy.


Andy Cater
(amaca...@debian.org)

--
"There are four boxes to be used in defense of liberty:
  soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
  - Louis D. Brandeis



.


Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: need help killing screen blanker

2024-08-27 Thread tomas
On Tue, Aug 27, 2024 at 01:56:43PM -0400, Felix Miata wrote:
> gene heskett composed on 2024-08-27 10:14 (UTC-0400):
> 
> > tomas@ wrote:
> 
> >> Assuming, again, you are under X11, there is "xset s off", which would
> >> disable the screensaver *and* the DPMS blanking. See the xset man page
> >> for all the gory details. This [1] is a good overview for all the
> >> other things you might want to try.
> 
> > That apparently turned it off for this boot.  Where do I do it in the 
> > boot so It is always turned off?
> 
> Create a new file whose name begins with two digits in /etc/X11/Xsession.d/. 
> Put
> it in your new file. The digits you choose determine in what order among the 
> other
> files there it will be applied. I would try 45, but it may not even matter.

Thanks.

As a little reminder: those are shell script *snippets*. They are sourced by
the X session, i.e. the shell script which ultimately starts X.

This way you can e.g. export environment which is "seen" by all of your X
descendants (e.g. that shell started in your X terminal).

Don't do nasties in there: don't exit, don't block, don't exec. That will
prevent your X from starting.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: need help killing screen blanker

2024-08-27 Thread Felix Miata
gene heskett composed on 2024-08-27 10:14 (UTC-0400):

> tomas@ wrote:

>> Assuming, again, you are under X11, there is "xset s off", which would
>> disable the screensaver *and* the DPMS blanking. See the xset man page
>> for all the gory details. This [1] is a good overview for all the
>> other things you might want to try.

> That apparently turned it off for this boot.  Where do I do it in the 
> boot so It is always turned off?

Create a new file whose name begins with two digits in /etc/X11/Xsession.d/. Put
it in your new file. The digits you choose determine in what order among the 
other
files there it will be applied. I would try 45, but it may not even matter.
-- 
Evolution as taught in public schools is, like religion,
based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata



Re: need help killing screen blanker

2024-08-27 Thread gene heskett

On 8/26/24 14:09, fxkl4...@protonmail.com wrote:

On Mon, 26 Aug 2024, gene heskett wrote:


rpib runniing bookworm. Private net. rt-preempt kernel. Security is a
closed garage door and lead projectiles for unwanted guests.

xfce4 desktop, running linuxcnc, which controls all 255 volt power to an
11x56" lathe with several horsepower at its disposal. New install, came
across a dangerous situation yesterday.

Basically using the lathe as a jig to hold a long piece I was tapping by
hand, powered up but stopped. screen blanker came on and locked me out
till I logged back in leaving linuxcnc live but hidden behind a black
screen.  This is a dangerous condition if he wrong key is hit to wake it up.

That monitor AND the idling rpi4b draw about 22 watts, and is turned off
only for maintenance.  UPS, standby generator, uptimes might be years.

Replacing a CRT power hungry monitor means the only reason to blank a
screen and interpose a login is security against prying eyes in an
office environment.

S, what do I remove to absolutely, permanently disable the screen
blanker? And I mean no chance it can ever do that to me again.



the debian folks do a pretty good job of packaging for most folks
you can disable and uninstall till the cows come home
the next update and it's right back
sometimes you need to treat the system like a child and enforce the rules

ls -l /usr/bin/xscreensaver


no such file here... Debian, back to playing 52 pickup again.
But locate to the rescue:
/etc/xdg/autostart/xscreensaver.desktop
so sudo chmod 644 /etc/xdp/autostart/xscreensaver.desktop
sudo chattr +i /etc/xdp/autostart/xsreensaver.desktop
looks like it ought to work.


i do
chmod 644 /usr/bin/xscreensaver
chattr +i /usr/bin/xscreensaver

this usually works
then add this to a file i keep of things i modify


Thank you.

Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: need help killing screen blanker

2024-08-27 Thread gene heskett

On 8/26/24 13:27, Trish Fraser wrote:



S, what do I remove to absolutely, permanently disable the screen
blanker? And I mean no chance it can ever do that to me again.


Seems like, in XFCE, you need to go into settings and disable the
screensaver.

Good luck!

That I'm assuming is canceled by the next reboot. And I get killed by 
linuxcnc starting up while I can't see it. So to make it permanent, 
either uninstall the perpetrator, or put something into /etc/Xsessions 
or its option file. The question is what do I do to make it permanent?


Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: need help killing screen blanker

2024-08-27 Thread gene heskett

On 8/26/24 12:46, to...@tuxteam.de wrote:

On Mon, Aug 26, 2024 at 10:29:10AM -0400, gene heskett wrote:

rpib runniing bookworm. Private net. rt-preempt kernel. Security is a closed
garage door and lead projectiles for unwanted guests.


[...]

You have provided lots of details which don't help us help you. But,
alas, you left out the interesting tidbits :-)


S, what do I remove to absolutely, permanently disable the screen
blanker? And I mean no chance it can ever do that to me again.


There are many incarnations of screen blankers, so there are different
incantations. Possibly, the one you are after is DPMS, where the monitor
is signalled (via the VESA DPMS mechanism) to shut off.

Assuming, again, you are under X11, there is "xset s off", which would
disable the screensaver *and* the DPMS blanking. See the xset man page
for all the gory details. This [1] is a good overview for all the
other things you might want to try.

Playing like one of the 10,000 monkeys assigned to redo W.Shakespear, I 
seem to have found that "xset s expose", which according to xset q turns 
dpms back on, so follow that with a "xset -dpms" seems to have 
accomplished it for this boot. 3 hours later I see its it still active 
from the back door, precisely what I want. noblank.


Now, since Xsessions has been move to /etc, I assume it works for all 
uses. but there is only one, the "cnc" operator using my pw.


So, what do I edit into /etc/Xsessions (or Xsession.options) to 
duplicate this for subsequent boots?


tnx all

Most desktop environments have a set of buttons and dials to achieve
the same. That said, I don't "do" DEs, so I might be lying here.

For Wayland, you'd have to ask someone smarter than me.

Hope this gives you some leads to follow.

Cheers
[1] 
https://askubuntu.com/questions/67355/how-do-i-completely-turn-off-screensaver-and-power-management



Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: need help killing screen blanker

2024-08-27 Thread tomas
On Tue, Aug 27, 2024 at 10:14:59AM -0400, gene heskett wrote:
> On 8/26/24 12:46, to...@tuxteam.de wrote:

[...]

> > Assuming, again, you are under X11, there is "xset s off" [...]

> That apparently turned it off for this boot.

Good news!

[...]

> so It is always turned off? I think its runnin x, not wayland.

OK.

[...]

> AArch64 debian, what do I remove to totally disable the screen blanker? I
> don't even want it installed. in other words, noblank for the next 20
> years Apparently it is running wayland, and I can't run sudo synapticc.

Now -- which one, then? And what does that have to do with synaptic?

You keep dragging in total strangers into the discussion, this is
very confusing.

If it is X you are running under, a small shell snippet in /etc/X11/Xsession.d
might be what you are looking for ("xset" only runs under X, that is X has to
be running and the command has to have access to the server in question via
the DISPLAY variable).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: need help killing screen blanker

2024-08-27 Thread gene heskett

On 8/26/24 12:46, to...@tuxteam.de wrote:

On Mon, Aug 26, 2024 at 10:29:10AM -0400, gene heskett wrote:

rpib runniing bookworm. Private net. rt-preempt kernel. Security is a closed
garage door and lead projectiles for unwanted guests.


[...]

You have provided lots of details which don't help us help you. But,
alas, you left out the interesting tidbits :-)


S, what do I remove to absolutely, permanently disable the screen
blanker? And I mean no chance it can ever do that to me again.


There are many incarnations of screen blankers, so there are different
incantations. Possibly, the one you are after is DPMS, where the monitor
is signalled (via the VESA DPMS mechanism) to shut off.

Assuming, again, you are under X11, there is "xset s off", which would
disable the screensaver *and* the DPMS blanking. See the xset man page
for all the gory details. This [1] is a good overview for all the
other things you might want to try.


That apparently turned it off for this boot.  Where do I do it in the 
boot so It is always turned off? I think its runnin x, not wayland. or 
is it, I just checked, its blanked again.  I issued xset s noblank, xset 
q says dpms is enabled. So I disabled it again.


AArch64 debian, what do I remove to totally disable the screen blanker? 
I don't even want it installed. in other words, noblank for the next 20 
years Apparently it is running wayland, and I can't run sudo synapticc.


Lets start by fixing that?


Most desktop environments have a set of buttons and dials to achieve
the same. That said, I don't "do" DEs, so I might be lying here.

For Wayland, you'd have to ask someone smarter than me.

Hope this gives you some leads to follow.

Cheers
[1] 
https://askubuntu.com/questions/67355/how-do-i-completely-turn-off-screensaver-and-power-management



Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: need help killing screen blanker

2024-08-26 Thread Max Nikulin

On 27/08/2024 01:46, Thomas Schmitt wrote:

In these modern times, home office slave workers need ways to simulate
relentless activity. Google "mouse jiggler", "auto clicker".
There are mechanical mouse platforms, pseudo-mouse USB devices, and even
software emulated mice.


This case it would be enough to the mouse on the lathe. Its vibration 
should be enough.


I hope, xfce uses standard interfaces.

busctl --user introspect org.freedesktop.ScreenSaver \
  /org/freedesktop/ScreenSaver

org.freedesktop.ScreenSaver interface - --
.Inhibitmethodssu-
.SimulateUserActivity   method- --

Inhibit is active only while a process invoked it is alive, but there 
are off the shelf tools.


light-locker-command --inhibit \
--application-name "inhibit-dialog" --reason "User action" \
-- env WINDOWID= \
zenity --warning --title "Screen lock inhibited" \
--text "Activation of screen lock is suppressed"

As to monitor settings, perhaps they may be changed from its menu. If 
your are lucky then they are exposed to DDC control tools.




Re: need help killing screen blanker

2024-08-26 Thread Stefan Monnier
> - most of the desktop environments incorporate some element of screen
>   blanking for security (or power saving).

There's also "burn in" for some monitor technologies.


Stefan



Re: need help killing screen blanker

2024-08-26 Thread Felix Miata
David Wright composed on 2024-08-26 14:36 (UTC-0400):

> ¹ touch Ctrl, the key at the extreme bottom left of the keyboard,
>   to defeat it.
 
Are you sure? 
https://commons.wikimedia.org/wiki/File:Apple_keyboard_-.jpg
https://commons.wikimedia.org/wiki/File:AT_keyboard_original_layout.png
https://commons.wikimedia.org/wiki/File:ErgoLogicFlexProKB2652.jpg
https://commons.wikimedia.org/wiki/File:Happy_Hacking_Keyboard_Lite_2.jpg
https://commons.wikimedia.org/wiki/File:IBM_AS400_Keyboard.jpg
https://commons.wikimedia.org/wiki/File:IBM_Model_F_XT_German_keyboard.jpg
https://commons.wikimedia.org/wiki/File:Keyboard._German_layout,_Lenovo_ThinkPad-0832.jpg
https://commons.wikimedia.org/wiki/File:Logitech_MK240_CJK_Keyboard_4.jpg
https://commons.wikimedia.org/wiki/File:MacBook_Air_keyboard_1.jpg
https://commons.wikimedia.org/wiki/File:Omnikey102p3248.jpg
https://commons.wikimedia.org/wiki/File:ThinkPad_T430_%28keyboard%29.jpg
https://commons.wikimedia.org/wiki/File:Videoton_TV_Computer_%281984%29_keyboard_layout.png

More on
https://commons.wikimedia.org/w/index.php?search=keyboard&title=Special:MediaSearch&go=Go&type=image

Gene has a lot of stuff the rest of us don't. :D
-- 
Evolution as taught in public schools is, like religion,
based on faith, not based on science.

 Team OS/2 ** Reg. Linux User #211409 ** a11y rocks!

Felix Miata



Re: need help killing screen blanker

2024-08-26 Thread mick.crane

On 2024-08-26 15:29, gene heskett wrote:


S, what do I remove to absolutely, permanently disable the screen
blanker? And I mean no chance it can ever do that to me again.


In Settings>Power Manager I selected "do nothing" or "never" for all the 
options.

If want to blank the monitor I use the monitor's button.
mick



Re: need help killing screen blanker

2024-08-26 Thread Thomas Schmitt
Hi,

gene heskett wrote:
> xfce4 desktop,
> screen blanker came on and locked me out till I logged back in

If everything else fails:

In these modern times, home office slave workers need ways to simulate
relentless activity. Google "mouse jiggler", "auto clicker".
There are mechanical mouse platforms, pseudo-mouse USB devices, and even
software emulated mice.
(I guess you have the parts loitering on the shelf which you would need
for a mechanical mouse mover. :))

There are also keyboard clips, advertised for Microsoft Teams.
You would have to test whether XFCE locks the screen while the CapsLock
or the Shift key is pressed.


Of course you should first try to disable the screen locking. Especially
the one which asks for login.
But in these modern times ...


Have a nice day :)

Thomas



Re: need help killing screen blanker

2024-08-26 Thread David Wright
On Mon 26 Aug 2024 at 10:29:10 (-0400), gene heskett wrote:
> xfce4 desktop, running linuxcnc, [ … ]
> came across a dangerous situation yesterday.
> 
> Basically using the lathe as a jig to hold a long piece I was tapping
> by hand, powered up but stopped. screen blanker came on and locked me
> out till I logged back in leaving linuxcnc live but hidden behind a
> black screen.  This is a dangerous condition if he wrong key is hit to
> wake it up.

Surely it's not screen /blanking/ that's your problem¹ but screen
/locking/. BTW were you really logging back in, or just unlocking
the session?

> That monitor AND the idling rpi4b draw about 22 watts, and is turned
> off only for maintenance.  UPS, standby generator, uptimes might be
> years.
> 
> Replacing a CRT power hungry monitor means the only reason to blank a
> screen

tomas mentioned xset, which should deal with that. You need to decide
on whether a couple of seconds is too long to wait for recovery from
anything more than simple blanking.

> and interpose a login is security against prying eyes in an
> office environment.

That's the troublesome one for you.

> S, what do I remove to absolutely, permanently disable the screen
> blanker? And I mean no chance it can ever do that to me again.

AFAICT you need to investigate XFCE's Power Manager. A quick google
turned up these:
  https://forum.manjaro.org/t/how-to-disable-auto-black-screen/127827/2
  https://forum.xfce.org/viewtopic.php?id=13535
  https://forum.manjaro.org/t/lock-screen-vs-login-screen/166644
but there may be better ones too.

¹ touch Ctrl, the key at the extreme bottom left of the keyboard,
  to defeat it.

Cheers,
David.



Re: need help killing screen blanker

2024-08-26 Thread Andrew M.A. Cater
On Mon, Aug 26, 2024 at 10:29:10AM -0400, gene heskett wrote:
> rpib runniing bookworm. Private net. rt-preempt kernel. Security is a closed
> garage door and lead projectiles for unwanted guests.
> 

Gene,

First things first: where did the image come from? 
Is it originally from Raspberry Pi OS?
If not, is it from raspi.debian.net and originally built from *Debian* sources?
32 or 64 bit? Exact version string from uname -a please

> xfce4 desktop, running linuxcnc, which controls all 255 volt power to an
> 11x56" lathe with several horsepower at its disposal. New install, came
> across a dangerous situation yesterday.
> 

rt-preempt kernel - so home built?
linuxcnc - your install or the Debian-provided package?

> Basically using the lathe as a jig to hold a long piece I was tapping by
> hand, powered up but stopped. screen blanker came on and locked me out till
> I logged back in leaving linuxcnc live but hidden behind a black screen.
> This is a dangerous condition if he wrong key is hit to wake it up.
> 

You have a real time kernel to reduce latency but also put a desktop on there?
You have two incompatible use cases and there has to be some compromise.

> That monitor AND the idling rpi4b draw about 22 watts, and is turned off
> only for maintenance.  UPS, standby generator, uptimes might be years.
> 

How - and from where did you install XFCE? 

> Replacing a CRT power hungry monitor means the only reason to blank a screen
> and interpose a login is security against prying eyes in an office
> environment.
> 

XFCE settings should do it - _your_ requirement for screen blanking is not
everyone's requirement for screen blanking / security. People's needs vary
- most of the desktop environments incorporate some element of screen blanking
for security (or power saving).

> S, what do I remove to absolutely, permanently disable the screen
> blanker? And I mean no chance it can ever do that to me again.
> 

"How to disable screen blanking in XFCE" into a search engine yields
https://forum.xfce.org/viewtopic.php?id=8303

Last comment is

"Go to application menu, then hover over settings. One of the options should 
Power Manager. In there click on display. Turn off Display Power Management.

Do Not Go Through All Settings"
> Thanks.
> 
> Cheers, Gene Heskett, CET.

Hope this helps - all best, as ever,

Andy Cater
(amaca...@debian.org)
> -- 
> "There are four boxes to be used in defense of liberty:
>  soap, ballot, jury, and ammo. Please use in that order."
> -Ed Howdershelt (Author, 1940)
> If we desire respect for the law, we must first make the law respectable.
>  - Louis D. Brandeis
> 



Re: need help killing screen blanker

2024-08-26 Thread fxkl47BF
On Mon, 26 Aug 2024, gene heskett wrote:

> rpib runniing bookworm. Private net. rt-preempt kernel. Security is a
> closed garage door and lead projectiles for unwanted guests.
>
> xfce4 desktop, running linuxcnc, which controls all 255 volt power to an
> 11x56" lathe with several horsepower at its disposal. New install, came
> across a dangerous situation yesterday.
>
> Basically using the lathe as a jig to hold a long piece I was tapping by
> hand, powered up but stopped. screen blanker came on and locked me out
> till I logged back in leaving linuxcnc live but hidden behind a black
> screen.  This is a dangerous condition if he wrong key is hit to wake it up.
>
> That monitor AND the idling rpi4b draw about 22 watts, and is turned off
> only for maintenance.  UPS, standby generator, uptimes might be years.
>
> Replacing a CRT power hungry monitor means the only reason to blank a
> screen and interpose a login is security against prying eyes in an
> office environment.
>
> S, what do I remove to absolutely, permanently disable the screen
> blanker? And I mean no chance it can ever do that to me again.


the debian folks do a pretty good job of packaging for most folks
you can disable and uninstall till the cows come home
the next update and it's right back
sometimes you need to treat the system like a child and enforce the rules

ls -l /usr/bin/xscreensaver
-rwxr-xr-x 1 root root 51536 Mar  3  2023 /usr/bin/xscreensaver

i do
chmod 644 /usr/bin/xscreensaver
chattr +i /usr/bin/xscreensaver

this usually works
then add this to a file i keep of things i modify



Re: need help killing screen blanker

2024-08-26 Thread Stefan Monnier
> S, what do I remove to absolutely, permanently disable the screen
> blanker?  And I mean no chance it can ever do that to me again.

IME, this is a bit of an uphill battle, sadly.
Basically, lots of tools can request/cause some kind of "screen
blanking" so you can never be sure you've disabled all of them.

Assuming you have a very vanilla installation, I'd look at
the XFCE power manager settings where you can turn off the "display
power management".

Another option might be to set the "presentation mode" when the lathe is
in use.  You can do that manually by right-clicking on the power icon in
the tray (assuming you have enabled "System tray icon" in the XFCE power
manager settings) but that can be done programatically as well (I hope
someone here can tell us how).


Stefan




Re: need help killing screen blanker

2024-08-26 Thread tomas
On Mon, Aug 26, 2024 at 10:29:10AM -0400, gene heskett wrote:
> rpib runniing bookworm. Private net. rt-preempt kernel. Security is a closed
> garage door and lead projectiles for unwanted guests.

[...]

You have provided lots of details which don't help us help you. But,
alas, you left out the interesting tidbits :-)

> S, what do I remove to absolutely, permanently disable the screen
> blanker? And I mean no chance it can ever do that to me again.

There are many incarnations of screen blankers, so there are different
incantations. Possibly, the one you are after is DPMS, where the monitor
is signalled (via the VESA DPMS mechanism) to shut off.

Assuming, again, you are under X11, there is "xset s off", which would
disable the screensaver *and* the DPMS blanking. See the xset man page
for all the gory details. This [1] is a good overview for all the
other things you might want to try.

Most desktop environments have a set of buttons and dials to achieve
the same. That said, I don't "do" DEs, so I might be lying here.

For Wayland, you'd have to ask someone smarter than me.

Hope this gives you some leads to follow.

Cheers
[1] 
https://askubuntu.com/questions/67355/how-do-i-completely-turn-off-screensaver-and-power-management

-- 
tomás


signature.asc
Description: PGP signature


need help killing screen blanker

2024-08-26 Thread gene heskett
rpib runniing bookworm. Private net. rt-preempt kernel. Security is a 
closed garage door and lead projectiles for unwanted guests.


xfce4 desktop, running linuxcnc, which controls all 255 volt power to an 
11x56" lathe with several horsepower at its disposal. New install, came 
across a dangerous situation yesterday.


Basically using the lathe as a jig to hold a long piece I was tapping by 
hand, powered up but stopped. screen blanker came on and locked me out 
till I logged back in leaving linuxcnc live but hidden behind a black 
screen.  This is a dangerous condition if he wrong key is hit to wake it up.


That monitor AND the idling rpi4b draw about 22 watts, and is turned off 
only for maintenance.  UPS, standby generator, uptimes might be years.


Replacing a CRT power hungry monitor means the only reason to blank a 
screen and interpose a login is security against prying eyes in an 
office environment.


S, what do I remove to absolutely, permanently disable the screen 
blanker? And I mean no chance it can ever do that to me again.


Thanks.

Cheers, Gene Heskett, CET.
--
"There are four boxes to be used in defense of liberty:
 soap, ballot, jury, and ammo. Please use in that order."
-Ed Howdershelt (Author, 1940)
If we desire respect for the law, we must first make the law respectable.
 - Louis D. Brandeis



Re: Finding a Debian consultancy for help with large-scale platform upgrade (Was Re: Systems upgrading)

2024-08-20 Thread Dan Ritter
Andy Smith wrote: 
> Just as some free advice though…
> 
> 1. I find it hard to believe you have more than 2000 Debian installs
>without some sort of existing automation / configuration
>management
> 
> 2. Given (1), I would approach the task by learning your config
>management and modifying it to deploy a Debian 12 version of each
>kind of Debian 11 server you already have.
> 
> 3. I'd then do a rolling deploy that slowly takes Debian 11 servers
>out of service and re-provisions them as Debian 12. I would not
>try to upgrade anything in place. Although Debian supports that,
>at scale I find it harder to account for all variables than with
>a clean install, and if you already have automation to deploy and
>configure a host then an in-lace upgrade also takes longer in my
>experience.

We do hundreds rather than thousands, but we do them:

- with an existing configuration automation system (chef/cinc)

- in-place upgrades

- in tiers, where a given function (e.g. web servers) will have
  representative machines in each tier, starting with a very
  small proof-of-concept upgrade, followed by corrections; then
  a somewhat larger upgrade group, followed by all the rest of
  the machines.

Automated monitoring, too.

-dsr-



Re: Finding a Debian consultancy for help with large-scale platform upgrade (Was Re: Systems upgrading)

2024-08-20 Thread Wesley
And yes we just experienced a p0 accident which affected 100 millions 
end users. (There is maybe already the news on internet.) So we are 
taking serious consideration on hiring a consultant for our system 
upgrading.


Thank you.

On 2024-08-20 23:49, Andy Smith wrote:

Hi Wesley,

On Tue, Aug 20, 2024 at 11:29:26PM +0800, Wesley wrote:
We have 2000+ dedi servers planning to upgrade from debian 11 to 
Debian 12.


I should think that the typical debian-user subscriber manages only
a small number of systems with all of them for personal/hobby use,
with the rest of us being extreme outliers.

I think your use case is vastly outside of the experience of almost
everyone here, so here may not be a great place to find a
consultant.

This page may help in your search:

https://www.debian.org/consultants/

I can recommend some in my country (UK) but maybe that is not of
interest to you.

I've never used them, but my company pays Freexian at the bronze
tier to do Debian LTS packaging work and I understand they do wider
Debian consultancy, so maybe that is a good option.

https://www.freexian.com/services/debian-support/

There's the debian-consultants mailing list but it gets almost no
traffic. I don't think it will aid you in finding a consultancy any
better than the previous links, but just in case:

https://lists.debian.org/debian-consultants/

Just as some free advice though…

1. I find it hard to believe you have more than 2000 Debian installs
   without some sort of existing automation / configuration
   management

2. Given (1), I would approach the task by learning your config
   management and modifying it to deploy a Debian 12 version of each
   kind of Debian 11 server you already have.

3. I'd then do a rolling deploy that slowly takes Debian 11 servers
   out of service and re-provisions them as Debian 12. I would not
   try to upgrade anything in place. Although Debian supports that,
   at scale I find it harder to account for all variables than with
   a clean install, and if you already have automation to deploy and
   configure a host then an in-lace upgrade also takes longer in my
   experience.

Something to chat to your consultancy about, anyway.

It would be really interesting if you or your consultant would write
up what you ended up doing.

Thanks,
Andy


--
https://wespeng.pages.dev/



Finding a Debian consultancy for help with large-scale platform upgrade (Was Re: Systems upgrading)

2024-08-20 Thread Andy Smith
Hi Wesley,

On Tue, Aug 20, 2024 at 11:29:26PM +0800, Wesley wrote:
> We have 2000+ dedi servers planning to upgrade from debian 11 to Debian 12.

I should think that the typical debian-user subscriber manages only
a small number of systems with all of them for personal/hobby use,
with the rest of us being extreme outliers.

I think your use case is vastly outside of the experience of almost
everyone here, so here may not be a great place to find a
consultant.

This page may help in your search:

https://www.debian.org/consultants/

I can recommend some in my country (UK) but maybe that is not of
interest to you.

I've never used them, but my company pays Freexian at the bronze
tier to do Debian LTS packaging work and I understand they do wider
Debian consultancy, so maybe that is a good option.

https://www.freexian.com/services/debian-support/

There's the debian-consultants mailing list but it gets almost no
traffic. I don't think it will aid you in finding a consultancy any
better than the previous links, but just in case:

https://lists.debian.org/debian-consultants/

Just as some free advice though…

1. I find it hard to believe you have more than 2000 Debian installs
   without some sort of existing automation / configuration
   management

2. Given (1), I would approach the task by learning your config
   management and modifying it to deploy a Debian 12 version of each
   kind of Debian 11 server you already have.

3. I'd then do a rolling deploy that slowly takes Debian 11 servers
   out of service and re-provisions them as Debian 12. I would not
   try to upgrade anything in place. Although Debian supports that,
   at scale I find it harder to account for all variables than with
   a clean install, and if you already have automation to deploy and
   configure a host then an in-lace upgrade also takes longer in my
   experience.

Something to chat to your consultancy about, anyway.

It would be really interesting if you or your consultant would write
up what you ended up doing.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: need help: unmet dependencies

2024-08-01 Thread Dan Ritter
Michael Morgan wrote: 
> When I ran "apt --fix-broken install", I got the following message:
> 
> The following additional packages will be installed:
>   chromium-browser chromium-codecs-ffmpeg-extra
> The following packages will be upgraded:
>   chromium-browser chromium-codecs-ffmpeg-extra
> 
> But when I continued with the installation, it froze again:
> Reading changelogs... 33%
> 
> What should I do?

1. Check disk space:
sudo df -h
sudo df -i

If you are out of disk space on any filesystem, or out of
inodes, you will need to clear space before doing anything else.

2. Clear existing packages.
sudo apt clean

3. Get a new update on repository state:
sudo apt update

4. Download the new packages without installing them:
sudo apt upgrade -d

5. Install the new packages:
sudo apt upgrade

Each step needs to be successful before starting the next one;
if you run into errors or warnings, come back and tell us
exactly what they are.




need help: unmet dependencies

2024-08-01 Thread Michael Morgan
Dear all,

I don't know much about linux and need your kind help.

My son's Raspberry Pi 4B's OS is "Debian GNU/Linux 12 (bookworm)" (from
"/etc/os-release").

Yesterday I tried to run "apt update" "apt upgrade", but it stuck at
upgrading package "chromium-browser" (The progress status bar froze; cannot
ssh to it anymore; although I still can ping it).

I had to shut it down and reboot it. I tried it several times but it always
stuck whenever trying to install the package. I also got the following
warning:

You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
 chromium-browser : Depends: chromium-codecs-ffmpeg-extra (=
126.0.6478.164-rpt1) but 122.0.6261.89-rpt1 is to be installed or
 chromium-codecs-ffmpeg (= 126.0.6478.164-rpt1)
but it is not going to be installed
Recommends: chromium-browser-l10n but it is not going
to be installed
E: Unmet dependencies. Try 'apt --fix-broken install' with no packages (or
specify a solution).

When I ran "apt --fix-broken install", I got the following message:

The following additional packages will be installed:
  chromium-browser chromium-codecs-ffmpeg-extra
The following packages will be upgraded:
  chromium-browser chromium-codecs-ffmpeg-extra

But when I continued with the installation, it froze again:
Reading changelogs... 33%

What should I do?

My "/etc/apt/sources.list" is quite simple:
deb http://deb.debian.org/debian bookworm main contrib non-free
non-free-firmware
deb http://deb.debian.org/debian-security/ bookworm-security main contrib
non-free non-free-firmware
deb http://deb.debian.org/debian bookworm-updates main contrib non-free
non-free-firmware

Thank you very much!

Michael


Re: Help installing gdb package using apt

2024-07-15 Thread Demetrius Stanton
Hello everyone,

Thank you so much for your assistance on this matter. The solution was
found.

Updating the sources list to include:
deb http://deb.debian.org/debian/ bookworm main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware
deb http://security.debian.org/debian-security bookworm-security main
non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security main
non-free-firmware

# bookworm-updates, to get updates before a point release is made;
# see
https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main
non-free-firmware

seems to have fixed my issue.

I believe this is entirely a problem of my own causing. My initial plan for
this system was to keep it offline. I later decided to take it online. I
updated the sources list with a single source, thinking that one would be
necessary to get connected, and it worked... for a while.

Thanks again for all the help!

Demetrius Stanton


On Mon, Jul 15, 2024 at 5:59 PM Tom Dial  wrote:

> Hi Demetrius.
>
> See the embedded observations below.
>
>
>
> On 7/15/24 05:42, Demetrius Stanton wrote:
> > Hi!
> >
> > My name is Demetrius Stanton. It was suggested that I reach out for a
> problem I'm experiencing trying to install gdb on my system. I'm willing to
> submit whatever information is necessary to try and get this issue resolved.
> >
> > I recently encountered a weird error, and I can't seem to find a fix
> online. When I run the command ` sudo apt update && sudo apt install gdb -y
> `, I receive an 404 error stating failed to fetch
> https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u
> <https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u>*4*_amd64.deb.
> When I navigate to the https://deb.debian.org/debian/pool/main/g/glibc/ <
> https://deb.debian.org/debian/pool/main/g/glibc/> site, I'm able to find
> libc6-dbg_2.36-9+deb12u*7*_amd64.deb. Though I'm reasonably confident I
> could use wget to download and then dpkg to install this file, I am
> concerned I could adversely affect the stability of my system. I'm sure it
> would be safer for me to use apt to manage my packages.
> >
> > How do I proceed forward from here?
> >
> > I posed this question to  debian-rele...@lists.debian.org>> and received the following in response:
> >
> > "
> > Welcome to Debian.
> >
> > You might be able to resolve this issue you have by running
> >
> > sudo apt update
> >
> > followed by
> >
> > sudo apt full-upgrade
> >
> > and resolve resulting errors, if any occur, and then try reinstalling
> gdb. The particular error - attempting to fetch and install what looks like
> an out of date version of libc6-dbg_2.36-9 - suggests your system might not
> be fully up to date. If that helps, good; otherwise:
> >
> > You would do better to ask this question on the debian-user list (
> debian-user@lists.debian.org <mailto:debian-user@lists.debian.org>). It
> is a fairly active list that includes people with a wide range of knowledge
> and who generally are willing to help.
> >
> > You should provide additional information (and will be asked to do so if
> you do not), since what you give above is a bit sketchy. In particular, I
> suggest you include in the question a copy of your /etc/apt/sources.list
> and any files that are in the directory /etc/apt/sources.list.d. It might
> also be useful to include a copy of your /etc/debian_version and
> /etc/os-release files, which will establish the exact update level of your
> system.
> >
> > In general, it is probably a bad idea to poke around in /debian/pool/ in
> the distribution repository for things to install. Those directories
> contain software for several releases and mixing versions from different
> releases may, as you suspect, result in an unstable system. Using apt is
> much safer, but depends on correct setup of the files in the /etc/apt/
> directory that describe the range of software installed.
> >
> > Regards,
> > 
> > "
> > Attempting the prescribed fix yielded the following:
> >
> > $ sudo apt update && sudo apt full-upgrade
> > [sudo] password for demetrius:
> > Hit:1 https://dl.google.com/linux/chrome/deb <
> https://dl.google.com/linux/chrome/deb> stable InRelease
> > Hit:2 https://deb.debian.org/debian <https://deb.debian.org/debian>
> bookworm InRelease
> > Hit:3 https://packages.microsoft.com/repos/code <
&

Re: Help installing gdb package using apt

2024-07-15 Thread Tom Dial

Hi Demetrius.

See the embedded observations below.



On 7/15/24 05:42, Demetrius Stanton wrote:

Hi!

My name is Demetrius Stanton. It was suggested that I reach out for a problem 
I'm experiencing trying to install gdb on my system. I'm willing to submit 
whatever information is necessary to try and get this issue resolved.

I recently encountered a weird error, and I can't seem to find a fix online. When I run the command 
` sudo apt update && sudo apt install gdb -y `, I receive an 404 error stating failed to 
fetch https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u 
<https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u>*4*_amd64.deb. 
When I navigate to the https://deb.debian.org/debian/pool/main/g/glibc/ 
<https://deb.debian.org/debian/pool/main/g/glibc/> site, I'm able to find  
libc6-dbg_2.36-9+deb12u*7*_amd64.deb. Though I'm reasonably confident I could use wget to download 
and then dpkg to install this file, I am concerned I could adversely affect the stability of my 
system. I'm sure it would be safer for me to use apt to manage my packages.

How do I proceed forward from here?

I posed this question to mailto:debian-rele...@lists.debian.org>> and received the following in response:

"
Welcome to Debian.

You might be able to resolve this issue you have by running

    sudo apt update

followed by

    sudo apt full-upgrade

and resolve resulting errors, if any occur, and then try reinstalling gdb. The 
particular error - attempting to fetch and install what looks like an out of 
date version of libc6-dbg_2.36-9 - suggests your system might not be fully up 
to date. If that helps, good; otherwise:

You would do better to ask this question on the debian-user list 
(debian-user@lists.debian.org <mailto:debian-user@lists.debian.org>). It is a 
fairly active list that includes people with a wide range of knowledge and who 
generally are willing to help.

You should provide additional information (and will be asked to do so if you do 
not), since what you give above is a bit sketchy. In particular, I suggest you 
include in the question a copy of your /etc/apt/sources.list and any files that 
are in the directory /etc/apt/sources.list.d. It might also be useful to 
include a copy of your /etc/debian_version and /etc/os-release files, which 
will establish the exact update level of your system.

In general, it is probably a bad idea to poke around in /debian/pool/ in the 
distribution repository for things to install. Those directories contain 
software for several releases and mixing versions from different releases may, 
as you suspect, result in an unstable system. Using apt is much safer, but 
depends on correct setup of the files in the /etc/apt/ directory that describe 
the range of software installed.

Regards,

"
Attempting the prescribed fix yielded the following:

$ sudo apt update && sudo apt full-upgrade
[sudo] password for demetrius:
Hit:1 https://dl.google.com/linux/chrome/deb 
<https://dl.google.com/linux/chrome/deb> stable InRelease
Hit:2 https://deb.debian.org/debian <https://deb.debian.org/debian> bookworm 
InRelease
Hit:3 https://packages.microsoft.com/repos/code 
<https://packages.microsoft.com/repos/code> stable InRelease
Hit:4 https://brave-browser-apt-release.s3.brave.com 
<https://brave-browser-apt-release.s3.brave.com> stable InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
N: Repository 'Debian bookworm' changed its 'firmware component' value from 
'non-free' to 'non-free-firmware'
N: More information about this can be found online in the Release notes at: 
https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split
 
<https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split>
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt install gdb -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
   libbabeltrace1 libboost-regex1.74.0 libc6-dbg libdebuginfod-common 
libdebuginfod1 libipt2 libsource-highlight-common
   libsource-highlight4v5
Suggested packages:
   gdb-doc gdbserver
The following NEW packages will be installed:
   gdb libbabeltrace1 libboost-regex1.74.0 libc6-dbg libdebuginfod-common 
libdebuginfod1 libipt2 libsource-highlight-common
   libsource-highlight4v5
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,458 kB/12.5 MB of archives.
After this operation, 28.4 MB of additional disk space will be used.
Err:1 https://deb.debian.org/debian <ht

Re: Help installing gdb package using apt

2024-07-15 Thread Lee
On Mon, Jul 15, 2024 at 11:07 AM Demetrius Stanton wrote:
>
> Hi!
>
> My name is Demetrius Stanton. It was suggested that I reach out for a problem 
> I'm experiencing trying to install gdb on my system. I'm willing to submit 
> whatever information is necessary to try and get this issue resolved.
>
> I recently encountered a weird error, and I can't seem to find a fix online. 
> When I run the command ` sudo apt update && sudo apt install gdb -y `, I 
> receive an 404 error stating failed to fetch 
> https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u4_amd64.deb.
>  When I navigate to the  https://deb.debian.org/debian/pool/main/g/glibc/ 
> site, I'm able to find  libc6-dbg_2.36-9+deb12u7_amd64.deb. Though I'm 
> reasonably confident I could use wget to download and then dpkg to install 
> this file, I am concerned I could adversely affect the stability of my 
> system. I'm sure it would be safer for me to use apt to manage my packages.
>
> How do I proceed forward from here?
>
> I posed this question to  and received the 
> following in response:
>
> "
> Welcome to Debian.
>
> You might be able to resolve this issue you have by running
>
>sudo apt update
>
> followed by
>
>sudo apt full-upgrade
>
> and resolve resulting errors, if any occur, and then try reinstalling gdb. 
> The particular error - attempting to fetch and install what looks like an out 
> of date version of libc6-dbg_2.36-9 - suggests your system might not be fully 
> up to date. If that helps, good; otherwise:

  <.. snip ..>
> Attempting the prescribed fix yielded the following:
>
> $ sudo apt update && sudo apt full-upgrade
> [sudo] password for demetrius:
> Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
> Hit:2 https://deb.debian.org/debian bookworm InRelease
> Hit:3 https://packages.microsoft.com/repos/code stable InRelease
> Hit:4 https://brave-browser-apt-release.s3.brave.com stable InRelease

You're missing bookworm-security and bookworm-updates from your
sources list.  Try it again with them in your /etc/apt/sources.list

lee@laptop:~$ cat /etc/apt/sources.list
#deb cdrom:[Debian GNU/Linux 12.5.0 _Bookworm_ - Official amd64
NETINST with firmware 20240210-11:27]/ bookworm contrib main
non-free-firmware

deb http://deb.debian.org/debian/ bookworm main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm main non-free-firmware

deb http://security.debian.org/debian-security bookworm-security main
non-free-firmware
deb-src http://security.debian.org/debian-security bookworm-security
main non-free-firmware

# bookworm-updates, to get updates before a point release is made;
# see 
https://www.debian.org/doc/manuals/debian-reference/ch02.en.html#_updates_and_backports
deb http://deb.debian.org/debian/ bookworm-updates main non-free-firmware
deb-src http://deb.debian.org/debian/ bookworm-updates main non-free-firmware

Regards,
Lee



Re: Help installing gdb package using apt

2024-07-15 Thread Pranjal Singh

Hi Demetrius,

On 15/07/24 17:12, Demetrius Stanton wrote:

[...]
I recently encountered a weird error, and I can't seem to find a fix 
online. When I run the command ` sudo apt update && sudo apt install 
gdb -y `, I receive an 404 error stating failed to fetch 
https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u*4*_amd64.deb. 
When I navigate to the 
https://deb.debian.org/debian/pool/main/g/glibc/ site, I'm able to 
find  libc6-dbg_2.36-9+deb12u*7*_amd64.deb. Though I'm reasonably 
confident I could use wget to download and then dpkg to install this 
file, I am concerned I could adversely affect the stability of my 
system. I'm sure it would be safer for me to use apt to manage my 
packages.



A quick fix might be to use a different Debian mirror:

https://www.debian.org/mirror/list

This is a bad solution, however, even if it works.
I am curious what it is and am looking forward to the big people
to diagnose and solve it.

Regards,
Pranjal



Re: Help installing gdb package using apt

2024-07-15 Thread The Wanderer
On 2024-07-15 at 07:42, Demetrius Stanton wrote:

> Hi!
> 
> My name is Demetrius Stanton. It was suggested that I reach out for a
> problem I'm experiencing trying to install gdb on my system. I'm willing to
> submit whatever information is necessary to try and get this issue
> resolved.
> 
> I recently encountered a weird error, and I can't seem to find a fix
> online. When I run the command ` sudo apt update && sudo apt install gdb -y
> `, I receive an 404 error stating failed to fetch
> https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u*4*_amd64.deb.

> How do I proceed forward from here?
> 
> I posed this question to  and received the
> following in response:



> The particular error - attempting to fetch and install what looks like an
> out of date version of libc6-dbg_2.36-9 - suggests your system might not be
> fully up to date.



> You should provide additional information (and will be asked to do so if
> you do not), since what you give above is a bit sketchy. In particular, I
> suggest you include in the question a copy of your /etc/apt/sources.list
> and any files that are in the directory /etc/apt/sources.list.d.



> Attempting the prescribed fix yielded the following:
> 
> $ sudo apt update && sudo apt full-upgrade
> [sudo] password for demetrius:
> Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
> Hit:2 https://deb.debian.org/debian bookworm InRelease
> Hit:3 https://packages.microsoft.com/repos/code stable InRelease
> Hit:4 https://brave-browser-apt-release.s3.brave.com stable InRelease



> Err:1 https://deb.debian.org/debian bookworm/main amd64 libc6-dbg amd64
> 2.36-9+deb12u4
>   404  Not Found [IP: 2a04:4e42:d::644 443]
> E: Failed to fetch
> https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u4_amd64.deb
>  404  Not Found [IP: 2a04:4e42:d::644 443]
> E: Unable to fetch some archives, maybe run apt-get update or try with
> --fix-missing?
> 
> So now I'm reaching out.
> Here's the info that was recommended I add:
> 
> $ cat /etc/apt/sources.list
> # deb cdrom:[Debian GNU/Linux 12.2.0 _Bookworm_ - Official amd64 DVD
> Binary-1 with firmware 20231007-10:29]/ bookworm main non-free-firmware
> deb https://deb.debian.org/debian/ bookworm main contrib
> $ ls /etc/apt/sources.list.d/
> brave-browser-release.list  google-chrome.list  vscode.list
> $ cat /etc/apt/sources.list.d/brave-browser-release.list
> deb [signed-by=/usr/share/keyrings/brave-browser-archive-keyring.gpg]
> https://brave-browser-apt-release.s3.brave.com/ stable main
> $ cat /etc/apt/sources.list.d/google-chrome.list
> ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
> # You may comment out this entry, but any other modifications may be lost.
> deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main
> $ cat /etc/apt/sources.list.d/vscode.list
> ### THIS FILE IS AUTOMATICALLY CONFIGURED ###
> # You may comment out this entry, but any other modifications may be lost.
> deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/repos/code
> stable main

This sources.list file is missing entries for the portions of the
archive that contain the debug-symbols packages.

For comparison, here is a trio of successive lines from my own
sources.list:

>> deb http://ftp.us.debian.org/debian/ testing main non-free non-free-firmware 
>> contrib
>> deb-src http://ftp.us.debian.org/debian/ testing main non-free 
>> non-free-firmware contrib
>> deb http://debug.mirrors.debian.org/debian-debug/ testing-debug main 
>> non-free non-free-firmware contrib

These specify where APT should look for A: the binary packages, B: the
source packages, and D: the debug-symbols packages, for Debian testing.

(I configure sources list with the names 'stable', 'testing', and 'sid',
rather than using the release codenames; I do this on purpose, but it is
typically recommended to use the release codenames, and you are probably
correct for your situation that you use them.)


Try adding

deb https://debug.mirrors.debian.org/debian-debug/ bookworm-debug main
contrib

(and/or similar for any other official Debian repositories you want to
get debug packages from), and repeating the suggested 'apt update'
command, then installing the desired package(s) again.

I don't think a full-upgrade will be necessary in your circumstances,
although it would *probably* not hurt. If the install attempt still
fails, you can try 'apt full-upgrade' and see whether it produces
something reasonable.

> If there's anything you can suggest to help, it would be greatly
> appreciated!

I hope that is enough to lead you somewhere useful!

-- 
   The Wanderer

The reasonable man adapts himself to the world; the unreasonable one
persists in trying to adapt the world to himself. Therefore all
progress depends on the unreasonable man. -- George Bernard Shaw



signature.asc
Description: OpenPGP digital signature


Help installing gdb package using apt

2024-07-15 Thread Demetrius Stanton
Hi!

My name is Demetrius Stanton. It was suggested that I reach out for a
problem I'm experiencing trying to install gdb on my system. I'm willing to
submit whatever information is necessary to try and get this issue
resolved.

I recently encountered a weird error, and I can't seem to find a fix
online. When I run the command ` sudo apt update && sudo apt install gdb -y
`, I receive an 404 error stating failed to fetch
https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u*4*_amd64.deb.
When I navigate to the  https://deb.debian.org/debian/pool/main/g/glibc/ site,
I'm able to find  libc6-dbg_2.36-9+deb12u*7*_amd64.deb. Though I'm
reasonably confident I could use wget to download and then dpkg to install
this file, I am concerned I could adversely affect the stability of my
system. I'm sure it would be safer for me to use apt to manage my packages.

How do I proceed forward from here?

I posed this question to  and received the
following in response:

"
Welcome to Debian.

You might be able to resolve this issue you have by running

   sudo apt update

followed by

   sudo apt full-upgrade

and resolve resulting errors, if any occur, and then try reinstalling gdb.
The particular error - attempting to fetch and install what looks like an
out of date version of libc6-dbg_2.36-9 - suggests your system might not be
fully up to date. If that helps, good; otherwise:

You would do better to ask this question on the debian-user list (
debian-user@lists.debian.org). It is a fairly active list that includes
people with a wide range of knowledge and who generally are willing to help.

You should provide additional information (and will be asked to do so if
you do not), since what you give above is a bit sketchy. In particular, I
suggest you include in the question a copy of your /etc/apt/sources.list
and any files that are in the directory /etc/apt/sources.list.d. It might
also be useful to include a copy of your /etc/debian_version and
/etc/os-release files, which will establish the exact update level of your
system.

In general, it is probably a bad idea to poke around in /debian/pool/ in
the distribution repository for things to install. Those directories
contain software for several releases and mixing versions from different
releases may, as you suspect, result in an unstable system. Using apt is
much safer, but depends on correct setup of the files in the /etc/apt/
directory that describe the range of software installed.

Regards,

"
Attempting the prescribed fix yielded the following:

$ sudo apt update && sudo apt full-upgrade
[sudo] password for demetrius:
Hit:1 https://dl.google.com/linux/chrome/deb stable InRelease
Hit:2 https://deb.debian.org/debian bookworm InRelease
Hit:3 https://packages.microsoft.com/repos/code stable InRelease
Hit:4 https://brave-browser-apt-release.s3.brave.com stable InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
N: Repository 'Debian bookworm' changed its 'firmware component' value from
'non-free' to 'non-free-firmware'
N: More information about this can be found online in the Release notes at:
https://www.debian.org/releases/bookworm/amd64/release-notes/ch-information.html#non-free-split
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt install gdb -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
  libbabeltrace1 libboost-regex1.74.0 libc6-dbg libdebuginfod-common
libdebuginfod1 libipt2 libsource-highlight-common
  libsource-highlight4v5
Suggested packages:
  gdb-doc gdbserver
The following NEW packages will be installed:
  gdb libbabeltrace1 libboost-regex1.74.0 libc6-dbg libdebuginfod-common
libdebuginfod1 libipt2 libsource-highlight-common
  libsource-highlight4v5
0 upgraded, 9 newly installed, 0 to remove and 0 not upgraded.
Need to get 7,458 kB/12.5 MB of archives.
After this operation, 28.4 MB of additional disk space will be used.
Err:1 https://deb.debian.org/debian bookworm/main amd64 libc6-dbg amd64
2.36-9+deb12u4
  404  Not Found [IP: 2a04:4e42:d::644 443]
E: Failed to fetch
https://deb.debian.org/debian/pool/main/g/glibc/libc6-dbg_2.36-9%2bdeb12u4_amd64.deb
 404  Not Found [IP: 2a04:4e42:d::644 443]
E: Unable to fetch some archives, maybe run apt-get update or try with
--fix-missing?

So now I'm reaching out.
Here's the info that was recommended I add:

$ cat /etc/apt/sources.list
# deb cdrom:[Debian GNU/Linux 12.2.0 _Bookworm_ - Official amd64 DVD
Binary-1 with firmware 20231007-10:29]/ bookworm main non-free-firmware
deb https://deb.debian.org/debian/ bookworm main contrib
$ ls /etc/apt/sources.list.

Solution [Re: Need help with narroely focused use case of Emacs]

2024-07-05 Thread Richard Owlett

On 06/29/2024 12:17 PM, to...@tuxteam.de wrote:

On Sat, Jun 29, 2024 at 06:37:23AM -0500, Richard Owlett wrote:

[...]


When searching for information on regular expressions I came across one that
did it by searching for
{"1 thru 9" OR "10 thru 99" OR "100 thru 999"} .
I lost the reference ;<


That would be something like ([0-9]|[1-9][0-9]|[1-9][0-9][0-9])
since [x-y] expresses a range of characters, the | does OR and
the () do grouping [1].

If you allow yourself to be a bit sloppy [2], and allow numbers
with leading zeros, many regexps flavors have the "limited count
operator" {min,max}, with which you might say [0-9]{1,3} (you
won't need the grouping here, since the repeat operator binds
strongly enough to not mess up the rest of your regexp.

CAVEAT IMPLEMENTOR: Depending on the flavor of your regexps, the
() and sometimes the | need a backslash in front to give them
their magic meaning. In Emacs they do, in Perl (and PCRE, which
is most probably the engine behind Pluma) they don't. In grep
(and sed) you can switch behavior with an option (-E was it,
IIRC).

Cheers

[1] This grouping is (again, depening on your regexp flavour)
a "capturing grouping", meaning that you can refer later
to what was matched by the sub-expression in the parens.
There are also (flavor blah blah) non-capturing groupings.

[2] You always are somewhat sloppy with regexps. Actually you
are being sloppy already, since every classical textbook
will tell you that they totally suck at understanding
"nested stuff", which HTML is, alas. But under the right
conditions they can butcher it alright :-)



Looks like KDE's Kate is viable solution for editing the particular HTML 
files of interest. It seems to be an appropriate mix of Pluma's ease of 
use and Emacs' power. And for some reason I had already installed it.




Re: Need help with narroely focused use case of Emacs

2024-06-30 Thread mick.crane

On 2024-06-30 14:21, Greg Wooledge wrote:

On Sun, Jun 30, 2024 at 12:32:15 +0100, mick.crane wrote:

got it thanks.









I don't know what you're trying to do, but ERE [0-7]{1,2} matches one-
or two-digit *octal* numbers (e.g. 5, 07, 72, 77) but not numbers that
contains the digits 8 or 9.

Do you have a book whose verses are enumerated in octal?


Looked at the original question, having first misunderstood it I said 
could be done with search and replace in an editor then realised I 
wasn't sure how to do what was asked.
So now I know you can use regular expressions in Geany and a bit more 
about the format.

Previous post could have been clearer but I was trying to be brief.



Re: Need help with narroely focused use case of Emacs

2024-06-30 Thread Andy Smith
Hello,

On Sun, Jun 30, 2024 at 09:21:57AM -0400, Greg Wooledge wrote:
> Do you have a book whose verses are enumerated in octal?

No one clarified that this was the *Christian* Bible. 😀

Thanks,
Andy



Re: Need help with narroely focused use case of Emacs

2024-06-30 Thread Greg Wooledge
On Sun, Jun 30, 2024 at 12:32:15 +0100, mick.crane wrote:
> got it thanks.
> 
> 
> 
> 
> 
> 
> 

I don't know what you're trying to do, but ERE [0-7]{1,2} matches one-
or two-digit *octal* numbers (e.g. 5, 07, 72, 77) but not numbers that
contains the digits 8 or 9.

Do you have a book whose verses are enumerated in octal?



Re: Need help with narroely focused use case of Emacs

2024-06-30 Thread mick.crane

On 2024-06-29 20:29, Greg Wooledge wrote:

On Sat, Jun 29, 2024 at 20:18:02 +0100, mick.crane wrote:

Oh, I see what the question was.
There is "use regular expressions", "use multi line matching" in Geany
I'm not very good at regular expressions.
I'd probably do it 3 times
"search for" 
"search for" 
"search for" 


There's more than one regular expression syntax, so the first step is
to figure out which *kind* of regular expression you're writing.

In a Basic Regular Expression (BRE), you can write "one to three
digits" as:

[[:digit:]]\{1,3\}

In an Extended Regular Expression (ERE), you'd remove the backslashes:

[[:digit:]]{1,3}

Some people would use [0-9] instead of [[:digit:]].  [0-9] should work
in any locale I'm aware of, but is theoretically less portable than
[[:digit:]].  If you're actually doing this by typing a regex into an
editor, then [0-9] might be preferred because it's easier to type.  If
you're writing a program, you should probably go with [[:digit:]].


got it thanks.










Re: Curt having his fits [was: Need help with narroely focused use case of Emacs]

2024-06-29 Thread Will Mengarini
* Richard  [24-06/30=Su 00:57 +0200]:
> That's how you warrant your ban, idiot.

Don't get yourself banned, Richard.

Anybody else remember Erik Naggum?



Re: Curt having his fits [was: Need help with narroely focused use case of Emacs]

2024-06-29 Thread Greg Wooledge
On Sun, Jun 30, 2024 at 00:57:07 +0200, Richard wrote:
> That's how you warrant your ban, idiot.

Let it go.  Don't keep pouring more fuel on the fire.

Add Curt to your killfile (or whatever your MUA calls your ban list).
He's already been banned by the list admins anyway, so your local ban
is just for when the global ban is lifted.



Re: Curt having his fits [was: Need help with narroely focused use case of Emacs]

2024-06-29 Thread Richard

That's how you warrant your ban, idiot.

On 29.06.24 20:40, Curt wrote:

On 2024-06-29,  wrote:



Defamatory. What are you, a fucking lawyer? Sue me then, you little snit.

Bad day today?

As usual, you cut all that was pertinent to your meretricious commentary
and left only what suited your brain-damaged hypocrisy.

BTW, eliding a succinct paragraph to leave only a misleading sentence is
just the kind of inept lack of honesty that is your pathetic trademark. As if
you knew how to post, which you manifestly do not, because you cut the gist
of my remark for dishonest reasons.

Richard Owlett is a troll from way, way back.  Take it on board or go fuck
yourself.


Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread mick.crane

On 2024-06-29 20:29, Greg Wooledge wrote:

On Sat, Jun 29, 2024 at 20:18:02 +0100, mick.crane wrote:

Oh, I see what the question was.
There is "use regular expressions", "use multi line matching" in Geany
I'm not very good at regular expressions.
I'd probably do it 3 times
"search for" 
"search for" 
"search for" 


There's more than one regular expression syntax, so the first step is
to figure out which *kind* of regular expression you're writing.

In a Basic Regular Expression (BRE), you can write "one to three
digits" as:

[[:digit:]]\{1,3\}

In an Extended Regular Expression (ERE), you'd remove the backslashes:

[[:digit:]]{1,3}

Some people would use [0-9] instead of [[:digit:]].  [0-9] should work
in any locale I'm aware of, but is theoretically less portable than
[[:digit:]].  If you're actually doing this by typing a regex into an
editor, then [0-9] might be preferred because it's easier to type.  If
you're writing a program, you should probably go with [[:digit:]].


Ta,
I'd had a quick look.
the regular expression thing looks to do one character at a time.


I couldn't see how to do a wild card and if it didn't exist.



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Greg Wooledge
On Sat, Jun 29, 2024 at 20:18:02 +0100, mick.crane wrote:
> Oh, I see what the question was.
> There is "use regular expressions", "use multi line matching" in Geany
> I'm not very good at regular expressions.
> I'd probably do it 3 times
> "search for" 
> "search for" 
> "search for" 

There's more than one regular expression syntax, so the first step is
to figure out which *kind* of regular expression you're writing.

In a Basic Regular Expression (BRE), you can write "one to three
digits" as:

[[:digit:]]\{1,3\}

In an Extended Regular Expression (ERE), you'd remove the backslashes:

[[:digit:]]{1,3}

Some people would use [0-9] instead of [[:digit:]].  [0-9] should work
in any locale I'm aware of, but is theoretically less portable than
[[:digit:]].  If you're actually doing this by typing a regex into an
editor, then [0-9] might be preferred because it's easier to type.  If
you're writing a program, you should probably go with [[:digit:]].



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread mick.crane

On 2024-06-29 16:09, Max Nikulin wrote:

On 29/06/2024 20:07, mick.crane wrote:

On 2024-06-29 12:34, Max Nikulin wrote:

To manipulate with HTML it is better to write a script in some
programming language, e.g. for python there are lxml etree and
BeautifulSoup packages. This way it is easier to maintain valid
document structure with paired opening and closing tags.

I have not tried Emacs lisp facilities for dealing with HTML.


open in Geany

[...]

click search select replace
copy paste selection into "search for"


By "Emacs *lisp* facilities for dealing with HTML" I mead something
like `libxml-parse-html-region'. Notice that I was suggesting against
search&replace.


Oh, I see what the question was.
There is "use regular expressions", "use multi line matching" in Geany
I'm not very good at regular expressions.
I'd probably do it 3 times
"search for" 
"search for" 
"search for" 



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread David Wright
On Sat 29 Jun 2024 at 17:08:04 (+0200), Vincent Lefevre wrote:
> On 2024-06-28 20:53:50 +, Michael Kjörling wrote:
> > Yes, it almost certainly can be done with a single sed (or other
> > similar tool) invocation where the regular expression matches
> > precisely what you want it to match. But unless this is something you
> > will do very often, I tend to prefer readability over being clever,
> > even if the readable version is somewhat less performant.
> 
> To match a range inside a regexp, $(rgxg range 1 119) is readable. :)
> 
> rgxg is provided by the package of the same name.

Perhaps best to ignore the narrow focus on 119 in the OP.
For bible verses per chapter, the largest number is 176.
(An accidental choice of 119 might be explained by that
psalm having the most verses. Only Psalms requires three
digits as it happens; I think the runner-up has only about
half that.)

It would be tedious and error-prone to have to specify the
maximum range for each chapter. Different versions of the
bible don't even agree with each other on numbers of verses.

Cheers,
David.



Re: Curt having his fits [was: Need help with narroely focused use case of Emacs]

2024-06-29 Thread Curt
On 2024-06-29,   wrote:
>
>
>> Defamatory. What are you, a fucking lawyer? Sue me then, you little snit.
>
> Bad day today?

As usual, you cut all that was pertinent to your meretricious commentary
and left only what suited your brain-damaged hypocrisy.

BTW, eliding a succinct paragraph to leave only a misleading sentence is
just the kind of inept lack of honesty that is your pathetic trademark. As if
you knew how to post, which you manifestly do not, because you cut the gist
of my remark for dishonest reasons.

Richard Owlett is a troll from way, way back.  Take it on board or go fuck
yourself.



Curt having his fits [was: Need help with narroely focused use case of Emacs]

2024-06-29 Thread tomas
On Sat, Jun 29, 2024 at 05:43:15PM -, Curt wrote:

[...]

> Defamatory. What are you, a fucking lawyer? Sue me then, you little snit. 

Bad day today?

I can't help you. I'm out of this thread.
-- 
t


signature.asc
Description: PGP signature


Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Curt
On 2024-06-29,   wrote:
>
>> Owlett is a notorious troll who never listens to reason.
>
> This is wrong, borderline defamatory. Richard Owlett is not a

Andy Smith:

 It's not an authentic Owlett thread unless it contains an enormous
 XY problem, a monomaniacal obsession with a solution already
 part-dreamed up by the OP, several factual errors, and a constant
 trickle of confounding small details that were never provided up
 front, now delivered with glee.

IOW, a troll. So go fuck yourself, as you should have done years ago.

Defamatory. What are you, a fucking lawyer? Sue me then, you little snit. 






Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread tomas
On Sat, Jun 29, 2024 at 06:37:23AM -0500, Richard Owlett wrote:

[...]

> When searching for information on regular expressions I came across one that
> did it by searching for
>{"1 thru 9" OR "10 thru 99" OR "100 thru 999"} .
> I lost the reference ;<

That would be something like ([0-9]|[1-9][0-9]|[1-9][0-9][0-9])
since [x-y] expresses a range of characters, the | does OR and
the () do grouping [1].

If you allow yourself to be a bit sloppy [2], and allow numbers
with leading zeros, many regexps flavors have the "limited count
operator" {min,max}, with which you might say [0-9]{1,3} (you
won't need the grouping here, since the repeat operator binds
strongly enough to not mess up the rest of your regexp.

CAVEAT IMPLEMENTOR: Depending on the flavor of your regexps, the
() and sometimes the | need a backslash in front to give them
their magic meaning. In Emacs they do, in Perl (and PCRE, which
is most probably the engine behind Pluma) they don't. In grep
(and sed) you can switch behavior with an option (-E was it,
IIRC).

Cheers

[1] This grouping is (again, depening on your regexp flavour)
   a "capturing grouping", meaning that you can refer later
   to what was matched by the sub-expression in the parens.
   There are also (flavor blah blah) non-capturing groupings.

[2] You always are somewhat sloppy with regexps. Actually you
   are being sloppy already, since every classical textbook
   will tell you that they totally suck at understanding
   "nested stuff", which HTML is, alas. But under the right
   conditions they can butcher it alright :-)

-- 
tomás


signature.asc
Description: PGP signature


Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread tomas
On Sat, Jun 29, 2024 at 04:02:56PM -, Curt wrote:
> On 2024-06-29, Michael Kjörling  wrote:
> >> 
> >> HUH ??
> >
> > ..._focus on the goal_.
> >
> 
> 
> Owlett is a notorious troll who never listens to reason.

This is wrong, borderline defamatory. Richard Owlett is not a
troll [1]. He may be uncommon in the way he approaches things,
and I do understand his ways may annoy some people.

If they annoy you, you always may choose to not respond. Others
will chime in. Much more polite and much more effective for the
whole mailing list.

Lobbing insults at people doesn't help anyone.

Cheers

[1] by the very definition of "troll", who isn't interested in the topic
   itself, but just in eliciting a response.
-- 
t


signature.asc
Description: PGP signature


Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Lee
Hi,

> > So you may prefer to use regexes as
> > Murphy intended, handling both the opening and closing tags at the same
> > time, leaving the intervening text intact.
>
> In this particular case I suspect it would become overly complex.
> I've already discovered that the order of edits is important.

I guess it depends on what you're used to.  I don't think this bit is
overly complex .. your opinion might be different

$ cat /tmp/z
cat /dev/null > txtfile.html
for v in $(seq 1 12); do echo ' text
text text ' >> txtfile.html; done
sed -Ei.bak 's@([^<]*)@\1@g' txtfile.html

$ bash z

$ cat txtfile*
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 
 text text text 

$

Regards,
Lee



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Curt
On 2024-06-29, Michael Kjörling  wrote:
>> 
>> HUH ??
>
> ..._focus on the goal_.
>


Owlett is a notorious troll who never listens to reason.

But you people adore this kind of troll, inexplicably, perhaps because
he allows you to expand endlessly on your reams of essentially useless
knowledge.



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Max Nikulin

On 29/06/2024 20:07, mick.crane wrote:

On 2024-06-29 12:34, Max Nikulin wrote:

To manipulate with HTML it is better to write a script in some
programming language, e.g. for python there are lxml etree and
BeautifulSoup packages. This way it is easier to maintain valid
document structure with paired opening and closing tags.

I have not tried Emacs lisp facilities for dealing with HTML.


open in Geany

[...]

click search select replace
copy paste selection into "search for"


By "Emacs *lisp* facilities for dealing with HTML" I mead something like 
`libxml-parse-html-region'. Notice that I was suggesting against 
search&replace.





Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Vincent Lefevre
On 2024-06-28 20:53:50 +, Michael Kjörling wrote:
> Yes, it almost certainly can be done with a single sed (or other
> similar tool) invocation where the regular expression matches
> precisely what you want it to match. But unless this is something you
> will do very often, I tend to prefer readability over being clever,
> even if the readable version is somewhat less performant.

To match a range inside a regexp, $(rgxg range 1 119) is readable. :)

rgxg is provided by the package of the same name.

-- 
Vincent Lefèvre  - Web: 
100% accessible validated (X)HTML - Blog: 
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Andy Smith
Hello,

On Sat, Jun 29, 2024 at 01:46:27PM +, Michael Kjörling wrote:
> On 29 Jun 2024 06:12 -0500, from rowl...@access.net (Richard Owlett):
> >> there may be other  closing tags you don't want to
> >> change because they close other  tags we haven't seen.
> > 
> > Chuckle ;} The appropriate "" to be replaced by "" is ALWAYS
> > preceded by "#160;" .
> 
> As far as I can see, neither of this was stated in the original
> question. Please don't add arbitrary requirements later to invalidate
> potential answers.

It's not an authentic Owlett thread unless it contains an enormous
XY problem, a monomaniacal obsession with a solution already
part-dreamed up by the OP, several factual errors, and a constant
trickle of confounding small details that were never provided up
front, now delivered with glee.

Otherwise it's just sparkling timewasting.

Thanks,
Andy

-- 
https://bitfolk.com/ -- No-nonsense VPS hosting



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Michael Kjörling
On 29 Jun 2024 05:51 -0500, from rowl...@access.net (Richard Owlett):
>> Ignoring the question about Emacs
> 
> Emacs *CAN NOT* be ignored.

I did not say to ignore _Emacs_. I said that I was ignoring the
_question_ about Emacs, to instead...

>> and focusing on the goal (your
   
>> question otherwise is an excellent example of a XY question), this is
>> not something regular expressions are very good at.
> 
> HUH ??

..._focus on the goal_.

(It is usually a good idea to read at least a whole sentence before
responding to it.)

The _goal_ in this case being your stated specific series of string
replacements.

If you want to use Emacs to do that, no one is stopping you from doing
so. You can directly adapt what I suggested to an Emacs workflow. But
just because a nailgun can be used to hang a painting doesn't mean
that a nailgun is the _appropriate_ tool for that particular job;
without detracting from its usability in _other_ applications.

Sometimes really all you are looking for is a small hammer.

-- 
Michael Kjörling 🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Michael Kjörling
On 29 Jun 2024 06:12 -0500, from rowl...@access.net (Richard Owlett):
>>> $ for v in $(seq 1 119); do sed -i 's,>> id="V'$v'">,,g' ./*.html; done
>> 
>> Having done that (or similar), don't forget to change the relevant
>>  closing tags to  closing tags. However, there may be
>> other  closing tags you don't want to change because they close
>> other  tags we haven't seen.
> 
> Chuckle ;} The appropriate "" to be replaced by "" is ALWAYS
> preceded by "#160;" .

As far as I can see, neither of this was stated in the original
question. Please don't add arbitrary requirements later to invalidate
potential answers.

-- 
Michael Kjörling 🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread mick.crane

On 2024-06-29 12:34, Max Nikulin wrote:

On 29/06/2024 11:48, to...@tuxteam.de wrote:

   Do M-x (hold Meta, most of the time your Alt key, then "x").
   You get a command for a prompt. Enter "query-replace-regexp"


And to get help for this function

C-h f query-replace-regexp RET

To open user manual switch to the help buffer and press "i".

A side note since an answer to the asked question has been posted.

To manipulate with HTML it is better to write a script in some
programming language, e.g. for python there are lxml etree and
BeautifulSoup packages. This way it is easier to maintain valid
document structure with paired opening and closing tags.

I have not tried Emacs lisp facilities for dealing with HTML.


open in Geany


  thru [at most]

  abcdefg

  thru [at most]

abcdefg

  thru [at most]

abcdefg

click search select replace
copy paste selection into "search for"
paste  in "replace with"
click "In Document"


  abcdefg

abcdefg

abcdefg



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Richard Owlett

On 06/29/2024 06:51 AM, debian-u...@howorth.org.uk wrote:

Richard Owlett  wrote:

On 06/28/2024 03:53 PM, Michael Kjörling wrote:

On 28 Jun 2024 14:04 -0500, from rowl...@access.net (Richard
Owlett):

I need to replace ANY occurrence of
  
thru [at most]
  
by
  

I'm reformatting a Bible stored in HTML format for a particular
set of vision impaired seniors (myself included). Each chapter is
in its own file.

How do I open a file.
Do the above replacement.
Save and close the file.


Ignoring the question about Emacs


Emacs *CAN NOT* be ignored.
It is the _available_ editor known to be capable of handling regular
expressions.


Err, pluma is available I believe.


May I quote my original post?

On 06/28/2024 02:04 PM, Richard Owlett wrote:

Pluma is my editor of choice.

I've never used it but I just
started it and used the Replace... entry on the Search menu to bring up
a dialog box. In the dialog box there is a tick box labelled "Match
regular expression". So I ticked that and then tested it by editing an
html file using an RE.

So Pluma is an "_available_ editor known to be capable of handling
regular expressions."


So you evidently have a later version than I have available for this 
particular machine.

One does get latest and greatest by simply wishing for it.



And as others have pointed out, sed is available and it's easy to
install others. So there are many possible answers to your question
other than emacs.


My definition of "available" includes knowledge of how to use it.
I've investigated it for some past projects and found easier way to 
accomplish those particular tasks. Part of my interest in Emacs stems 
from having seen what co-workers could do with its predecessor TECO 
decades ago.


Updating MY system is NONtrivial!





Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Greg Wooledge
On Sat, Jun 29, 2024 at 07:43:47 -0400, Dan Ritter wrote:
> The option "g" means that said should do this multiple times if
> it occurs in the same file (globally, like grep) instead of the
> default behavior which is to find the first match and just
> change that.

The g option in sed's s command means it will apply the substitution
multiple times per *line*.  Not per file.  It always applies multiple
times per file, unless you restrict the line range with a prefix.

hobbit:~$ printf 'foo foo\nfoo foo\n' | sed s/foo/bar/
bar foo
bar foo
hobbit:~$ printf 'foo foo\nfoo foo\n' | sed s/foo/bar/g
bar bar
bar bar



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Greg Wooledge
On Fri, Jun 28, 2024 at 21:23:03 -0600, Charles Curley wrote:
> On Fri, 28 Jun 2024 20:53:50 +
> Michael Kjörling  wrote:
> 
> > $ for v in $(seq 1 119); do sed -i 's, > id="V'$v'">,,g' ./*.html; done
> > 
> > Be sure to have a copy in case something goes wrong; and diff(1) a few
> > files afterwards to make sure that the result is as you intended.
> 
> Having done that (or similar), don't forget to change the relevant
>  closing tags to  closing tags. However, there may be
> other  closing tags you don't want to change because they close
> other  tags we haven't seen. So you may prefer to use regexes as
> Murphy intended, handling both the opening and closing tags at the same
> time, leaving the intervening text intact.

https://stackoverflow.com/questions/1732348/regex-match-open-tags-except-xhtml-self-contained-tags#answer-1732454



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Dan Ritter
Richard Owlett wrote: 
> On 06/28/2024 03:53 PM, Michael Kjörling wrote:
> > On 28 Jun 2024 14:04 -0500, from rowl...@access.net (Richard Owlett):
> > > I need to replace ANY occurrence of
> > >  
> > >thru [at most]
> > >  
> > > by
> > >  
> > > 
> > > I'm reformatting a Bible stored in HTML format for a particular set of
> > > vision impaired seniors (myself included). Each chapter is in its own 
> > > file.
> > > 
> > > How do I open a file.
> > > Do the above replacement.
> > > Save and close the file.
> > 
> > Ignoring the question about Emacs
> 
> Emacs *CAN NOT* be ignored.
> It is the _available_ editor known to be capable of handling regular
> expressions.

If your machine doesn't have sed, it is not a working Debian
system. 

Every Debian machine comes with sed by default.  Even the
rescue image has sed. The installer environment, before Debian
is actually installed, has sed. sed is a basic tool that
everyone has access to. emacs needs to be installed, and often
is not.

I know from past experience that it's useless to offer you any
solution that deviates from the vision you have for the way the
world ought to work, but this is a sufficiently common kind of
problem that a full answer will be useful to other people.

> > and focusing on the goal (your
> > question otherwise is an excellent example of a XY question), this is
> > not something regular expressions are very good at.
> 
> HUH ??

An XY question is when someone asks "How can I do specific thing
X?" but what they want to do is task Y, which is more easily
accomplished in a different way that doesn't involve X at all.
Usually this means that they have read something that tells them
about X in a different context, and they think that is an
essential part of solving their Y problem.

If we're lucky, they tell us what Y is. Frequently, XY questions
just show up as "How do I do X?" without context.

It happens a lot on this mailing list.

Or, maybe your expression of disbelief was about regular
expressions? A regular expression (regexp) is a specific kind of
formal language for specifying a pattern of tokens -- what we
often call a "string". If the regexp describes a candidate
string, we call that a "match". A common editing task is to find
all the matches for a regexp and replace them with some other
string.

The program "grep" takes its name from a sequence of editor
commands: global regular expression print. 

Michael says that regexps aren't great at this particular task
because there's a variable component in the pattern which is
hard to describe. He comes up with a clever solution based on
the fact that the variable component is going to be an integer
sequence.


> > However, since
> > it's presumably a once-only operation, I assume that you can live with
> > it being done in a suboptimal way in terms of performance.
> > 
> > In that case, assuming for simplicity that all the files are in a
> > single directory, you could try something similar to:
> > 
> > $ for v in $(seq 1 119); do sed -i 's, > id="V'$v'">,,g' ./*.html; done
 
This sets up a loop which will execute 119 times, incrementing
the variable $v from 1 to 119. Inside the loop, it calls `sed`
to execute inplace (-i) which means it will change the files it
encounters rather than spitting out new files on standard out.

The command passed to sed is

s,,,g

s means string substitution. It takes a pattern, a replacement,
and options, separated by the next character after the s, which
in this case is a comma.



is the pattern. Because of the loop, the value $v is going to be
replaced by the shell before sed sees this, so on various runs
through the loop sed will see:



...




You'll probably need to adjust this for other books.

Anyway, whenever sed sees the pattern above, it will replace it
with:



which is what you said you wanted.

The option "g" means that said should do this multiple times if
it occurs in the same file (globally, like grep) instead of the
default behavior which is to find the first match and just
change that.

./*.html

tells sed to operate on all the files in the current directory
ending in .html -- yes, shells implement a version of regexp for
file pattern matching. And that's the end of the loop.


> I'll have to investigate sed further.
> My project is not yet to the point of automatically editing ALL chapters. I
> need to first establish how to edit all VERSES of an individual chapter.

The solution Michael presented can be run on just one file
instead of all the .html files in the current directory.


> ROFL ;} No one would define me as a "programmer". I took an introduction to
> computers course as a E.E. student in the 60's. Most of my jobs required
> background in component level analog electronics. Got one assignment because
> I was not "afraid" of 8080 ;}

The true UNIX philosophy is that at any moment, any user can
stop being "just a user" and use the tools present to do some
programming to solve their problems. 



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread debian-user
Richard Owlett  wrote:
> On 06/28/2024 03:53 PM, Michael Kjörling wrote:
> > On 28 Jun 2024 14:04 -0500, from rowl...@access.net (Richard
> > Owlett):  
> >> I need to replace ANY occurrence of
> >>  
> >>thru [at most]
> >>  
> >> by
> >>  
> >>
> >> I'm reformatting a Bible stored in HTML format for a particular
> >> set of vision impaired seniors (myself included). Each chapter is
> >> in its own file.
> >>
> >> How do I open a file.
> >> Do the above replacement.
> >> Save and close the file.  
> > 
> > Ignoring the question about Emacs   
> 
> Emacs *CAN NOT* be ignored.
> It is the _available_ editor known to be capable of handling regular 
> expressions.

Err, pluma is available I believe. I've never used it but I just
started it and used the Replace... entry on the Search menu to bring up
a dialog box. In the dialog box there is a tick box labelled "Match
regular expression". So I ticked that and then tested it by editing an
html file using an RE.

So Pluma is an "_available_ editor known to be capable of handling
regular expressions."

And as others have pointed out, sed is available and it's easy to
install others. So there are many possible answers to your question
other than emacs.



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Richard Owlett

On 06/28/2024 11:48 PM, to...@tuxteam.de wrote:

On Fri, Jun 28, 2024 at 02:04:37PM -0500, Richard Owlett wrote:

Pluma is my editor of choice.
*BUT* it can NOT handle Search and Replace operations involving regular
expressions.


I would be *very* surprised if an editor, these days and age
can't do regular expressions. Really.


Emacs can. It has much verbose documentation.
But examples seem rather scarce.


Of course, Emacs is the best editor out there, by a long shot.
But learning it is a long and panoramic road. You should at
least have a rough idea that you want to take it.


Definitely interested
I worked for DEC in the 70's. Though an tech in Power Supply 
Engineering, I was exposed to TECO and have recently seen claims that 
Emacs is TECO done right. I've been exposed to many editors since but 
TECO is memorable.





I need to replace ANY occurrence of
 
   thru [at most]
 
by
 

I'm reformatting a Bible stored in HTML format for a particular set of
vision impaired seniors (myself included). Each chapter is in its own file.

How do I open a file.


Two ways of skinning that cat:

   - in a terminal, type "emacs "
   - in an open Emacs instance (be it terminal or GUI, your
 choice), type C-x C-f (hold CTRL, then "x", while holding
 CTRL then "f"). You get a prompt in the bottom line (the
 so-called minibuffer), enter your file name there. You
 get tab completions.

Then there are menus...


Do the above replacement.


   Go to the top of your buffer (this is what you would call
   "your file": Emacs calls the things which hold your text
   while you are on them "buffers").
   Do M-x (hold Meta, most of the time your Alt key, then "x").
   You get a command for a prompt. Enter "query-replace-regexp"
   (you get tab completions, so "que" TAB "re" TAB should suffice,
   roughly speaking). Enter the regular expression you're looking
   for. Then ENTER, then your replacement.


Save and close the file.


   To save, C-x C-s. I don't quite know what you mean by
   "close".

   To quit Emacs, C-x C-c.

Now I don't quite understand what you mean above with your
example, and whether it can be expressed by a regular expression
at all, but that is for a second go.


When searching for information on regular expressions I came across one 
that did it by searching for

   {"1 thru 9" OR "10 thru 99" OR "100 thru 999"} .
I lost the reference ;<





First, find out whether your beloved Pluma can deliver. I'm
sure it can. Unless you want to embark in the Emacs adventure
(very much recommended, mind you, but not the most efficient
path to your problem at hand).


I'm still essentially at the stage of flow-charting how I need to handle 
individual chapters. As there ~1000 chapters, I'll want to use something 
that can handle macros eventually.


Thank you.



Cheers





Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Max Nikulin

On 29/06/2024 11:48, to...@tuxteam.de wrote:

   Do M-x (hold Meta, most of the time your Alt key, then "x").
   You get a command for a prompt. Enter "query-replace-regexp"


And to get help for this function

C-h f query-replace-regexp RET

To open user manual switch to the help buffer and press "i".

A side note since an answer to the asked question has been posted.

To manipulate with HTML it is better to write a script in some 
programming language, e.g. for python there are lxml etree and 
BeautifulSoup packages. This way it is easier to maintain valid document 
structure with paired opening and closing tags.


I have not tried Emacs lisp facilities for dealing with HTML.



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Richard Owlett

On 06/28/2024 10:23 PM, Charles Curley wrote:

On Fri, 28 Jun 2024 20:53:50 +
Michael Kjörling  wrote:


$ for v in $(seq 1 119); do sed -i 's,,,g' ./*.html; done

Be sure to have a copy in case something goes wrong; and diff(1) a few
files afterwards to make sure that the result is as you intended.


Having done that (or similar), don't forget to change the relevant
 closing tags to  closing tags. However, there may be
other  closing tags you don't want to change because they close
other  tags we haven't seen.


Chuckle ;} The appropriate "" to be replaced by "" is 
ALWAYS preceded by "#160;" .



So you may prefer to use regexes as
Murphy intended, handling both the opening and closing tags at the same
time, leaving the intervening text intact.


In this particular case I suspect it would become overly complex.
I've already discovered that the order of edits is important.






Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Richard Owlett

On 06/28/2024 03:53 PM, Michael Kjörling wrote:

On 28 Jun 2024 14:04 -0500, from rowl...@access.net (Richard Owlett):

I need to replace ANY occurrence of
 
   thru [at most]
 
by
 

I'm reformatting a Bible stored in HTML format for a particular set of
vision impaired seniors (myself included). Each chapter is in its own file.

How do I open a file.
Do the above replacement.
Save and close the file.


Ignoring the question about Emacs 


Emacs *CAN NOT* be ignored.
It is the _available_ editor known to be capable of handling regular 
expressions.



and focusing on the goal (your
question otherwise is an excellent example of a XY question), this is
not something regular expressions are very good at.


HUH ??


However, since
it's presumably a once-only operation, I assume that you can live with
it being done in a suboptimal way in terms of performance.

In that case, assuming for simplicity that all the files are in a
single directory, you could try something similar to:

$ for v in $(seq 1 119); do sed -i 's,,,g' 
./*.html; done


I'll have to investigate sed further.
My project is not yet to the point of automatically editing ALL 
chapters. I need to first establish how to edit all VERSES of an 
individual chapter.





Be sure to have a copy in case something goes wrong; and diff(1) a few
files afterwards to make sure that the result is as you intended.


ROFL ;} No one would define me as a "programmer". I took an introduction 
to computers course as a E.E. student in the 60's. Most of my jobs 
required background in component level analog electronics. Got one 
assignment because I was not "afraid" of 8080 ;}




Yes, it almost certainly can be done with a single sed (or other
similar tool) invocation where the regular expression matches
precisely what you want it to match. But unless this is something you
will do very often, I tend to prefer readability over being clever,
even if the readable version is somewhat less performant.






Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Richard Owlett

On 06/28/2024 02:33 PM, Van Snyder wrote:

On Fri, 2024-06-28 at 14:04 -0500, Richard Owlett wrote:

Pluma is my editor of choice.
*BUT* it can NOT handle Search and Replace operations involving
regular
expressions.

Emacs can. It has much verbose documentation.
But examples seem rather scarce.


nedit can handle regular expressions in search and replace operations.
I find nedit easier to use than emacs.


I've see references to nedit before.
But circumstances require I use this system in its current configuration.

Thank you.



Re: Need help with narroely focused use case of Emacs

2024-06-29 Thread Richard Owlett

On 06/28/2024 02:17 PM, didier gaumet wrote:

Le 28/06/2024 à 21:04, Richard Owlett a écrit :

Pluma is my editor of choice.
*BUT* it can NOT handle Search and Replace operations involving 
regular expressions.

[...]

Hello Richard,

According to the Mate wiki, Pluma handles regular expressions the Perl way:
https://wiki.mate-desktop.org/mate-desktop/applications/pluma/


Hadn't seen that page. I based my opinion on what I saw when doing a 
Search and Replace. Also Pluma's Help function doesn't mention it.



https://perldoc.perl.org/perlre


That page is thin on examples. But now knowing that Pluma does things 
"the Perl way" I can do a web search.


Thank you.






Re: Need help with narroely focused use case of Emacs

2024-06-28 Thread tomas
On Fri, Jun 28, 2024 at 09:17:14PM +0200, didier gaumet wrote:
> Le 28/06/2024 à 21:04, Richard Owlett a écrit :
> > Pluma is my editor of choice.
> > *BUT* it can NOT handle Search and Replace operations involving regular
> > expressions.
> [...]
> 
> Hello Richard,
> 
> According to the Mate wiki, Pluma handles regular expressions the Perl way:
> https://wiki.mate-desktop.org/mate-desktop/applications/pluma/
> https://perldoc.perl.org/perlre

See? I was sure of that. And Perl style regexps are actually somewhat
friendlier than Emacs style (they're roughly one decennium younger).

Thanks, Didier :-)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Need help with narroely focused use case of Emacs

2024-06-28 Thread tomas
On Fri, Jun 28, 2024 at 02:04:37PM -0500, Richard Owlett wrote:
> Pluma is my editor of choice.
> *BUT* it can NOT handle Search and Replace operations involving regular
> expressions.

I would be *very* surprised if an editor, these days and age
can't do regular expressions. Really.

> Emacs can. It has much verbose documentation.
> But examples seem rather scarce.

Of course, Emacs is the best editor out there, by a long shot.
But learning it is a long and panoramic road. You should at
least have a rough idea that you want to take it.

> I need to replace ANY occurrence of
> 
>   thru [at most]
> 
> by
> 
> 
> I'm reformatting a Bible stored in HTML format for a particular set of
> vision impaired seniors (myself included). Each chapter is in its own file.
> 
> How do I open a file.

Two ways of skinning that cat:

  - in a terminal, type "emacs "
  - in an open Emacs instance (be it terminal or GUI, your
choice), type C-x C-f (hold CTRL, then "x", while holding
CTRL then "f"). You get a prompt in the bottom line (the
so-called minibuffer), enter your file name there. You
get tab completions.

Then there are menus...

> Do the above replacement.

  Go to the top of your buffer (this is what you would call
  "your file": Emacs calls the things which hold your text
  while you are on them "buffers").
  Do M-x (hold Meta, most of the time your Alt key, then "x").
  You get a command for a prompt. Enter "query-replace-regexp"
  (you get tab completions, so "que" TAB "re" TAB should suffice,
  roughly speaking). Enter the regular expression you're looking
  for. Then ENTER, then your replacement.

> Save and close the file.

  To save, C-x C-s. I don't quite know what you mean by
  "close".

  To quit Emacs, C-x C-c.

Now I don't quite understand what you mean above with your
example, and whether it can be expressed by a regular expression
at all, but that is for a second go.

First, find out whether your beloved Pluma can deliver. I'm
sure it can. Unless you want to embark in the Emacs adventure
(very much recommended, mind you, but not the most efficient
path to your problem at hand).

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Need help with narroely focused use case of Emacs

2024-06-28 Thread Charles Curley
On Fri, 28 Jun 2024 20:53:50 +
Michael Kjörling  wrote:

> $ for v in $(seq 1 119); do sed -i 's, id="V'$v'">,,g' ./*.html; done
> 
> Be sure to have a copy in case something goes wrong; and diff(1) a few
> files afterwards to make sure that the result is as you intended.

Having done that (or similar), don't forget to change the relevant
 closing tags to  closing tags. However, there may be
other  closing tags you don't want to change because they close
other  tags we haven't seen. So you may prefer to use regexes as
Murphy intended, handling both the opening and closing tags at the same
time, leaving the intervening text intact.



-- 
Does anybody read signatures any more?

https://charlescurley.com
https://charlescurley.com/blog/



Re: Need help with narroely focused use case of Emacs

2024-06-28 Thread Michael Kjörling
On 28 Jun 2024 14:04 -0500, from rowl...@access.net (Richard Owlett):
> I need to replace ANY occurrence of
> 
>   thru [at most]
> 
> by
> 
> 
> I'm reformatting a Bible stored in HTML format for a particular set of
> vision impaired seniors (myself included). Each chapter is in its own file.
> 
> How do I open a file.
> Do the above replacement.
> Save and close the file.

Ignoring the question about Emacs and focusing on the goal (your
question otherwise is an excellent example of a XY question), this is
not something regular expressions are very good at. However, since
it's presumably a once-only operation, I assume that you can live with
it being done in a suboptimal way in terms of performance.

In that case, assuming for simplicity that all the files are in a
single directory, you could try something similar to:

$ for v in $(seq 1 119); do sed -i 's,,,g' 
./*.html; done

Be sure to have a copy in case something goes wrong; and diff(1) a few
files afterwards to make sure that the result is as you intended.

Yes, it almost certainly can be done with a single sed (or other
similar tool) invocation where the regular expression matches
precisely what you want it to match. But unless this is something you
will do very often, I tend to prefer readability over being clever,
even if the readable version is somewhat less performant.

-- 
Michael Kjörling 🔗 https://michael.kjorling.se
“Remember when, on the Internet, nobody cared that you were a dog?”



Re: Need help with narroely focused use case of Emacs

2024-06-28 Thread Van Snyder
On Fri, 2024-06-28 at 14:04 -0500, Richard Owlett wrote:
> Pluma is my editor of choice.
> *BUT* it can NOT handle Search and Replace operations involving
> regular 
> expressions.
> 
> Emacs can. It has much verbose documentation.
> But examples seem rather scarce.

nedit can handle regular expressions in search and replace operations.
I find nedit easier to use than emacs.

> 
> I need to replace ANY occurrence of
>  
>    thru [at most]
>  
> by
>  
> 
> I'm reformatting a Bible stored in HTML format for a particular set
> of 
> vision impaired seniors (myself included). Each chapter is in its own
> file.
> 
> How do I open a file.
> Do the above replacement.
> Save and close the file.
> 
> Help please.
> TIA
> 



Re: Need help with narroely focused use case of Emacs

2024-06-28 Thread didier gaumet

Le 28/06/2024 à 21:04, Richard Owlett a écrit :

Pluma is my editor of choice.
*BUT* it can NOT handle Search and Replace operations involving regular 
expressions.

[...]

Hello Richard,

According to the Mate wiki, Pluma handles regular expressions the Perl way:
https://wiki.mate-desktop.org/mate-desktop/applications/pluma/
https://perldoc.perl.org/perlre



Need help with narroely focused use case of Emacs

2024-06-28 Thread Richard Owlett

Pluma is my editor of choice.
*BUT* it can NOT handle Search and Replace operations involving regular 
expressions.


Emacs can. It has much verbose documentation.
But examples seem rather scarce.

I need to replace ANY occurrence of

  thru [at most]

by


I'm reformatting a Bible stored in HTML format for a particular set of 
vision impaired seniors (myself included). Each chapter is in its own file.


How do I open a file.
Do the above replacement.
Save and close the file.

Help please.
TIA



Re: Predictable network device names [was: Please help me identify package so I can report an important bug

2024-06-12 Thread tomas
On Thu, Jun 13, 2024 at 06:59:49AM +0200, Kamil Jońca wrote:
> to...@tuxteam.de writes:

[...]

> > and of course, if you are using a desktop environment and NetworkManager
> > or systemd-networkd, it's probably better to go with the flow and let
> > them do.
> 
> About year ago none of them was able to handle my config.
> (Some interfaces used by vms , and proper snat for them.)

I've supported those only for pretty bog standard setups. Mainly end users
who have to cope with longer stretches without local friendly hackers.

I don't believe they are useful for special situations or knowledgeable
users.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Predictable network device names [was: Please help me identify package so I can report an important bug

2024-06-12 Thread Kamil Jońca
to...@tuxteam.de writes:

> On Thu, Jun 13, 2024 at 06:30:27AM +0200, to...@tuxteam.de wrote:
>
> [following up on myself, bad style, I know]
>
>> For my laptop, I very much prefer to say "sudo ifup eth0" than to
>> say "sudo ifup en0ps&&@*#!☠" thankyouverymuch :)
>
> and of course, if you are using a desktop environment and NetworkManager
> or systemd-networkd, it's probably better to go with the flow and let
> them do.

About year ago none of them was able to handle my config.
(Some interfaces used by vms , and proper snat for them.)


KJ

-- 
http://wolnelektury.pl/wesprzyj/teraz/



Predictable network device names [was: Please help me identify package so I can report an important bug

2024-06-12 Thread tomas
On Thu, Jun 13, 2024 at 06:30:27AM +0200, to...@tuxteam.de wrote:

[following up on myself, bad style, I know]

> For my laptop, I very much prefer to say "sudo ifup eth0" than to
> say "sudo ifup en0ps&&@*#!☠" thankyouverymuch :)

and of course, if you are using a desktop environment and NetworkManager
or systemd-networkd, it's probably better to go with the flow and let
them do.

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Please help me identify package so I can report an important bug

2024-06-12 Thread tomas
On Wed, Jun 12, 2024 at 03:16:41PM -0400, Greg Wooledge wrote:
> On Wed, Jun 12, 2024 at 09:01:44PM +0200, to...@tuxteam.de wrote:

[...]

> > Mine loks like this:
> > 
> >   GRUB_CMDLINE_LINUX_DEFAULT="quiet net.ifnames=0"
> 
> People who are thinking of doing this should take a moment to consider
> whether it will be better or worse than the default.

Absolutely. I did, and I decided that in my case, this is the better
choice...

> For a machine that has exactly one ethernet interface, this is a vast
> improvement over the default.  Your interface will always be named
> "eth0" no matter what crazy things happen on the PCI bus.

...but it's not always, as you say.

> For a machine with multiple interfaces, however, the original problem
> that "predictable interface names" were supposed to solve is still an
> issue.  The kernel may not assign the names in the same order every
> time you boot.  In that situation, "net.ifnames=0" is not likely to
> be an improvement.  You'd be better off using systemd.link(5) files to
> customize your interface names according to your own specific needs.

I think PCI is not the worst offender. The worst is if you have a bunch
of adapters hanging off an USB tree. Then, as they say, God does play
dice :-)

Back Then (TM) (I think it was a Debian 3.x aka Sarge), a bunch of
us cobbled a "router thingy" together on some off-the-shelf hardware.
It had four Ethernets hanging off whatever PC bus was fashionable
back then (too lazy to look it up).

Not many of those were sold, luckily :-)

One was for "the bad Internet", the other three for "the inside".
Our big fear was that, after a BIOS upgrade the interfaces would
come up in a mangled order. That would have been a good application
of this scheme (provided it works at all: I'm somewhat sceptic.
Hardware and firmware are known to do... things).

We ended up going by the card's MAC addresses, at the price of
having a set up step on assembly. But then, if you change one
Ethernet card...

Alas, you can't do it right.

For my laptop, I very much prefer to say "sudo ifup eth0" than to
say "sudo ifup en0ps&&@*#!☠" thankyouverymuch :)

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Please help me identify package so I can report an important bug

2024-06-12 Thread debian-user
Richard  wrote:
> Good catch. With the title of this thread and not seeing any proper
> description of what's actually wrong on GitHub, I figured the change
> of the adapter name was meant. Yes, with MAC randomization, that's
> what you'll get. But it's nothing Debian defaults to. So question is,
> can this be disabled on Proxmox? But with this hint, it should be
> easy enough to figure out if this can be deactivated on the affected
> systems, and if not the bug reports must be against these issues, as
> Debian itself doesn't do such things. If it is an issue with Debian
> preventing the disablement, the devs need to talk to each other.
> 
> Richard
> 
> Am Mi., 12. Juni 2024 um 17:10 Uhr schrieb Jeffrey Walton <
> noloa...@gmail.com>:  
> 
> > The random MAC address discussed in the bug report (with mention of
> > Network Manager) could be
> > <
> > https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/
> >   
> > >.  
> >
> > Jeff

I think before anybody else suggests anything, they should read
https://lore.kernel.org/netdev/20240326092459.gg403...@kernel.org/T/



Re: Please help me identify package so I can report an important bug

2024-06-12 Thread Greg Wooledge
On Wed, Jun 12, 2024 at 09:01:44PM +0200, to...@tuxteam.de wrote:
> No need. You can have your traditional names (I do). Just add
> "net.ifnames=0" (if necessry separated by a space, should
> other stuff be already there) to your GRUB_CMDLINE_LINUX_DEFAULT
> in your /etc/default/grub, then ru update-grub.
> 
> Mine loks like this:
> 
>   GRUB_CMDLINE_LINUX_DEFAULT="quiet net.ifnames=0"

People who are thinking of doing this should take a moment to consider
whether it will be better or worse than the default.

For a machine that has exactly one ethernet interface, this is a vast
improvement over the default.  Your interface will always be named
"eth0" no matter what crazy things happen on the PCI bus.

For a machine with multiple interfaces, however, the original problem
that "predictable interface names" were supposed to solve is still an
issue.  The kernel may not assign the names in the same order every
time you boot.  In that situation, "net.ifnames=0" is not likely to
be an improvement.  You'd be better off using systemd.link(5) files to
customize your interface names according to your own specific needs.

> > > https://wiki.debian.org/NetworkInterfaceNames



Re: Please help me identify package so I can report an important bug

2024-06-12 Thread tomas
On Wed, Jun 12, 2024 at 02:30:40PM -0400, Roy J. Tellason, Sr. wrote:
> On Wednesday 12 June 2024 06:54:54 am Richard wrote:
> > But also, just
> > searching the web for this topic, you should have come across this
> > answering your questions: https://wiki.debian.org/NetworkInterfaceNames
> > 
> 
> Wow.  Just wow...
> 
> That sort of thing just drives me crazy!  :-)
> 
> I can see sticking with older versions of some things.

No need. You can have your traditional names (I do). Just add
"net.ifnames=0" (if necessry separated by a space, should
other stuff be already there) to your GRUB_CMDLINE_LINUX_DEFAULT
in your /etc/default/grub, then ru update-grub.

Mine loks like this:

  GRUB_CMDLINE_LINUX_DEFAULT="quiet net.ifnames=0"

Cheers
-- 
t


signature.asc
Description: PGP signature


Re: Please help me identify package so I can report an important bug

2024-06-12 Thread Roy J. Tellason, Sr.
On Wednesday 12 June 2024 06:54:54 am Richard wrote:
> But also, just
> searching the web for this topic, you should have come across this
> answering your questions: https://wiki.debian.org/NetworkInterfaceNames
> 

Wow.  Just wow...

That sort of thing just drives me crazy!  :-)

I can see sticking with older versions of some things.

-- 
Member of the toughest, meanest, deadliest, most unrelenting -- and
ablest -- form of life in this section of space,  a critter that can
be killed but can't be tamed.  --Robert A. Heinlein, "The Puppet Masters"
-
Information is more dangerous than cannon to a society ruled by lies. --James 
M Dakin



Re: Please help me identify package so I can report an important bug

2024-06-12 Thread Richard
Good catch. With the title of this thread and not seeing any proper
description of what's actually wrong on GitHub, I figured the change of the
adapter name was meant. Yes, with MAC randomization, that's what you'll
get. But it's nothing Debian defaults to. So question is, can this be
disabled on Proxmox? But with this hint, it should be easy enough to figure
out if this can be deactivated on the affected systems, and if not the bug
reports must be against these issues, as Debian itself doesn't do such
things. If it is an issue with Debian preventing the disablement, the devs
need to talk to each other.

Richard

Am Mi., 12. Juni 2024 um 17:10 Uhr schrieb Jeffrey Walton <
noloa...@gmail.com>:

> The random MAC address discussed in the bug report (with mention of
> Network Manager) could be
> <
> https://blogs.gnome.org/thaller/2016/08/26/mac-address-spoofing-in-networkmanager-1-4-0/
> >.
>
> Jeff
>


Re: Please help me identify package so I can report an important bug

2024-06-12 Thread Jeffrey Walton
On Wed, Jun 12, 2024 at 10:33 AM Richard  wrote:
>
> Question is, does it make that much sense to report it to Debian directly? 
> Are you encountering this issue on Debian itself or 
> Armbian/Raspbian/whatever? You reported this to the Raspberry Pi GitHub, so 
> I'd expect them to take this up with the upstream devs themselves, so by the 
> time Trixie is being released, it may already be included.
>
> But besides that, what you describe in the first link sounds to me not like a 
> bug, but as a well thought-through decision. Network adapter names like eth0 
> have been dropped with Debian 11 (I think, maybe even 10). So don't get your 
> hopes up too high to ever see this coming back. But also, just searching the 
> web for this topic, you should have come across this answering your 
> questions: https://wiki.debian.org/NetworkInterfaceNames

The random MAC address discussed in the bug report (with mention of
Network Manager) could be
.

Jeff



Re: Please help me identify package so I can report an important bug

2024-06-12 Thread Richard
Question is, does it make that much sense to report it to Debian directly?
Are you encountering this issue on Debian itself or
Armbian/Raspbian/whatever? You reported this to the Raspberry Pi GitHub, so
I'd expect them to take this up with the upstream devs themselves, so by
the time Trixie is being released, it may already be included.

But besides that, what you describe in the first link sounds to me not like
a bug, but as a well thought-through decision. Network adapter names like
eth0 have been dropped with Debian 11 (I think, maybe even 10). So don't
get your hopes up too high to ever see this coming back. But also, just
searching the web for this topic, you should have come across this
answering your questions: https://wiki.debian.org/NetworkInterfaceNames

Richard

Am Mi., 12. Juni 2024 um 12:43 Uhr schrieb Peter Goodall <
pjgood...@gmail.com>:

> Hello,
>
> This  bug, or a close relative, has already been reported in
> https://github.com/raspberrypi/bookworm-feedback/issues/239
> as 'Predictable network names broken for ASIX USB ethernet in kernel
> 6.6.20'
>
> I added a comment reporting my experience in Proxmox here:
>
> https://github.com/raspberrypi/bookworm-feedback/issues/239#issuecomment-2162166863
>
> Because it happens in proxmox and rpi I assume its Debian or higher. I
> have not reported a Debian bug before...
>
> Thanks,
> --Peter G
>


Please help me identify package so I can report an important bug

2024-06-11 Thread Peter Goodall
Hello,

This  bug, or a close relative, has already been reported in
https://github.com/raspberrypi/bookworm-feedback/issues/239
as 'Predictable network names broken for ASIX USB ethernet in kernel 6.6.20'

I added a comment reporting my experience in Proxmox here:
https://github.com/raspberrypi/bookworm-feedback/issues/239#issuecomment-2162166863

Because it happens in proxmox and rpi I assume its Debian or higher. I have
not reported a Debian bug before...

Thanks,
--Peter G


  1   2   3   4   5   6   7   8   9   10   >