Re: [DNG] The real reason I like Linux

2020-03-12 Thread onefang
On 2020-03-12 22:59:28, Steve Litt wrote:
> Now the guys from FreeDesktop would read this email and wring their
> hands: Oh, no, your kludge involves programming, and most people can't
> do that.
> 
> Oh really? 12 lines of code and they can't do it (or have a friend help
> do it)? FreeDesktop.Org doesn't like me doing 90 minutes of programming
> (and actually Lego(R) block assembly). Their preferred method goes
> something like this:
> 
> * Use Gnome.
> * Find Gnome software that solves your problem:
>   - Ask your LUG
>   - Ask on stackoverflow
>   - Read every page on FreeDesktop.Org
>   - Spend a day doing web searches
> * Test the found softwares for suitability
>   - If it fails a requirement, ask around for a fix
>   - Experiment, experiment, experiment
> * Install the necessary softwares
>   - Adjust your workflow to comply with the softwares
>   - Weave yourself through and around all the software
> requirements
> 
> Better yet, with the FreeDesktop.Org way, there's ongoing maintenance,
> because every time some library author changes his library, your
> FreeDesktop.Org style "solution" breaks and you need to beg for a
> special package to fix your problem.
> 
> The FreeDesktop guys are geniuses. They can make specifications that
> can turn the most attentive reader into a bowl of jelly. They can
> implement sixteen levels of pointers and events and callbacks far
> beyond the understanding of mortal man.

After implementing some of their protocols, I started calling FreeDesktop.Org
FatDesktop.Obscenities.

-- 
A big old stinking pile of genius that no one wants
coz there are too many silver coated monkeys in the world.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] The real reason I like Linux

2020-03-12 Thread Steve Litt
Hi all,

A recent discussion here reminded me why I really like Linux. And then
a couple hours later I had a need...

I have four 8 foot shelving units: Three with seven shelves and one
with eight. Over the years, stuff's just been crammed into them, and
the situation is busting my productivity too much. So I made a diagram
of the four units, lettered A-D, each with shelves 1-7 (or 1-8 for one
of them). And because they're 4 feet wide, each shelf was divided into
l,c, and r (Left, Center, and Right).

As I cleared off shelves and put stuff in their new right places, I
realized those new right places would be forgotten. I needed a list of
shelf locations and the items stored therein. Because I'm the
originator of VimOutliner and feel very at home with tab indented
outlines, I am making the list in VimOutliner.

But there's a problem. There's no quick, practical way I'll be able to
search for the items at a location, or search for the location of an
item. No problem. Two AWK programs: One to write first by location and
to the right list the item, and another to write first by item and
later (thanks to AWK's printf() formatting) a nicely formatted
location. Pipe the output of either into the sort command, and I have a
nice, sorted list.

But geez, I don't want to look through a less session for an item or
location: I want a better interface. No problem, I piped the output of
sort into dmenu, which specializes in narrowing down lists using
keystrokes. Now three or four keystrokes and I can find my item. And
dmenu has a feature where the string you type doesn't even need to be
at the start of the string you're searching for. I could type "ball"
and get ball, baseball, baseball bat, etc.

But I don't want to run a command every time I need to search. No
problem: I'll have a special hotkey for this functionality that uses
either dmenu or my homegrown UMENU2 to bring up the list to narrow down.

Check this out:

==
#!/usr/bin/gawk -We

function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s }
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s }
function trim(s) { return rtrim(ltrim(s)); }

/^[^\t]/ {unit = trim($0)}
/^\t[^\t]/ {shelf = trim($0)}
/^\t\t[^\t]/ {side = trim($0)}
/^\t\t\t/ {printf("%-28s||| %s%s%s\n", trim($0),unit,shelf,side)}
==

The preceding is executed by mini-shellscript find_loc.sh, as follows:


==
#!/bin/sh
cat shelf_locs.otl | ./yield_loc.awk | sort | \
dmenu -i -l 20 -fn "Ubuntu Mono:style=bold:size=16" \
-nb yellow -nf blue -sb darkred -sf lightcyan
==

It's called POSIX. With POSIX, I always have shellscripts, AWK and sort
ready to do my work for me. With POSIX, I can pipe a stdout into the
next stdin. With POSIX, I can plug in anything conforming to POSIX,
such as dmenu, a genius of a program that makes many hard user
interface situations simple.

I like Linux because it's POSIX. I could just as easily use OpenBSD,
but I want a works-every-time virtual machine, Docker is nice, Linux
runs a few more programs than OpenBSD, and with Linux I don't have to
deal with Theo and the boys. Hey, they're great guys and highly
skilled, but they're just not my type.

Now the guys from FreeDesktop would read this email and wring their
hands: Oh, no, your kludge involves programming, and most people can't
do that.

Oh really? 12 lines of code and they can't do it (or have a friend help
do it)? FreeDesktop.Org doesn't like me doing 90 minutes of programming
(and actually Lego(R) block assembly). Their preferred method goes
something like this:

* Use Gnome.
* Find Gnome software that solves your problem:
- Ask your LUG
- Ask on stackoverflow
- Read every page on FreeDesktop.Org
- Spend a day doing web searches
* Test the found softwares for suitability
- If it fails a requirement, ask around for a fix
- Experiment, experiment, experiment
* Install the necessary softwares
- Adjust your workflow to comply with the softwares
- Weave yourself through and around all the software
  requirements

Better yet, with the FreeDesktop.Org way, there's ongoing maintenance,
because every time some library author changes his library, your
FreeDesktop.Org style "solution" breaks and you need to beg for a
special package to fix your problem.

The FreeDesktop guys are geniuses. They can make specifications that
can turn the most attentive reader into a bowl of jelly. They can
implement sixteen levels of pointers and events and callbacks far
beyond the understanding of mortal man.

But I'll tell you the real geniuses. Thompson. Kernighan. Ritchie. Aho.
They knew you need to solve problems fast, so they made tools enabling
any fool to do just that. No need for event loops with callbacks and
message routing. And they made their tools so 

Re: [DNG] Solving simple problems in amazingly complicated ways

2020-03-12 Thread John Morris
On Thu, 2020-03-12 at 21:45 +, Rainer Weikusat via Dng wrote:
> - the sole purpose of this text is for the amusement of people who
> ever
>   had to find a (preferably simple) solution for a complicated problem
> -
> 
> Problem I had to deal with since yesterday: Some Debian 10 system (use
> of systemd mandated) installation I've created was to be captured by a
> certain image capturing tool running on Windows. As it turned out to
> be,
> this capturing tool has no support for Linux swap partitions and thus,
> tries to capture them by doing a sector-by-sectory copy of random junk
> which won't ever be of any use again.
> 
> Proposed solution: Turn that into an ext4 filesystem, record the UUID,
> run a script at boot to convert it back to a swap partition. This
> could
> have been solved by suitable manipulation of /etc/rcS-symlinks but the
> mere thought of something as unsophisticated at that would cause
> systemd
> developers to start spinning until the reach escape velocity, never to
> be seen again - and who could possibly want that.

How about a simpler solution?
On shutdown:
1. Capture the label and UUID of the swap partition.
2. Do a swapoff.
3. Zero out the swap partition.
4. Remake it with the same label and UUID.

It will still get a sector by sector copy but assuming it is compressed
it will be of trivial size.

signature.asc
Description: This is a digitally signed message part
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread Steve Litt
On Thu, 12 Mar 2020 11:25:01 +0100
Martin Steigerwald  wrote:

> Hi!
> 
> Just a little rant and feel free to ignore it.
> 
> systemd-homed… I hope none of it is ever implemented to elogind.
> 
> https://www.freedesktop.org/software/systemd/man/systemd-homed.service.html
> 
> https://systemd.io/USER_RECORD/
> 
> (just count the lines of that one… its utterly complex stuff)
> 
> https://www.freedesktop.org/software/systemd/man/homectl.html

If your Linux OS,,,
works too well
Who ya gonna call:
Posix Busters!
 
SteveT

Steve Litt
March 2020 featured book: Troubleshooting: Why Bother?
http://www.troubleshooters.com/twb
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread Dan Purgert
On Mar 12, 2020, Simon Hobson wrote:
> Dan Purgert  wrote:
> 
> > It's certainly useful in a "campus" environment, where you're quite
> > likely at a different computer all the time (i.e. grabbing whatever is
> > free in the computer lab to print your final paper).
> 
> Isn't the answer there to mount your home dir off it's server on
> whatever machine you are using ? Something perfectly doable since ...
> err ... long before I ever got involved with any unix[like] system..

Maybe I'm crossing up Windowsland terminology ... been quite a while
since I've used it.

-- 
|_|O|_| 
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281


signature.asc
Description: PGP signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] Solving simple problems in amazingly complicated ways

2020-03-12 Thread Rainer Weikusat via Dng
- the sole purpose of this text is for the amusement of people who ever
  had to find a (preferably simple) solution for a complicated problem -

Problem I had to deal with since yesterday: Some Debian 10 system (use
of systemd mandated) installation I've created was to be captured by a
certain image capturing tool running on Windows. As it turned out to be,
this capturing tool has no support for Linux swap partitions and thus,
tries to capture them by doing a sector-by-sectory copy of random junk
which won't ever be of any use again.

Proposed solution: Turn that into an ext4 filesystem, record the UUID,
run a script at boot to convert it back to a swap partition. This could
have been solved by suitable manipulation of /etc/rcS-symlinks but the
mere thought of something as unsophisticated at that would cause systemd
developers to start spinning until the reach escape velocity, never to
be seen again - and who could possibly want that.

So, "we" have to create a systemd unit file to accomplish this by
defining suitable dependencies. It looks like this:

In a section named [Unit], "we declare"

Requires=local-fs.target

This means local-fs.target ("mount local filesystems") has to be started
before us and we don't want to run if it fails. "We then declare"

After=local-fs.target

which means "we don't want to run until local filesystems have actually
been mounted". Then, "We declare"

Before=basic.target

"basic system initialization" ("ready to start servers") shall not be
considered complete until our task is done. Lastly, "we declare"

DefaultDependencies=no

ie, despite we're a service (as determined by the exension of our file
--- pray tell me where this concept came from?) we do want to run
before basic.target and not after it.

Now, we have to switch sections as [Unit] starts to become
boring. Hence, in [Install], we declare

WantedBy=basic.target

Brazenly, we claim basic system initialization "wants us", hence, we
will be started, but if we fail, system boot will continue.

After this (and some other things) were put into a service file in a
suitable location (/etc/systemd/system), it only takes a

systemctl enable name.service

to make it active on boot (by creating some symlinks, mind
you)

- helpfully, if any directives were misspelled or put into the
wrong section, the systemctl call will log a warning message to syslog
(exclusively) and succeed nevertheless -

and - amazingly - systemd can now figure out the required boot ordering
all on its own.

How very soffissicated.
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread John Morris
On Thu, 2020-03-12 at 20:21 +, Simon Hobson wrote:
> Dan Purgert  wrote:
> 
> > It's certainly useful in a "campus" environment, where you're quite
> > likely at a different computer all the time (i.e. grabbing whatever
> > is
> > free in the computer lab to print your final paper).
> 
> Isn't the answer there to mount your home dir off it's server on
> whatever machine you are using ? Something perfectly doable since ...
> err ... long before I ever got involved with any unix[like] system.

Yeah, we have had NFS homes here for literally decades.  It is great. 
Here at a small rural public library we run a split network for staff
and patrons.  Both have an NFS server and mount /home/${USER} from it. 
All are imaged from one master so updates are also automatic.  Anyone
can log onto any machine on the same side of the network and it just
works.  If a machine fails we throw a spare on the desk and it just
works.

So of course it has to be reimagined.

signature.asc
Description: This is a digitally signed message part
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread John Morris
On Thu, 2020-03-12 at 11:14 +, Rowland penny via Dng wrote:
> 
> Here we go again, reinventing the wheel ;-)
> 
> Windows has something similar, they call it roaming profiles and that 
> has its problems.

It isn't exactly reinventing the wheel, it is more like porting the
wheel.  The fact Windows has a similar feature is exactly the point, it
has always been the point.  RedHat/IBM is working with Microsoft to
prepare the way for what anyone paying attention knows is coming. 
Maintaining the Windows kernel and device drivers is inefficient and is
gaining them nothing at this point.  So make Linux + userland feature
complete enough to simply port the Windows UI to it and merge it into
one new platform.  If they could bolt Win32 onto NT they can bolt it
onto Linux + Systemd + Wayland + *kit + yet more RH cruft to make it all
work.

The sooner we realize that RedHat is leading nothing less than a hard
fork of Linux + GNU into Linux + Windows, exactly like Google created
Linux + Android btw, the less damage to the Linux + GNU/UNIX side of the
fork.  It is long past the point where we need to move our tree away
from RedHat and everything it has infected.  If that means adopting
large parts of modern BSD, so be it.  Guess that depends on whether
there is anyone left at GNU who can make strategic decisions and just
how many "GNU" projects are effectively RedHat ones now.  Stallman being
#meetoo purged was probably an intentional thing.

Once we finally complete the fork everyone will be happier, the world
will be a better place, etc.  Window atop Linux will even be a better
product.

signature.asc
Description: This is a digitally signed message part
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread Simon Hobson
Dan Purgert  wrote:

> It's certainly useful in a "campus" environment, where you're quite
> likely at a different computer all the time (i.e. grabbing whatever is
> free in the computer lab to print your final paper).

Isn't the answer there to mount your home dir off it's server on whatever 
machine you are using ? Something perfectly doable since ... err ... long 
before I ever got involved with any unix[like] system.

Simon

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread spiralofhope
On Thu, 12 Mar 2020 11:25:01 +0100
Martin Steigerwald  wrote:

> To use the own home directory on different laptops? 

This is a first-world problem if I've ever heard one, and a sad waste of
manpower when there are other programming problems.

___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread Dan Purgert
On Mar 12, 2020, Rowland penny via Dng wrote:
> Windows has something similar, they call it roaming profiles and that has
> its problems.

It's certainly useful in a "campus" environment, where you're quite
likely at a different computer all the time (i.e. grabbing whatever is
free in the computer lab to print your final paper).

But that's about the extent of it.  Outside of college, I've only worked
one (1) job where the team would cycle through "whatever was available",
and that was while our real area (with close-enough-to-assigned seating)
was getting redone after a small incident with a water line.

> 
> Why does it need over 21 thousand lines of code to do what I can do with
> small bash scripts and pam-mount ?

Because you can't hide data analytics in a 10 line bash script.

(The above is tongue in cheek.  I really fear the day I'm proven right).

-- 
|_|O|_| 
|_|_|O| Github: https://github.com/dpurgert
|O|O|O| PGP: 05CA 9A50 3F2E 1335 4DC5  4AEE 8E11 DDF3 1279 A281


signature.asc
Description: PGP signature
___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread Rowland penny via Dng

On 12/03/2020 10:25, Martin Steigerwald wrote:

Hi!

Just a little rant and feel free to ignore it.

systemd-homed… I hope none of it is ever implemented to elogind.

https://www.freedesktop.org/software/systemd/man/systemd-homed.service.html

https://systemd.io/USER_RECORD/

(just count the lines of that one… its utterly complex stuff)

https://www.freedesktop.org/software/systemd/man/homectl.html

NIH syndrome & what can even possibly go wrong?

I believe it is just a question of time until the first *grave* security
issue with that is revealed.

And the intended application of it: To use the own home directory on
different laptops? Why… at all… would I? Especially when one of those
laptops would be a device that I have otherwise no control over? I'd say
either I installed the laptop with Linux and thus trust it *or* it does
not ever see my $HOME.

But right on… extend Systemd until absurdity… maybe more people will see
the insanity in it.

Best,


Here we go again, reinventing the wheel ;-)

Windows has something similar, they call it roaming profiles and that 
has its problems.


Why does it need over 21 thousand lines of code to do what I can do with 
small bash scripts and pam-mount ?


Rowland


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


Re: [DNG] What can even possibly go wrong?

2020-03-12 Thread Didier Kryn

Le 12/03/2020 à 11:25, Martin Steigerwald a écrit :

Hi!

Just a little rant and feel free to ignore it.

systemd-homed… I hope none of it is ever implemented to elogind.

https://www.freedesktop.org/software/systemd/man/systemd-homed.service.html

https://systemd.io/USER_RECORD/

(just count the lines of that one… its utterly complex stuff)

https://www.freedesktop.org/software/systemd/man/homectl.html

NIH syndrome & what can even possibly go wrong?

I believe it is just a question of time until the first *grave* security
issue with that is revealed.

And the intended application of it: To use the own home directory on
different laptops? Why… at all… would I? Especially when one of those
laptops would be a device that I have otherwise no control over? I'd say
either I installed the laptop with Linux and thus trust it *or* it does
not ever see my $HOME.

But right on… extend Systemd until absurdity… maybe more people will see
the insanity in it.

Best,


    It might be considered a provocation to gratuitously generate such 
compexity/junk and take control over the user/owner. What's the next 
step? systemd-instagram and instagram-ctl? Require a Facebook account to 
create a user home?


    Many systemd afficionados of today would have laughed with us if 
these projects had ever been proposed 10 years ago. They will now accept 
them withouth question.


        Didier


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng


[DNG] What can even possibly go wrong?

2020-03-12 Thread Martin Steigerwald
Hi!

Just a little rant and feel free to ignore it.

systemd-homed… I hope none of it is ever implemented to elogind.

https://www.freedesktop.org/software/systemd/man/systemd-homed.service.html

https://systemd.io/USER_RECORD/

(just count the lines of that one… its utterly complex stuff)

https://www.freedesktop.org/software/systemd/man/homectl.html

NIH syndrome & what can even possibly go wrong?

I believe it is just a question of time until the first *grave* security 
issue with that is revealed.

And the intended application of it: To use the own home directory on 
different laptops? Why… at all… would I? Especially when one of those 
laptops would be a device that I have otherwise no control over? I'd say 
either I installed the laptop with Linux and thus trust it *or* it does 
not ever see my $HOME.

But right on… extend Systemd until absurdity… maybe more people will see 
the insanity in it.

Best,
-- 
Martin


___
Dng mailing list
Dng@lists.dyne.org
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng