[Hardware support] Dell Vostro 15 3530

2024-07-17 Thread Erik Eduardo Alcala Salero
Good day,
I have been using Debian 12 stable in my dell vostro 15 3530, I wanted to ask 
if some one else is using this machine or having issues with the keyboard, I 
have manjaro installed also, when I boot and see the manjaro boot-loader the 
keyboard does not work, this was not the case in the past, just maybe since 3 
weeks ago when the problem started: I boot, some keys in the keyboard do not 
work and I have restart several times until I can press the enter key to log in 
into debian, any help is much appreciated.
I'm willing to troubleshoot and provide any info necessary, thanks in advance ! 
Please let me know which commands or logs are needed to check this. Help is 
much appreciated ! :)


Re: Help: disk swap

2022-07-27 Thread Erik Mathis
I would look at the UEFI vs BIOS boot options in the "backup" server and
compare it to the "broken" server and make sure they are the same. Also
check for BIOS updates and such.


-Erik-


On Wed, Jul 27, 2022 at 7:59 AM tony  wrote:

> Hi,
>
> I turned on my main home server after a few weeks absence,  and got
> smoke from its power supply. Fortunately, I have a backup system, which
> does work; both are running Debian 10, so I swapped use to that machine.
> and am able to work with that, but some of the files and settings are a
> bit out of date.
>
> I decided to move the disk from the broken machine to the backup, but on
> booting I'm dropped into a grub screen saying disk id  not
> found. Not entirely surprising perhaps.
>
> So, how do I get it to recognize, and boot from the old disK.
>
> Cheers, Tony
>
>


Key decision makers

2022-01-19 Thread Erik Thomas
Hi,



If you are getting responses but not leads from your marketing database you 
need to use our marketing database.



Tailor your marketing campaigns and sales outreach based on Industry / SIC 
Code, Location (State / City), Revenue per year, Employees and Job titles: 
Decision makers, Marketing, IT, Purchasing, HR, Finance etc.



Let me know your target industries and job titles.



We will run the number of people you can contact by email & phone and send the 
list details.



Look forward to your response.



Regards,

Erik Thomas | Marketing Consultant



Reply only opt-out in the subject line to remove from the mailing list.


Debian 11 on Raspberry Pi3 Can't login

2021-10-05 Thread Jan-Erik Schröder
Good Morning,

yesterday we installed Debian 11 on our raspberry pi3's as part of our
Youth Programming Course and cannot login. Thank you in advance

Greetings,
Schröder


Re: Preseeding Postfix for No configuration

2020-12-16 Thread Erik




On 16-12-2020 18:24, Dan Ritter wrote:

Erik wrote:

I am doing an unattended install of Debian Buster with postfix being
added using apt-install in the preseed/late_command.

Without a postfix preseed definition in my preeseed file, I get the expected
question about what kind of mail configuration I would like.
When I select "No configuration", installation continues as expected and I
end up with a postfix installation without main.cf and without master.cf.

But when I preseed postfix with "d-i postfix/main_mailer_type select No
configuration"
as both debconf-get-selections and
https://preseed.debian.net/debian-preseed/buster/amd64-main-full.txt
confirm I should do, I get an extra question asking me about the system mail
name.
Clearly, this question is out of place for a "No configuration" install.
And as a result I end up with a main.cf and a master.cf, which contradicts
the "No configuration".

So something is going wrong. Apparently the preseeded selection for
configuration type is accepted, as that question is not asked, but it
is not interpreted as "No configuration".

If you don't want any configuration, you must be supplying
configuration later on -- so why don't you refrain from
installing postfix via the preseed, and install it later when
you are ready to configure it?


Because the configuration is preseeded as well. The installl is entirely 
unattended
and the apt-install is supposed to only install Postfix itself. After 
that, the configuration

will be added automatically too.

Of course I can overwrite the files that get installed, but that's not 
the point here.
The point is that there is a bug somewhere that makes the installer do 
the wrong

thing when the same answer as given manually, is given via preseeding.
The same answer should not lead to different results.

I can deal with this bug, now I know it's there.

Erik



Preseeding Postfix for No configuration

2020-12-16 Thread Erik

Hi,

I am not sure where to go with this. It relates to postfix, but is not a 
problem

with postfix itself.

May one of you can help me along.

I am doing an unattended install of Debian Buster with postfix being
added using apt-install in the preseed/late_command.

Without a postfix preseed definition in my preeseed file, I get the expected
question about what kind of mail configuration I would like.
When I select "No configuration", installation continues as expected and I
end up with a postfix installation without main.cf and without master.cf.

But when I preseed postfix with "d-i postfix/main_mailer_type select No 
configuration"
as both debconf-get-selections and 
https://preseed.debian.net/debian-preseed/buster/amd64-main-full.txt
confirm I should do, I get an extra question asking me about the system 
mail name.

Clearly, this question is out of place for a "No configuration" install.
And as a result I end up with a main.cf and a master.cf, which contradicts
the "No configuration".

So something is going wrong. Apparently the preseeded selection for
configuration type is accepted, as that question is not asked, but it
is not interpreted as "No configuration".

Any suggestions as to what I might be doing wrong, or where
to better ask my question if this is not the right place?

regards,
Erik



Re: how to seamlessly play audio clip

2020-02-08 Thread Erik Christiansen
On 07.02.20 23:53, Long Wind wrote:
> i use mplayer -loop 0 to play white noise(it might help sleep by masking 
> other noise)
> but when it reach end and restart to play againthere's some interval, which 
> isn't desirable
> any mplayer option or other player i can use so that it plays seamlessly??

I find it very effectively masks barking neighbourhood dogs and dripping
water. Most pleasant has been a Surf Sound Generator I built from a kit
around 40 years ago. It adds 3 long-period (several seconds) RC
oscillators, which amplitude modulate the slightly pink noise. Their
different periods keep them out of phase, like random waves whooshing up
a beach.

A little bit of low-pass filtering of white noise makes it a bit pink. I
find modest low frequency emphasis more relaxing - and perhaps a little
better at masking, as it is the low frequencies which travel.

And it's cheaper than double or triple glazing.

Erik



Re: Howto?

2020-01-26 Thread Erik Christiansen
On 26.01.20 03:03, Gene Heskett wrote:
> Greetings all;
> 
> Trying to sort out how to xz compress.  But xz is rejecting directories, 
> like it expects tars output as its input. And the  manpage is silent on 
> redirections.
> 
> I want to compress the directory foo into foo.xz, keeping foo as there 
> may be further patches applied in the future.
> 
> Syntax?

Gene,

While the manpage says "xz is a general-purpose data compression tool
with command line syntax similar to  gzip", it appears to lack the -r
option. That'd be why the examples found with a "xz directory
compression" google use tar, I figure. (Like in the old days.)

Now we know what "similar" means.

Erik



Re: Displaying an arbitrary file in _both_ HEX and ASCII

2020-01-25 Thread Erik Christiansen
On 25.01.20 05:51, Richard Owlett wrote:
> My current project is dealing with oddly formatted data. Mostly just plain
> ASCII. Progress on another aspect of my project has made this thread moot.

For the thread, there's also: $ apt-cache search bvi
  bvi - binary file editor

found at: http://bvi.sourceforge.net/

But if it's mostly ASCII, with a few funnies, then I'd just vim the
file, and type ga to display the decimal, octal, and hex value of the
character under the cursor. To insert funny characters, I've found
digraphs sufficient. (Mapped more mnemonically if used often, e.g. ;e for æ)

And for a quick hex/ascii dump of a file, I've used this for over 30 years:

$ od -xc < /etc/issue
000654469626e614720554e4c2f6e697875
  D   e   b   i   a   n   G   N   U   /   L   i   n   u   x
02037205c20206e6c5c0a0a
  7   \   n   \   l  \n  \n
032

There are options for fudging the offsets, if needed.

Erik



Re: sed question

2019-12-06 Thread Erik Christiansen
On 06.12.19 14:40, songbird wrote:
> Greg Wooledge wrote:
> ...
> > Ideally, you'd just stop trying to use sed with user-supplied variables
> > injected into the code.  Sed was never built to be safe for that kind of
> > work.
> 
>   sed was designed to operate on streams.  a sequence of 
> characters is a stream.  i don't see any reason why 
> putting the variable into the middle of that expression 
> means anything different.

If the sed implementation of variable regexes proves problematic, then
there's awk with its Dynamic Regexps. (Section 2.8 of the pdf manual
floating about out there.)

With its C-like syntax, it's less write-only than perl, perhaps because
it is of the same vintage as sed. (And from the same stable.) It does
admittedly tend to view its input stream a line at the time.

Erik



Re: Is this ALL good advise

2019-12-05 Thread Erik Christiansen
On 04.12.19 17:33, Gene Heskett wrote:
> My point exactly.  That means two accounts at your isp, I think mine 
> charges only after the 2nd one, and two active fetchmail/procmail 
> sessions = more trouble than it worth. Me? I got the heck off gmail 
> years ago for lack of privacy reasons, and I frankly don't understand 
> why the rest of the planet hasn't bailed out for the same reasons.

Hi Gene, I can't fault the idea of avoiding gmail.

Incidentally, one fetchmail/procmail session will handle a bunch of mail
sources, given more than one "poll" line in .fetchmailrc, AFAIR. And
multiple recipients just needs multidrop-mode, which it enters on
finding more than one "user" line in the config file. So it should be
pretty straightforward. If you really wanted to do it, that is.

Erik



Re: is it possible run 32-bit app on 64-bit amd system??

2019-08-13 Thread Erik Christiansen
On 13.08.19 07:47, rhkra...@gmail.com wrote:
> On Monday, August 12, 2019 10:56:22 PM riveravaldez wrote:
> > >> btw which option should i add to mplayer command line
> > >> so that it play only audio part (not video part)  of a file?
> > 
> > $ mplayer -novideo file
> 
> I'm in a strange mood today (I end up here often) -- I like to see things 
> like 
> that written as:
> 
> mplayer -novideo 
> 
> or 
> 
> mplayer -novideo 
> 
> It makes it more clear what is "fixed text" and what is a variable / 
> parameter.

Yes, to those of us who have done a bit of reading, especially from the
days when clarity of written expression was more highly valued. (Or at
least given greater formality.)

But not everyone has been exposed to the above long and widely established
substitute for italics or similar to denote non-literal text, so your
"teaching moment" is an act of generosity.

Erik



Re: Error with logrotate.

2019-08-12 Thread Erik Christiansen
On 13.08.19 00:38, Gene Heskett wrote:
> Its good that we can fix it, BUT IF you are going to restrict where we 
> keep logfiles like this then FIX the /var/log perms so that fetchmail, 
> procmail, spamassassin, clamav and its ilk, running as the user can 
> access /var/log to keep its logs.  Debian's legendary paranoia about who 
> can write a log in /var/log has long since forced most of us that want 
> that log, into moving it to /home/username/log and reprogramming 
> logrotate to maintain it there years ago.

Nuthin' wrong with that. An individual user's logs in his tree, and
system logs in theirs. No effort:

$ grep log .fetchmailrc .procmailrc
.fetchmailrc:set logfile "/tmp/fetchmail_log"
...
.procmailrc:LOGFILE=$MAILDIR/tmp_log.$$
.procmailrc:FINAL_LOG=$MAILDIR/log

If you had a house full of rowdy teenagers, would you really want them
all able to wallop /var/log? And what if it were a tribe of uni
students? (I think I have you sufficiently worried now, Gene.)

Erik
(Who was both, once.)



Re: 3 phase power (was Re: Wireless home LAN - WiFi vs Bluetooth?

2019-07-31 Thread Erik Christiansen
On 30.07.19 11:34, rhkra...@gmail.com wrote:
> Most residential power in the US is created using a single phase transformer 
> (so called because (1) it only takes power from one of the 3 phases mentioned 
> above and (2) darn -- it's a bitch getting old.

Tell me about it. ;-) I'd offer that (2) is simply that there's only one
primary and one secondary, not three of each, on multiple arms of the
core.

> The secondary of that 
> transformer is center tapped with the center tap almost always grounded, such 
> that the other two taps from the secondary both produce 120 volts (RMS 
> nominal), but out of phase with each other by 180 degrees.

Those details on this thread have been interesting, because 120v is unknown
down under - and, I think, in the UK.

Erik



Re: Wireless home LAN - WiFi vs Bluetooth?

2019-07-30 Thread Erik Christiansen
On 29.07.19 20:46, David Wright wrote:
> On Mon 29 Jul 2019 at 18:00:25 (-0400), Gene Heskett wrote:
> > On Monday 29 July 2019 17:26:17 ghe wrote:
> > 
> > > On 7/29/19 1:57 PM, David Wright wrote:
> > > > Irrelevant in a domestic setting: it's illegal to have more than one
> > > > phase in an ordinary house.
> > >
> > > FYI, and significantly OT:
> > >
> > > I don't think that's true in the US.
> 
> IIRC Joe's in the UK. 3-phase there is lethal. 1 is bad enough.

Here in Australia we also have only "240v", generally closer to 230v
nowadays, and domestic 3 phase is no big deal, just a couple of thousand
dollars more, as it's just a 3 phase cable, 3 fuses on the pole instead
of 1, and then what you want to cram in your switchboard. Good for a big
aircon in a big house on a 43°C day. (110°F)

People who have it and a nice big PV array on the roof are allowed to
feed much more power back into the grid than someone with only one
phase. Now that the feed-in tariff is better, some consumers have close
to zero electricity bill, despite using grid power at night. (Much
cheaper than batteries.)

Should have no power-line signal leakage on my new build, it's off-grid,
with a mile to the nearest neighbour. ;-)

Erik



Re: Wireless home LAN - WiFi vs Bluetooth?

2019-07-29 Thread Erik Christiansen
On 29.07.19 14:44, Joe wrote:
> On Mon, 29 Jul 2019 09:34:25 -0400
> Dan Ritter  wrote:
> > 
> > In a single-family house, Powerline is about as secure as wired
> > ethernet: you need to come in and plug something in to spy on
> > it.
> 
> Most people won't have RF blocking filters at their house electricity
> inlet, so there may be some leakage to the next house that's on the
> same phase.

Several of those clamp-on ferrite noise suppression cores, of a size to
fill a partly closed fist, would do some good without requiring wiring
alteration.

> I can get a reliable connection on the end of about 100ft of house and
> extension cable, so I wouldn't be surprised to be able to find a signal
> in another house. 

And ethernet cable is twisted pair, minimising radiation. Power wiring
is just parallel conductors, so a sniffer has more signal to pick up.
Additionally, transmitted power levels in a Powerline network would
likely be higher than on a clean ethernet cable, due to the intermittent
electrical noise found on power circuits, due to switching loads,
motors, etc. (It's either that or retransmit corrupted packets.)

The analog designers in an R lab I worked in about 40 years ago spent
their lunch hours on a powerline intercom. Pushing a good clean signal
through the noise was a challenge.

> Presumably, when we speak of security here, we're not talking about
> accidental reception, wi-fi WEP would be sufficient to prevent this,
> but a deliberate attempt to break in. We could assume that someone
> trying to get into a power-line link would be able to amplify the
> signals involved.

The street wiring would act as an extension of the antenna provided by
the house wiring, and with much larger loop area between conductors,
radiate much better. Acting against that is masking RF noise from
everything else in the street, requiring either selectivity or at least
a capacitive connection in the street or the comfort of a neighbour's
house.

But even if you have a wireless keyboard, the your passwords are out there
several times per day, I figure.

Erik



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-07-16 Thread Erik Josefsson
Hi David, which "driver doesn't seem to have a clue"?

//Erik

sorry for top posting

On 17 July 2019 01:22:52 CEST, David Wright  wrote:
>On Sat 11 May 2019 at 10:10:42 (+0200), Erik Josefsson wrote:
>> […]
>> That encourages me to ask another stupid question: I'd like to know
>> why the "Keyboard model" has to be set before "Keyboard layout" when
>> walking through the dpkg-reconfigure menues?
>> 
>> If it was the other way around, the first choice, "Keyboard layout",
>> could perhaps make an informed selection from the list of "Keyboard
>> models" that could be relevant at all.
>
>I wasn't aware that dpkg-reconfigure keyboard-configuration had
>any decision-making abilities like that. I think it just turns
>multiword descriptive lists into the pithy descriptions, so that
>you don't have to know that a "Generic 105-key (Intl) PC" keyboard
>becomes "pc105" and a Right Alt key for AltGr becomes
>"lv3:ralt_switch".
>
>> In any case, what you care about as a user is "Keyboard layout", and
>> in most cases when you have to make a series of choices, you start
>> with your known knowns, not your known unknowns.
>
>My experience is that Keyboard Models is critical. Without getting
>that correct, defining CapsLock as my Compose key is futile because
>the driver doesn't seem to have a clue where the CapsLock is.
>(That's for an "Acer laptop" PC.)
>
>Cheers,
>David.

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: xfce4-screenshooter does not copy images to clipboard

2019-07-07 Thread Erik Dobák
same behavior with xclip -o --selection clip-board > clip10.txt

On Sun, 7 Jul 2019 at 21:30, Nicolas George  wrote:

> Erik Dobák (12019-07-07):
> > Hi i have this problem for some months now. If i do a screenshot and copy
> > it to clipboard it does not arrive there.
> >
> > Checked by xclip -o > screenshot.txt
> > either there is nothing or something old.
>
> This xclip command does not check the clipboard but the primary
> selection. It may be the source of your confusion. Check the manpage to
> have xclip use the clipboard.
>
> Regards,
>
> --
>   Nicolas George
>


xfce4-screenshooter does not copy images to clipboard

2019-07-07 Thread Erik Dobák
Hi i have this problem for some months now. If i do a screenshot and copy
it to clipboard it does not arrive there.

Checked by xclip -o > screenshot.txt
either there is nothing or something old.

Tested on debian stretch and buster.

I tried to upgrade xfce4-goodies but nothing more recent in testing or
experimental.

How should i proceed?

E


Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-23 Thread Erik Josefsson

On 6/23/19 8:40 AM, Jonas Smedegaard wrote:


Is it meaningful to test the SD cards with an USB-adapter? (the MicroSD
slot would be occupied by the SD card the machine is running from/on)

Testing SD cards on a different controller may help understand
_potential_  features of cards, but not_actual_  reachable potentials.

If you prefer an analogy: Reading in a magazine that some Formel-1
driver can cut a corner while driving 60km/h in same model car as yours
does not mean that you can expect to cut that same corner at that speed:
Depends not only on the vehicle (disk device) but also on the driver!



Sure. I have tried to drive the 4 cards along exactly the same path 
(i.e. flashbench) to reduce my influence on the performance. 
Unfortunately I cannot tell which one is the best from the resulting data.


If the fio benchmark can tell me which card is the best, I will try it 
at some point.






Of those figures, I consider the random ones more important in most
configurations. i.e. if I had to choose between a device that
supported a bit higher sequential read/write but much lower random
read/write, I'd rather have the random read/write, because that
tends to have more impact on interactive usage than sequential.

Yes, going back and forth between Thunderbird and Firefox while
copying text snippets from one app to the other sometimes ends in a
mouse pointer freeze.

That's basically what I do most of the time...

Biggest speed gain (on a limited computer like Teres-I) is likely had
with changing to less ressource hungry tools.

Instead of Firefox try GNOME Web (apt install epiphany-browser).  It
uses the rendering engine "Webkit" so is likely to handle most websites.
For an radically lighter browser rendering fewer real-world websites
properly and with an arguably less friendly user interface, try Surf.



This is very helpful. I have installed epiphany now. Thanks!



A lighter alternative with ok UI and somewhat decent rendering engine is
Netsurf, but unfortunately that one won't make it into Debian Buster.

Instead of Thunderbird try Balsa or Claws Mail.



OK. Thanks!






SD cards tend to have poor random IO speed so I would never use one
for general purpose computing if I could use an HDD or SSD instead.

If random IO speed most likely is the real bottle neck, do you know of
any particular brand/label/kind/category of MicroSD card that is
significantly better than others in that regard?

https://github.com/ThomasKaiser/Knowledge/blob/master/articles/A1_and_A2_rated_SD_cards.md

(this is perhaps 5th time I share that link with you; 2nd on this list)



The article by Thomas Kaiser ends with an open discussion that you can 
probably just as well buy A1 cards made before 2017. The last card I 
bought is neither A1 or A2 but marked with a XC II logo. That particular 
markup is not mentioned in Kaiser's article.


So the article cannot tell me which of my 4 cards is likely to be the 
best for my usecase:


MicroSD SanDisk Extreme PRO  64GB  [3]  XC II
MicroSD SanDisk Extreme PLUS  64GB  [3]  XC I  V30  A2
MicroSD SanDisk Extreme PLUS  32GB  [3]  HC I  V30  A1
MicroSD SanDisk Ultra  32GB  [1]  HC I  (10)  A1



Not sure if chasing some microseconds of better performance will make
a difference, but if it is anything like parking with a heavy truck
with heavy trailer in a small parking lot with other cars, then I
guess a microsecond extra is just as important as an extra centimeter
:-)



To give you some idea of what decent SSDs manage:

  
http://strugglers.net/~andy/blog/2019/05/29/linux-raid-10-may-not-always-be-the-best-performer-but-i-dont-know-why/


I don't think I can make Teres-I boot from an external SSD.

Through the USB2 interface you can.  Won't reach the full potentials of
SSD (see Formel-1 analogy above) but may still beat SD-cards.

You cannot_boot_  via USB2 interface but you can store your data there
which helps some scenarios (e.g. possibly helps Firefox hanging, as that
might be due to its working on cache data below your $HOME.



Ahh.. there's another hint! For some applications, disk partition matters?

I hope there is no downside to having two browsers installed, as long as 
you don't use them at the same time!


Best regards.

//Erik



Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-22 Thread Erik Josefsson

Hi Andy, thanks for taking time and for your advise!

On 6/22/19 10:22 PM, Andy Smith wrote:

Hi Erik,

On Fri, Jun 21, 2019 at 03:02:46PM +0200, Erik Josefsson wrote:

Maybe flashbench cannot tell me anything about that anyway?

Are there other tools?

I'm not familiar with flashbench. I like fio. It's available in
Debian.

I like to do the following tests. Example fio command line follows
for each.

- sequential read speed (MB/sec)

 $ fio --name="seqread" \
   --filename="/mnt/fioscratch" \
   --ioengine=libaio \
   --readwrite=read \
   --direct=1 \
   --numjobs=2 \
   --bs=4k \
   --iodepth=4 \
   --size=1g \
   --runtime=300s \
   --gtod_reduce=1 \
   --group_reporting | tee -a /home/$USER/fio.txt

- sequential write speed (MB/sec)

 $ fio --name="seqwrite" \
   --filename="/mnt/fioscratch" \
   --ioengine=libaio \
   --readwrite=write \
   --direct=1 \
   --numjobs=2 \
   --bs=4k \
   --iodepth=4 \
   --size=1g \
   --runtime=300s \
   --gtod_reduce=1 \
   --group_reporting | tee -a /home/$USER/fio.txt

- random 4KiB reads (IOPS)

 $ fio --name="randread" \
   --filename="/mnt/fioscratch" \
   --ioengine=libaio \
   --readwrite=randread \
   --direct=1 \
   --numjobs=2 \
   --bs=4k \
   --iodepth=4 \
   --size=1g \
   --runtime=300s \
   --gtod_reduce=1 \
   --group_reporting | tee -a /home/$USER/fio.txt

- random 4KiB writes (IOPS)

 $ fio --name="randread" \
   --filename="/mnt/fioscratch" \
   --ioengine=libaio \
   --readwrite=randwrite \
   --direct=1 \
   --numjobs=2 \
   --bs=4k \
   --iodepth=4 \
   --size=1g \
   --runtime=300s \
   --gtod_reduce=1 \
   --group_reporting | tee -a /home/$USER/fio.txt

Explanation:

name: Identifies the block of test output in the results output
   file.

filename: This file will be written out and then read from or
   written to. So your test device needs to be mounted on
   /mnt first.



Teres-I has one MicroSD slot, one HDMI and two USB ports.

Is it meaningful to test the SD cards with an USB-adapter? (the MicroSD 
slot would be occupied by the SD card the machine is running from/on)




  As long as your user has write access there,
   fio does not need to be run as root.

readwrite: Sets the mis of reads and writes and whether they are
sequential or random.

direct: Use direct IO, bypassing Linux's page cache. If you don't
 use this, you'll only be testing Linux's cache which would
 distort results since you're only testing 1GiB of data which
 could well fit entirely within your RAM. Note that many
 storage devices have their own cache, but this probably
 isn't relevant for your case.

numjobs: Spawn two processes each of which will be doing the same
  thing at once.

bs: Use 4KiB sized IOs. If you can benchark your real application
 you may find it uses different-sized IOs, but if you don't know
 then 4KiB is a reasonable start.

iodepth: Each process will issue 4 IOs at once, rather than issuing
  one and then waiting for it to complete.

size/runtime: The tests will read or write 1GiB of data but there is
   also a time limit of 5 minutes and if that runs out
   first then the test will stop. I don't think you need
   to do many hours of testing here. After 5 minutes I
   should think the card will be showing its reasonable
   performance.

gtod_reduce: Don't do some tests that require the gettimeofday
  system call. Without this, fio can spend a lot of its
  CPU time calling that system call instead of
  benchmarking, and you rarely require the info it gives
  back anyway. Run without this option once to see if you
  really require it.

group_reporting: Aggregate results from all jobs (processes) within
  the test.

| tee -a …: Output the results both to the screen and append to a
 file in your home directory.

Of those figures, I consider the random ones more important in most
configurations. i.e. if I had to choose between a device that
supported a bit higher sequential read/write but much lower random
read/write, I'd rather have the random read/write, because that
tends to have more impact on interactive usage than sequential.


Yes, going back and forth between Thunderbird and Firefox while copying 
text snippets from one app to the other sometimes ends in a mouse 
pointer freeze.


That's basically what I do most of the time...




SD cards tend to have 

Off-topic: Action [Was: Re: Off topic: remaja (teens)

2019-06-22 Thread Erik Christiansen
On 22.06.19 12:23, Thomas Schmitt wrote:
> Hi,
> 
> deloptes wrote:
> > Please stop!
> 
> You know what happens if you try to issue commands here, do you ?
> 
> 
> > BTW you are also a carbon dioxide producer ;-)
> 
> Voluntarily i'm only part of the athmospheric carbon cycle, not of the
> unearthing of carbon for oxidation. I'm doing my best to reduce the
> profits which carbon diggers can make from me.

Sitting here, in the down under winter, heating with carbon-neutral biomass
as I've done for the last 30 years, doing paperwork to progress my
off-grid 100% solar and biomass (i.e. stored solar) powered rural build,
I'd suggest that moving at least 2m above current sea level before the
end of the century, is not wasted effort.

> But i am not a teenager any more. So i am glad to see how well they are
> doing their job of annoying us in a constructive way.

Not all old folk are slow learners. I'm 65, and am accelerating the
action I've been taking for over three decades. What we're seeing
socially is the late adopters finally catching on. (Including bankers
and insurers, showing the problem is not imminent - it is here now.)

With Chennai running out of water now, and the Himalayas losing 1% of
snow mass yearly (28% already gone), the CIA's projection of water wars
by 2030 is optimistic, I expect. Here, in southern Australia, our farm
is destocked, because the last dam, dug in a watercourse, deepened to 6
metres, has run dry. Neighbours dams have been dry for a year. Never
before has there been no water at all.

The national (arguably vanity) rice crop over the last three years is:
807,000 ; 635,000 ; 52,000 tonnes. Hay prices have tripled, despite a
steady high stock slaughter rate. Usually one of the world's largest
wheat exporters, we are now importing increasing quantities to try to
keep core breeding stock alive. 

The extra 1 billion human mouths to feed every 12 years puts increasing
strain on decreasing food supply reliability. Loss of farmland to
suburbia is compounding the problem, also due to water use.

Feedback effects are small snowballs yet, but measurably growing:

http://www.bbc.com/future/story/20190612-the-poisons-released-by-melting-arctic-ice

We're slow to the party down here, but even we can pick up our game:

https://www.abc.net.au/news/2019-06-14/australias-largest-solar-and-battery-farm-opens-in-kerang/11209666

Let's all act before "Children as young as 10 were being sent to fetch
water a train ride away, hauling back containers of water almost as big
as they were." becomes symptomatic of the next generation's fate:

https://www.abc.net.au/news/2019-06-22/chennais-telling-the-globe-a-story-about-water-scarcity/11229084

Erik



Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-22 Thread Erik Josefsson
Hi David, time is my main constraint. I'm soon going to have none left for 
evaluating benchmarks. I think a better use of available time would be to start 
fundraising to get Teres-I boot without micro SD. But then I don't know if the 
ethical case for that laptop is strong enough compared to other pressing needs 
of the community. My use case seems minimal and/or unrealistic. Best regards. 
//Erik

On 22 June 2019 01:00:51 CEST, David Christensen  
wrote:
>On 6/21/19 12:28 AM, Erik Josefsson wrote:
>> Hi David,
>> 
>> On 6/19/19 3:38 AM, David Christensen wrote:
>>>
>>> The best way to answer your question regarding performance of a size
>N 
>>> SD card vs. a size 2*N SD card is to buy two cards and benchmark
>them 
>>> using your workload.  Please publish your findings.
>> 
>> Please find my four (4) findings below or at 
>> http://paste.debian.net/1088723
>> 
>> The only benchmark I know how to use is flashbench. But unfortunately
>I 
>> don't know how to interpret the resulting data.
>> 
>> I would be immensely grateful for advise on which of the 4 cards to
>use.
>> 
>> The testing was simple. I have downloaded and put the same copy of
>the 
>> redpill RC3 image from http://box.redpill.dk/nonfree/ onto each SD
>card, 
>> then I have followed the instructions. Each card now has an "Extended
>
>> system" created by the command box-add-gui on the same machine.
>> 
>> Then I have installed aptitude, run update and upgrade and autoclean,
>
>> and then installed and run flashbench with parameters: flashbench -a 
>> /dev/mmcblk0 --blocksize=1024
>> 
>> The four cards are:
>> 
>> MicroSD SanDisk Extreme PRO  64GB  [3]  XC II
>> MicroSD SanDisk Extreme PLUS  64GB  [3]  XC I  V30  A2
>> MicroSD SanDisk Extreme PLUS  32GB  [3]  HC I  V30  A1
>> MicroSD SanDisk Ultra  32GB  [1]  HC I  (10)  A1
>> 
>> I can send a picture of the cards off list if this is unclear.
>> 
>> So the question is, which card should I use for Teres-I ?
>> 
>> If there are further benchmarks or tests that could help determine
>which 
>> SD card is the best, I'd be happy to run them.
>> 
>> Best regards.
>> 
>> //Erik
>
>
>I'm not familiar with flashbench.  Every tool has a learning curve;
>it's 
>up to you to decide how much effort you want to put into it.
>
>
>When I wrote "benchmark them using your workload", I was thinking 
>"install Debian, install your apps, run your apps, quantify what you 
>can".  If you're doing command-line stuff, the 'time' built-in for Bash
>
>can be very useful.  But, it's also good to get a subjective feel for 
>the system on the various media -- does it lag?  Does it stutter/ 
>freeze?  Does it crash?
>
>
>I found that Debian and FreeBSD on SanDisk Ultra Fit 16 GB USB 3.0
>flash 
>drives was "good enough" for headless servers, but stuttered/ froze for
>
>interactive graphical desktop use (during disk I/O; especially writes).
>
>I have since migrated to used 16 GB SSD's.  (Does your target hardware 
>have a SATA port?)
>
>
>David

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.

Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-21 Thread Erik Josefsson

On 6/21/19 12:17 PM, Jonas Smedegaard wrote:

Quoting Erik Josefsson (2019-06-21 09:28:38)

On 6/19/19 3:38 AM, David Christensen wrote:

The best way to answer your question regarding performance of a size
N SD card vs. a size 2*N SD card is to buy two cards and benchmark
them using your workload.  Please publish your findings.

Please find my four (4) findings below or at
http://paste.debian.net/1088723

The only benchmark I know how to use is flashbench. But unfortunately
I don't know how to interpret the resulting data.

flashbench is for benchmarking page/erase-blocks/allocation-group (not
transfer speed).

My tool to generate images supports custom-aligned since April 28:
https://salsa.debian.org/tinker-team/box/commit/be07a3a1b0-I


That's great, but granted all 4 cards are optimized by your scripts, the 
question is if flashbench can tell me which one to pick?


All of them work fine, but I want to spend time with the one that is 
best for "my workload", as suggested by David Christensen earlier in the 
thread.


Maybe flashbench cannot tell me anything about that anyway?

Are there other tools?

//Erik



Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-21 Thread Erik Josefsson

Hi David,

On 6/19/19 3:38 AM, David Christensen wrote:


The best way to answer your question regarding performance of a size N 
SD card vs. a size 2*N SD card is to buy two cards and benchmark them 
using your workload.  Please publish your findings.


Please find my four (4) findings below or at 
http://paste.debian.net/1088723


The only benchmark I know how to use is flashbench. But unfortunately I 
don't know how to interpret the resulting data.


I would be immensely grateful for advise on which of the 4 cards to use.

The testing was simple. I have downloaded and put the same copy of the 
redpill RC3 image from http://box.redpill.dk/nonfree/ onto each SD card, 
then I have followed the instructions. Each card now has an "Extended 
system" created by the command box-add-gui on the same machine.


Then I have installed aptitude, run update and upgrade and autoclean, 
and then installed and run flashbench with parameters: flashbench -a 
/dev/mmcblk0 --blocksize=1024


The four cards are:

MicroSD SanDisk Extreme PRO  64GB  [3]  XC II
MicroSD SanDisk Extreme PLUS  64GB  [3]  XC I  V30  A2
MicroSD SanDisk Extreme PLUS  32GB  [3]  HC I  V30  A1
MicroSD SanDisk Ultra  32GB  [1]  HC I  (10)  A1

I can send a picture of the cards off list if this is unclear.

So the question is, which card should I use for Teres-I ?

If there are further benchmarks or tests that could help determine which 
SD card is the best, I'd be happy to run them.


Best regards.

//Erik

MicroSD SanDisk Extreme PRO  64GB  [3]  XC II
debian@box:~$ sudo flashbench -a /dev/mmcblk0 --blocksize=1024
align 17179869184   pre 515µs   on 809µspost 452µs  diff 
325µs
align 8589934592pre 515µs   on 736µspost 427µs  diff 
265µs
align 4294967296pre 537µs   on 823µspost 460µs  diff 
325µs
align 2147483648pre 545µs   on 893µspost 471µs  diff 
385µs
align 1073741824pre 517µs   on 749µspost 434µs  diff 
274µs
align 536870912 pre 526µs   on 763µspost 445µs  diff 277µs
align 268435456 pre 527µs   on 769µspost 448µs  diff 282µs
align 134217728 pre 540µs   on 820µspost 446µs  diff 327µs
align 67108864  pre 514µs   on 754µspost 449µs  diff 273µs
align 33554432  pre 506µs   on 722µspost 417µs  diff 261µs
align 16777216  pre 539µs   on 660µspost 460µs  diff 160µs
align 8388608   pre 539µs   on 670µspost 458µs  diff 171µs
align 4194304   pre 541µs   on 669µspost 466µs  diff 165µs
align 2097152   pre 547µs   on 649µspost 463µs  diff 144µs
align 1048576   pre 544µs   on 639µspost 458µs  diff 138µs
align 524288pre 545µs   on 658µspost 460µs  diff 155µs
align 262144pre 545µs   on 655µspost 460µs  diff 152µs
align 131072pre 540µs   on 620µspost 455µs  diff 122µs
align 65536 pre 541µs   on 624µspost 458µs  diff 125µs
align 32768 pre 538µs   on 622µspost 461µs  diff 122µs
align 16384 pre 478µs   on 633µspost 457µs  diff 165µs
align 8192  pre 501µs   on 516µspost 480µs  diff 25.7µs
align 4096  pre 509µs   on 528µspost 465µs  diff 41.2µs
align 2048  pre 514µs   on 538µspost 508µs  diff 27.6µs


MicroSD SanDisk Extreme PLUS  64GB  [3]  XC I  V30  A2
debian@box:~$ sudo flashbench -a /dev/mmcblk0 --blocksize=1024
align 17179869184   pre 567µs   on 603µspost 494µs  diff 
72.6µs
align 8589934592pre 557µs   on 583µspost 442µs  diff 
83.9µs
align 4294967296pre 689µs   on 784µspost 564µs  diff 
157µs
align 2147483648pre 654µs   on 726µspost 593µs  diff 
103µs
align 1073741824pre 579µs   on 638µspost 522µs  diff 
87.7µs
align 536870912 pre 570µs   on 652µspost 529µs  diff 102µs
align 268435456 pre 524µs   on 564µspost 500µs  diff 52.5µs
align 134217728 pre 654µs   on 730µspost 616µs  diff 95.3µs
align 67108864  pre 664µs   on 728µspost 600µs  diff 96.3µs
align 33554432  pre 576µs   on 637µspost 530µs  diff 84.1µs
align 16777216  pre 628µs   on 694µspost 568µs  diff 95.9µs
align 8388608   pre 594µs   on 654µspost 567µs  diff 73.6µs
align 4194304   pre 628µs   on 680µspost 580µs  diff 76µs
align 2097152   pre 576µs   on 602µspost 562µs  diff 33.5µs
align 1048576   pre 578µs   on 577µspost 572µs  diff 2.21µs
align 524288pre 585µs   on 585µspost 578µs  diff 3.55µs
align 262144pre 587µs   on 592µspost 584µs  diff 6.52µs
align 131072pre 616µs   on 636µspost 613µs  diff 21.4µs
align 65536

Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-20 Thread Erik Josefsson

On 6/19/19 2:04 PM, Jonas Smedegaard wrote:

Or, a better question, is it within reach to run a Debian Pure Blend
on Teres-I without an external SD card? If so, is Dan Ritter right
that it will be 2x to 8x faster?

Yes, it certainly is within reach, just needs someone to do the
reaching.

This seems a good starting point for such adventure:
https://github.com/armbian/build/blob/master/packages/bsp/common/usr/sbin/nand-sata-install


Very good!

Indeed, one of the comments to the code on that page says ""In case of 
eMMC it's also possible to transfer the bootloader to eMMC in a single 
step so from then on running without SD card is possible.".


Somehow the Olimex folks managed to make Teres-I run Ubuntu without SD card.

Grateful for advice who to talk to!

Best regards.

//Erik




Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-19 Thread Erik Josefsson

On 6/19/19 1:15 PM, Jonas Smedegaard wrote:


Quoting deloptes (2019-06-19 12:42:13)

Jonas Smedegaard wrote:


In short, you really_really_  want netinstall from MicroSD!

What about debootstrap? IS it possible to use it for that SoC?

Certainly.  Debian-installer uses debootstrap internally so that is a
must.  The images Erik has used until now -http://box.redpill.dk/  - are
also built with debootstrap (or rather the more flexible multistrap)
using the framework I referenced in my previous post:
https://salsa.debian.org/tinker-team/box

My point in above quote is which_medium_  you want to boot from
initially on a Teres-I: MicroSD rather than USB (not which method of
installation you want).

My work specifically explores how to avoid the tedious process of
running debian-installer on the relatively slow Teres-I but reach_same_  
result as if doing so - because in my experience running debootstrap

directly can easily lead to a slightly broken system.


It is quite possible that my impression that the Ubuntu instance that 
Teres-I is shipped with is significantly faster than your redpills is 
just imaginary, but then Dan Ritter seemed to confirm that that "native 
Ubuntu" probably is 2x to 8x faster.


If "native Ubuntu" is faster than "SD redpill", then I wonder how the 
Olimex people got their Ubuntu installed in the first place? They 
couldn't have used the Debian Installer, could they?


Or, a better question, is it within reach to run a Debian Pure Blend on 
Teres-I without an external SD card? If so, is Dan Ritter right that it 
will be 2x to 8x faster?


//Erik



Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-19 Thread Erik Josefsson

Hi Dan,

On 6/18/19 11:57 PM, Dan Ritter wrote:

Nicholas Geovanis wrote:

On Tue, Jun 18, 2019, 4:10 PM Erik Josefsson <
erik.hjalmar.josefs...@gmail.com> wrote:


The Ubuntu version that Teres-I comes with feels almost as good, which is
why I still don't understand why running Debian from the SD-card doesn't.


Then I would be interested to know which release of Ubuntu and see an
installed package list. But i will hit the websites, no need to post here.

He seems to be comparing speed of Ubuntu on an internal eMMC
storage (16GB, 8 bit interface) to the speed of Debian on an
SD card interface (either 4 bit or 1 bit interface, depending
on what they chose).

The eMMC should transfer twice as fast at minimum, and possibly
8x as fast as the SD card.


I obviously didn't get that memo.


-dsr- (I looked at the spec.)

You don't happen to see in the spec. which boot key to press to get 
Teres-I to start a netinstall from USB?


The new Debian-Installer worked perfectly fine with an old HP 
workstation a couple of weeks ago.


https://www.debian.org/devel/debian-installer/

I'd love to try it on Teres-I.

Thanks a million!

//Erik



Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-18 Thread Erik Josefsson

On 6/18/19 9:04 PM, Jonas Smedegaard wrote:

I need either to drop gui or figure out a way to make the Teres-I
laptop perform almost as good as a Lenovo N22-20 Chromebook model 80SF
(which is what the kids had last year).

Such a Lenovo Chromebook outperforms the Teres-1 on every way.


I know, that's why I wrote "almost as good".

The Ubuntu version that Teres-I comes with feels almost as good, which 
is why I still don't understand why running Debian from the SD-card doesn't.


Maybe it's just a technical fact that it can never do, regardless of 
optimizations and settings, and that I didn't get that memo?



You should use Teres-I not for its speed but its price and ethics:
https://www.olimex.com/Products/DIY-Laptop/


The real world cost of using Teres-I with a Pure Blend can only be 
justified with the latter.


The only other, in that sense, ethical laptop I know of are the ones you 
can buy from puri.sm.


Because PureOS is a Debian Pure Blend, isn't it?

//Erik



Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-18 Thread Erik Josefsson

On 6/18/19 5:46 PM, Nicholas Geovanis wrote:


If the computer runs from the SD card, the memory you are talking
about is also on that same SD card, no?

No. The SD card is analogous to the hard drive, not to the RAM.


Thanks! Now things start to make sense again :-)

That means there could be some margin of performance optimization of 
Teres-I, but the non-SD-card hardware together with the "IO bus design" 
songbird mentioned (thank you songbird!) is non-configurable, i.e. the 
real bottleneck.


I need either to drop gui or figure out a way to make the Teres-I laptop 
perform almost as good as a Lenovo N22-20 Chromebook model 80SF (which 
is what the kids had last year).


Or drop Teres-I.

//Erik



Re: System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-18 Thread Erik Josefsson

Hi Andy, thanks for taking time!

On 6/18/19 3:14 PM, Andy Smith wrote:

There is a very expensive 64GB SD card from SanDisk that is called Extreme
Pro that costs twice as much as same size Extreme Plus. Specs say it is
"super duper blazing fast" for video in "Ultra HD 4K", but would Pro also be
faster than Plus for the task of running Thunderbird and Firefox at the same
time?

Running big apps like that will benefit more from having enough
memory. After that is satisfied, fast storage will certainly help.
You'll have to look at the exact specifications of Plus vs Pro.


Here's probably one of my large white spots, but what do you mean with 
"enough memory"?


If the computer runs from the SD card, the memory you are talking about 
is also on that same SD card, no?


If yes, then optimizing available SD card memory (e.g. 32GB or 64GB) 
would yield different performance results, but that does not seem to be 
the case!




What are you trying to achieve?


I want to make up my mind whether I will have the time to use Teres-I 
with redpill RC3 at work (i.e. in school).


Thanks again!

//Erik



System on a chip - performance relative size and setup (how can the (Debian) setup make a difference?)

2019-06-18 Thread Erik Josefsson
This is another quite open question that I probably could research 
myself, if I had the time.


As far as I understand, it is quite recent that SD cards are fast and 
large enough to be able to carry and run an entire Debian instance.


If this is the case, maybe there is only theory available regarding 
whether you can make a computer "run faster" on a 64GB SD card than on a 
32GB SD card when cards are otherwise identical.


I don't really know how swap works on a standard computer, even less how 
it works when the whole computer runs from/on a SD card.


Swap is supposed to be make your computer pretend that you have more RAM 
than it actually has, but if the whole computer is running from/on RAM 
(or is it?), then what does swap mean?


On Teres-I with redpill RC2 (now there is a RC3 that I have not yet 
installed) an unfortunate website with pop up commercials (like dn.se) 
can eat all performance there is and freeze the mouse for hours. I would 
guess that could have been fixed on a normal computer with "more RAM", 
i.e., "more swap"? But is the same true for e.g. Teres-I?



Second question is if it is meaningful to buy a "super duper blazing 
fast" SD card for the task to run a whole Debian system?


There is a very expensive 64GB SD card from SanDisk that is called 
Extreme Pro that costs twice as much as same size Extreme Plus. Specs 
say it is "super duper blazing fast" for video in "Ultra HD 4K", but 
would Pro also be faster than Plus for the task of running Thunderbird 
and Firefox at the same time?



Best regards.

//Erik




Teres-I

2019-06-16 Thread Erik Josefsson

Hej!

Jag har köpt två byggsatser Teres-I:

https://www.olimex.com/Products/DIY-Laptop/

och prövar mig fram med en Debian Pure Blend:

http://box.redpill.dk/

Är det någon på listan som också har en (eller flera) och har provat 
installera enligt instruktionen på box.redpill.dk?


mvh

//Erik




Re: Diagnosing what applications are doing

2019-06-15 Thread Erik Josefsson

On 6/15/19 9:27 AM, Jonas Smedegaard wrote:

When I get around to using it myself I will likely add it to one of the
addon profiles of thehttps://box.redpill.dk/  images but not the gui
profile specifically: It is a command-line tool, not graphical.



As far as I can see, pullimap needs libconfig-tiny-perl and
libinterimap, and offlineimap needs python-imaplib2 and python-socks.

Perhaps one is more lightweight than the other?

interimap should be more efficient but requires a good IMAP server like
Dovecot (see package description) whereas offlineimap works with a wider
variety of servers including Gmail.


Which email client comes with the Teres-I tui profile?

Maybe I should just start to use that and drop gui email when I have 
learned how to live with tui email.


Best regards.

//Erik



Re: Reading pdf files

2019-06-15 Thread Erik Christiansen
On 15.06.19 07:51, Curt wrote:
> curty@einstein:~$ mupdf
> usage: mupdf [options] file.pdf [page]
> -p -password
> -r -resolution
> -A -set anti-aliasing quality in bits (0=off, 8=best)
> -C -RRGGBB (tint color in hexadecimal syntax)
> -W -page width for EPUB layout
> -H -page height for EPUB layout
> -S -font size for EPUB layout
> -U -user style sheet for EPUB layout
> 
> So I guess, 'mupdf -C FFEFD5 foo.pdf' (which gives papaya, not wheat--can't 
> find
> wheat--but at least it's a foodstuff). Works here.

Many thanks, Curt. I'll have to update my mupdf:

$ mupdf -C FFEFD5 ~/Personal/domestic/shed/design/plans.pdf
mupdf: unknown option -C
usage: mupdf [options] file.pdf [page]
-b -set anti-aliasing quality in bits (0=off, 8=best)
-p -password
-r -resolution
-A  disable accelerated functions

And that seems to need an update of my ancient debian version, as an
"apt-get install mupdf" offers nothing newer. Procrastination does seem
to catch up on one eventually.

Erik



Re: Diagnosing what applications are doing

2019-06-15 Thread Erik Josefsson

On 5/26/19 4:36 PM, Jonas Smedegaard wrote:

Quoting Gene Heskett (2019-05-26 16:25:43)

On Sunday 26 May 2019 07:05:45 am Jonas Smedegaard wrote:


Quoting Paul Sutton (2019-05-26 12:28:43)

On my netbook,  Thunderbird seems really unstable, it stars up
fine then seems to stall and fails to respond,  it eventually
picks up.

[...]

One thing that will "freeze" it is using its own download facilities
to fetch the mail, used to bug me pretty badly, but when it did come
back, everything I had typed into a message came back with it.  So I
offloaded that fetching of emails by making fetchmail, procmail,
clamscan and spamassassin all into background tasks that have minimal
effect on kmail.  Now my freezes are maybe a second as it sorts an
incoming email that has servived the spam and viri filters.

Good point!  (this is Thunderbird not KMail but still applies)

For IMAP mail, I recommend more modern alternatives to fetchmail:

   * pullimap
   * offlineimap


Could you recommend one of them to use with an install of the 
box-add-gui alternative for Teres-I?


As far as I can see, pullimap needs libconfig-tiny-perl and 
libinterimap, and offlineimap needs python-imaplib2 and python-socks.


Perhaps one is more lightweight than the other?

Best regards.

//Erik



Re: Reading pdf files

2019-06-14 Thread Erik Christiansen
On 14.06.19 10:51, Celejar wrote:
> On Fri, 14 Jun 2019 18:50:22 +1000
> Erik Christiansen  wrote:
> > I only use mupdf for problem pdf files, but it's very nifty to have on
> > hand.
> 
> I actually love mupdf, and I use it as my main pdf reader. It's just so
> lightweight and easy to use for basic pdf reading.

On trying it again, it does look very promising. Is there a way to set
the background colour? With xpdf I use "-papercolor wheat3" to avoid
eyestrain from the white background.

Erik



Re: Forgot name of Debian "configuration" {wrong word?} file

2019-06-14 Thread Erik Christiansen
On 14.06.19 06:10, Richard Owlett wrote:
> I can't remember the name of the file which identifies the association
> between a directory (i.e. \home) and which physical partition it is on. The
> file I'm looking for also identifies which partition is used for swap.

Easier than looking in /etc/fstab is just running the "mount" command.
The "df" command also includes what you seek in its output.

Erik



Re: Reading pdf files

2019-06-14 Thread Erik Christiansen
On 13.06.19 16:29, k. jantzen wrote:
> 
> in general I do not have a problem reading a pdf file with either xpdf or
> documentviewer.

Yup, documentviewer will sometimes show faint lines better, I find, but
it's easy to set the background colour in xpdf.

> But once in a while I get a pdf file that they cannot read and then I have
> to go to Windows to open it.
> 
> What is so spectacular about these files that they cannot be read by the
> above mentioned programs?

That varies, and a reader with good error messages is the easiest way to
find out.

> Is there another program that would read such a file?

Well, given s/would/could, try mupdf:

$ apt-cache search mupdf
mupdf - lightweight PDF viewer
mupdf-tools - commmand line tools for the MuPDF viewer
libmupdf-dev - development files for the MuPDF viewer

In my case, a pdf certificate from a state authority displayed the logo
and signature in xpdf, but none of the text - not much use at all.

A quick install of mupdf not only allowed the whole document to be
displayed, but issued (a squillion times) the following error message on
stderr:

Error: Couldn't create a font for 'ABCDEE+Calibri,Bold'
Error: Found a bad table definition on true type definition, trying to 
continue...

after an initial:

Error: PDF file is damaged - attempting to reconstruct xref table...

I only use mupdf for problem pdf files, but it's very nifty to have on
hand.

Erik



Re: What is agetty, and why can't it be stopped?

2019-06-09 Thread Erik Christiansen
On 09.06.19 19:11, Brian wrote:
> On Mon 10 Jun 2019 at 00:52:21 +1000, Erik Christiansen wrote:
> 
> > 
> > On 09.06.19 06:59, Gene Heskett wrote:
> > > And what do we call that Erik, thats much bigger than a normal foop, a 
> > > megafoop maybe?  Good grief, Charley Brown.  And we're stuck with it. :(
> > 
> > Well now, there are folks who have observed that not all progress is
> > forward, .
> 
> Indeed there are; their promotion of "backward progress" mangles the
> English language and brings into doubt any subsequent argument being
> promoted. Are these the same people who observe "forward regression"
> in some processes?

No, that's just your lack of understanding being expressed by you. Many
of the nuances of the meaning of "progress" may be found in:

 1. To make progress; to move forward in space; to continue
  onward in course; to proceed; to advance; to go on; as,
   railroads are progressing. "As his recovery progressed."
--Thackeray.

Please think on the following example. A party might progress (continue
onward in course) deeper into a swamp, the mire might progress (advance)
up the sides of their boots, and their progress (procession) may grow
progressively slower and more laboured. Does this progress (advance)
their goals?

Once you apply your mind to it, I'm sure that you can understand these
nuances of the English language. (If English is not your first language,
then your uninformative overly opinionated interruption is excused. ;)

> Incidentally, the OP has no intention of changing the init system he
> is using. He has enough problems on his plate already.

How fortunate Gene is to have you to tell him what he wants. Perhaps
you'll also tell him to be grateful for your decisionmaking on his
behalf? 

Incidentally, I thank you for leaving the task of providing informative
contributions, outlining real-world options, to the helpfully inclined.
It'll save confusion.

Erik



Re: What is agetty, and why can't it be stopped?

2019-06-09 Thread Erik Christiansen


On 09.06.19 06:59, Gene Heskett wrote:
> And what do we call that Erik, thats much bigger than a normal foop, a 
> megafoop maybe?  Good grief, Charley Brown.  And we're stuck with it. :(

Well now, there are folks who have observed that not all progress is
forward, and not all code bloat and pervasiveness is a benison,
resulting in at least two ways to remain essentially debian without
remaining stuck in the foop, mega or otherwise.

One simple method is from the "Insidious systemd" thread on this list.
Quoting from <20190527144308.0398ce4b@debian9>:

On 27.05.19 14:43, Patrick Bartek wrote:
> I used the "approved" conversion documented on Debian's web site
> somewhere: apt (or apt-get) install sysvinit-core.
...
> Totally automatic. All of systemd's libraries remained along with udev
> and a couple others I don't recall.  It freed up about 6 or 7 MB of
> RAM over a systemd boot.

One apt-get install is about as easy as it could be.

Some residual unused libraries mouldering in the background do no harm,
but if they offend, then there is devuan. While my laptop and main
desktop are pre-systemd debian, I've run devuan on another host for some
time. It is only sans-systemd debian, remaining true in other regards.
Downloading an image, putting it on a usb stick, and doing yet another
install is a bit more work, and another list to subscribe to. There are
a number of debian users who appear satisfied with the sysvinit-core
package. To my mind it neatly solves the problem of an old bloke, happy
with traditional sysvinit, having to load wetware RAM with a completely
new way to get the same bucket of water from the well as we've been
doing for decades. (Speaking of self, here.)

Erik

-- 
"If you want to eat hippopotamus, you've got to pay the freight."
 - attributed to an IBM guy, about why IBM software uses so much memory.



Re: What is agetty, and why can't it be stopped?

2019-06-09 Thread Erik Christiansen
On 08.06.19 11:28, Gene Heskett wrote:
> On Saturday 08 June 2019 10:20:09 am deloptes wrote:
> > Did you try running this without systemd? I recall you mentioned
> > somewhere you removed it
> >
> > regards
> 
> No. And I doubt there would even be a running system left. I don't think 
> I wrote that it had been removed...
> 
> I just didn't know that it could be made so pervasive in one swell foop.

Err, Gene, this foop has swelled to 1.2 million lines of code while your
back was turned. Pervasiveness is its essence.

https://linux.slashdot.org/story/19/05/25/0538206/systemd-now-has-more-than-12-million-lines-of-code

Erik



Can any setting be changed after an "install Buster from scratch"-procedure?

2019-06-08 Thread Erik Josefsson

Hello,

I followed Ken's thread about date format in Thunderbird:

https://lists.debian.org/debian-user/2019/06/msg00133.html

and ended up reading about Dot files:

https://wiki.debian.org/DotFiles

This was very helpful for me, because I think I can now ask the right 
question:


Can every setting made with an "install Buster from scratch"-procedure 
(like the one for [Teres-I DIY laptop] available at box.redpill.dk) be 
changed after the install procedure is completed?


I mean, can some settings be "hard-coded" by an install procedure?

Or in other words, which settings need to be set correctly during install?

The reason I ask is that, for me, every install from scratch is quite 
time consuming and makes it very hard to check mail and do other basic 
stuff while installing, so if everything can be tinkered with after an 
install, I can probably find out how I want my laptop to be set up 
without an Ethernet connection (which I happen to need for the install 
procedure).


Maybe my my question doesn't make sense, but for me it does, because I 
have now managed to install a fresh new Teres-I image that is available 
at box.redpill.dk, with a result that I hope I "fix", i.e. tinker with 
further to make it into a Swedish laptop.


This is my sequence of commands that brought me here:

1.Prepare image on SD card (done on another fully functional machine):
1.1.  wget http://box.redpill.dk/nonfree/nonfree-teres1-buster-1.0rc2.img.gz
1.2.  gunzip nonfree-teres1-buster-1.0rc2.img.gz
1.3.  sudo cp nonfree-teres1-buster-1.0rc2.img /dev/sda
2. Move SD card to Teres-I, connect ethernet-via-USB-cable, turn on 
machine and follow instructions on screen:

2.1.  sudo box-finalize
2.1.1.  Dialog
2.1.2.  high
2.1.2.  install language support - yes
2.1.2.  Select default language code (none to skip) - none
2.2.  sudo apt update
2.3.  sudo box-add-gui
2.4.  sudo shutdown -h now

I think that is pretty neat! (thank you Jonas!)

I have then started Teres-I again with network via tethering via USB 
turned on from a Galaxy III GT-i9300 mobile phone running LineageOS. 
Somehow Teres-I gets network early enough in the boot process to later 
do the following flawlessly:


sudo apt install aptitude
sudo aptitude update
sudo aptitude upgrade
sudo aptitude autoclean
sudo aptitude install gedit
man gedit

To me it now looks like I have a fully functional laptop, but as I wrote 
above, I need to tinker with it to get it to behave like it is a Swedish 
laptop.


The most wonderful thing is that it looks as if I could do this with 
tethering via USB (with which my DNS-issues seems gone!).


Thanks for helping out!

Best regards.

//Erik

[Teres-I DIY laptop] https://www.olimex.com/Products/DIY-Laptop/



Re: What is agetty, and why can't it be stopped?

2019-06-06 Thread Erik Christiansen
On 06.06.19 07:14, Gene Heskett wrote:
> >   # Example how to put a getty on a serial line (for a terminal)
> >   #
> >   #T0:23:respawn:/sbin/getty -L ttyS0 9600 vt100
> >   #T1:23:respawn:/sbin/getty -L ttyS1 9600 vt100
> >
> Yes, I recall those days. But until now ttyS0 and S1 if it existed, were 
> free for my to use. Now it seems to want to grab everything in sight.

Er, Gene, does your /etc/inittab have either of those lines uncommented
to activate a getty on them? If so, just comment them again. If not, did
your upgrade land you in systemdix land, so the traditional way is gone.

> This is MY machine, and it should be able to do what I want it to do.  I 
> finally did kill the one that was grabbing ttyS0. In fact it appears I 
> killed them all, htop cannot find one running now, and neither can an 
> lsof, Yet the machine seems to be running normally.
> 
> > Cf. man inittab for details. See? Still gettys being started
> > here, for the Linux virtual consoles. And some examples on
> > how to do it for serial terminals.
> >
> No man page for inittab seems to be installed.  That seems to be a head 
> scratcher right there.

Nah, systemd replaces the traditional SysV init stuff, if you let it be
installed. Then you have to learn new ways.

Erik

-- 
manual, n.:
A unit of documentation. There are always three or more on a given item.
One is on the shelf; someone has the others.
The information you need is in the others.   - Ray Simard



Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?)

2019-05-28 Thread Erik Christiansen
On 28.05.19 08:59, Gene Heskett wrote:
> On Tuesday 28 May 2019 08:34:37 am Erik Christiansen wrote:
> > That said, one could upgrade just that one package, and try it out. If
> > it is fixed, you're on a winner then and there. "Fixed" beats
> > "reported", as you can get on with the next issue.
> >
> > Erik
> 
> A great idea Erik. What then is the deb line in sources.list to enable 
> that?  Thats what I was alluding to when I said inner circle.

At https://wiki.debian.org/DebianExperimental#To_configure_APT
we see a sources.list line and how to pin a specific package install to
that, either on the command line or in /etc/apt/preferences.

Here's hoping that your wife's COPD is bearable, she doesn't throw your
cooking at you, and you can maintain the stamina each day to be her
palliative carer despite your 84 years. 

Erik




Re: IPV6 hosts file (was: Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?))

2019-05-28 Thread Erik Christiansen
On 28.05.19 14:59, to...@tuxteam.de wrote:
> On Tue, May 28, 2019 at 08:51:41AM -0400, Gene Heskett wrote:
> 
> [...]
> 
> > But who or what is the gatekeeper to make sure the address you choose, 
> > supposedly at random, isn't in use someplace next door or half the 
> > planet away?  There may be some sort of an enforcement in ipv6, but I've 
> > not heard of it. That doesn't mean it doesn't exist, just that if it 
> > does, I've never read about it.
> 
> I refer you (second time today, hint, hint) to this page from Wikipedia:
> 
>   https://en.wikipedia.org/wiki/Link-local_address#IPv6

That gives a vague nebulous overview, but Gene needs a bit more detail.
A quick google of "linux static ipv6 address howto" gave some promising
looking hits. I liked the look of the third hit:

https://kb.wisc.edu/ns/page.php?id=14099

While the example is aimed at a specific site, it shows the files to be
edited, and IIUC, FE80 is for local addressing, like ipv4 non-routable
address ranges, so it should be generally applicable, I figure.

The tutorial in the second hit:

https://www.cyberciti.biz/faq/ubuntu-ipv6-networking-configuration/

might be worth a try next, using an FE80 address, I figure.

Use your google foo, Gene! There's so much chaff out there, and life's
too short to be sorting the wheat out with tweezers.

Erik



Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?)

2019-05-28 Thread Erik Christiansen
On 28.05.19 08:02, Gene Heskett wrote:
> On Monday 27 May 2019 11:18:49 pm Joe Pfeiffer wrote:
> 
> > Gene Heskett  writes:
> > Your version (1.14.6-2) of network-manager appears to be out of date.
> > The following newer release(s) are available in the Debian archive:
> >   experimental: 1.18.0-1
> > Please try to verify if the bug you are about to report is already
> > addressed by these releases.  Do you still want to file a report
> > [y|N|q|?]?
> 
> And this exposes something in debian's policy I object to, as strenuously 
> as I can. A newer version may well fix the bug, but its never given to 
> the users until they upgrade to the next release, and that brings a 
> never shrinking list of new bugs.

Gene, you're just too shy and retiring. In such a case, if experimental
is not your cup of tea, why not conclude "It needs to be fixed in stable.",
and hit 'y' to still file a report. After all, until it's backported to
stable, it's still an outstanding bug.

That said, one could upgrade just that one package, and try it out. If
it is fixed, you're on a winner then and there. "Fixed" beats
"reported", as you can get on with the next issue. 

Erik



Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?)

2019-05-28 Thread Erik Christiansen
On 27.05.19 23:32, Jimmy Johnson wrote:
> No, seriously I would like to get some user feedback to the question.
> And also why is net-tools being deprecated?

It's not. You and I fully approve of it, so it's fine for the use cases
in which it gives the desired results. (See ifconfig use on this thread.)

It's Network-Munger which I have had to deprecate right off my machines
in the past, in order to get static networking running. 

If I were Gene, I'd blow it away first, ask questions afterwards. But
that's just my experience. His WV mountain gremlins might have placed
other obstacles, but one less can only help in this case.

Erik



Re: IPV6 hosts file (was: Re: That time IPv6 farted in Gene's church (Was Re: forcedeth?))

2019-05-28 Thread Erik Christiansen
On 27.05.19 17:06, Gene Heskett wrote:
> Thats fine, shows the loop local stuff, but how does one determine the 
> ipv6 address for picnc.coyote.den for instance. I think it somehow 
> related to picnc's mac address, but thats just a WAG.

On coyote, it'll look something like line 3:

$ ifconfig -a
eth0  Link encap:Ethernet  HWaddr 00:31:20:c2:5f:5e  

  inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
  inet6 addr: fe81::231:19ff:fea1:4f4e/64 Scope:Link
  ...


But if in doubt, set it to something you like, then add it to /etc/hosts on
the others, I figure. (Haven't yet fussed with IPV6, myself.)

Erik

P.S. Yes, there's doubtless an "ip" way to show addresses too. BMG.

-- 
Habit is habit, and not to be flung out of the window by any man, but
coaxed down-stairs a step at a time.
  - Mark Twain, "Pudd'nhead Wilson's Calendar



Re: What to buy for Buster?

2019-05-24 Thread Erik Josefsson

On 5/24/19 5:12 AM, David Christensen wrote:


If you get a major brand computer with 64-bit Intel Core technology 
(ca. 2006) or newer, Debian should run on it.


Great! Thanks!

The HP Compaq 8200 Elite SFF that I'm about to grab has a Intel Core 
i5-2400S processor.


I browsed the Debian installer pages and as far as I understand I should 
use "other images (netboot, USB stick, etc.)" for the installation, but 
to me it is not obvious if I should use the image for the amd64 or the 
i386 architecture:


https://www.debian.org/devel/debian-installer/

My typcal problem. I should know basic stuff like that.

Is the "Debian Designation" for the Intel Core i5-2400S processor "Intel 
x86-based" or "AMD 64 & Intel 64"?


(I am looking at the table "2.1.1. Supported Architectures" in the 
Debian GNU/Linux Installation Guide on the pages of d-i.debian.org/manual/)


Best regards.

//Erik



Re: What to buy for Buster?

2019-05-23 Thread Erik Josefsson

On 5/23/19 4:59 PM, Joe wrote:

On Thu, 23 May 2019 15:17:15 +
Erik Josefsson  wrote:


Thanks all for feedback, help and answers to many of my questions,
but I feel my available time and my skills put together won't meet
the threshold for being able to contribute to Debian in any
meaningful way for another year or two.

I'll have to go back to piggybacking, as I have done for decades.

As such a piggyback, I'd anyway like to ask if anyone would know a
reasonably powerful second hand stationary office computer that can
run a Debian Buster Pure Blend from a net install? No need for
wireless, I will just connect with ethernet cable.

Reasonably powerful? Is this 'games' powerful or 'office' powerful?
Most business computers are bought for size, quietness and cost, not raw
power. Even servers don't need to be particularly powerful unless they
run MS operating systems and/or multiple VMs. The most powerful
ex-office machines will be MS servers, but they are generally large and
noisy and produce a fair bit of heat. Whatever you buy, throw away the
hard drive and buy new.


I don't know more than that I should avoid Nvidia.

In theory, since it is a Pure Blend, I would then never have to
bother you again :-)

I mean, I would know for certain that there is nothing wrong with the
computer, but rather with the computeur.

I thought that maybe I would master the Teres-I and its
box.redpill.dk promise, but the combo of wireless- and DNS-issues is
too steep.

Next life maybe.


Always difficult to advise, so many computers, so few recent ones
listed as Linux-compatible. All I can offer is that I've never had
problems with HP business desktops,


Thanks a million! I'm not a gamer, would this machine be OK you think?

https://www.bluecity.se/hp-compaq-8200-elite-sff-2-50ghz-250gb-hdd-windows-10-8gb-ram-svart-50074

It's on the shelf for sale just down town, so I could buy it tomorrow!


  or Acer portables. But then, I
don't play games (beyond solitaire) so I'm not looking for blazing fast
graphics. Other people swear by Dell, but I've never used one and I've
heard a few stories about them.

Something else you might consider is a decent motherboard, such as
Gigabyte, preferably bundled with RAM and CPU to avoid compatibility
problems. With a new power supply and hard drive (SSD prices are
falling quickly at the moment), an old case can be revived, and most of
us have one or two of those.


Great advice, thanks again!

//Erik



What to buy for Buster?

2019-05-23 Thread Erik Josefsson
Thanks all for feedback, help and answers to many of my questions, but I 
feel my available time and my skills put together won't meet the 
threshold for being able to contribute to Debian in any meaningful way 
for another year or two.


I'll have to go back to piggybacking, as I have done for decades.

As such a piggyback, I'd anyway like to ask if anyone would know a 
reasonably powerful second hand stationary office computer that can run 
a Debian Buster Pure Blend from a net install? No need for wireless, I 
will just connect with ethernet cable.


I don't know more than that I should avoid Nvidia.

In theory, since it is a Pure Blend, I would then never have to bother 
you again :-)


I mean, I would know for certain that there is nothing wrong with the 
computer, but rather with the computeur.


I thought that maybe I would master the Teres-I and its box.redpill.dk 
promise, but the combo of wireless- and DNS-issues is too steep.


Next life maybe.

Best regards.

//Erik



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-22 Thread Erik Josefsson

On 5/22/19 12:40 PM, David Wright wrote:

On Wed 22 May 2019 at 04:06:46 (+), Erik Josefsson wrote:

On 5/5/19 7:21 AM, Jonas Smedegaard wrote:

I don't know if there is a screw loose in your laptop, or
warewolves pissed on a USB plugs.

Well, what comes out of one of the keyboards now is p.

In response to your pressing keys, or spontaneously?
Rapidly or intermittently?


I found the laptop "p"-ing when coming back after wiping, among other 
things, baby drool in another room. My daughter is 19 months.


More specifically, I came back to a growing line of p's in an open text 
document in Mousepad (the xfce editor). I did not press any key, nor was 
the p's coming rapidly or intermittently. I just closed Mousepad.



Is this permanent (whenever you switch on) or just occasional?


It continued in Thunderbird, but less aggressive, kind of like at the 
end of the walk with the dog (if the allegory still holds for another joke).



Or did it start mid-session?


I think more like mid session, but not sure. I have now put that laptop 
on the shelf.


If something similar happens with this laptop, we can rule out baby 
drool. I'm keeping it safe from now on.


But it also means I will have to stop testing things and instead find 
for another mode of working with Debian.



After dpkg-reconfigure console-setup or keyboard-configuration?


Probably unrelated.

But you never know (full moons etc).

Best regards.

//Erik



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-21 Thread Erik Josefsson

On 5/5/19 7:21 AM, Jonas Smedegaard wrote:

I don't know if there is a screw loose in your laptop, or
warewolves pissed on a USB plugs.


Well, what comes out of one of the keyboards now is p.

Could be warewolf p's, or baby drool.

It's magic either way.

//Erik



Re: intermittent or not? "Could not resolve 'deb.debian.org'"

2019-05-19 Thread Erik Josefsson

On 5/19/19 7:11 AM, Erik Josefsson wrote:


Maybe this is of general interest, so a code snippet with where wifi 
parameters are set could be interesting?


And the default(?) DNS settings I guess.

Best regards.

//Erik



Re: intermittent or not? "Could not resolve 'deb.debian.org'"

2019-05-19 Thread Erik Josefsson

On 5/13/19 11:28 AM, Dan Ritter wrote:

The same command of course works perfectly fine when I connect the Teres
laptop directly to the internet with an ethernet cable (through USB).


I got this same behavior yesterday when firing up a new Debian
laptop. Turned out the wireless card was down.


Thanks Dan.

The card is not down.

Right now:

- My laptop from work opens https://fosdem.org and 
https://lists.debian.org with my home wifi router without any problem.


- My phone running LineageOS opens https://fosdem.org and 
https://lists.debian.org with my home wifi router without any problem.


- My Teres-I laptop cannot open https://fosdem.org nor 
https://lists.debian.org with my home wifi router, but with Ethernet/USB 
cable the pages opens just fine (cable connected to laptop directly from 
the wall, no router in between).


- My Teres-I laptop "Could not resolve 'deb.debian.org'" with wifi when 
asked to aptitude install something. But with Ethernet/USB it installs 
just fine (just as above).



However, right now, I can open lots of other web pages with my Teres-I 
laptop, and mail (Thunderbird) works fine (at least as far as I can 
tell, it's quite slow).


To me it seems like there is a wifi setting somewhere in my Teres-I 
laptop that is the reason for the intermittent(?) behavior, but of 
course it can be more complex than that.


Maybe a peek in the [source code] could shed some light on whether that 
could explain the behavior?


Unfortunately my Teres-I cannot reach the source code website either.

Maybe this is of general interest, so a code snippet with where wifi 
parameters are set could be interesting?


It would definitely be a great help for me.

//Erik

[source code] https://salsa.debian.org/tinker-team/box



Off topic: non zero error codes

2019-05-18 Thread Erik Josefsson

Good morning,

I have wanted to ask for a long time about something I made up from 
hearsay whether it is remotely true. I hope that's OK.


Is there is a shell/language where the returncode for TRUE is zero and 
that that is the opposite of how all other shells/languages are made?


The argument for creating it was that it then becomes handier to say "no 
errors, one error, two errors..." than to say "success, one error, two 
errors...".


I mean: (0, 1, 2, ...) is handier than (1, 0, whatever, ...).

Best regards.

//Erik



clone a bootable image (was: Re: intermittent or not? "Could not resolve 'deb.debian.org'")

2019-05-13 Thread Erik Josefsson

Hi john!

First, thanks to you and everyone for helpful suggestions.

Den 2019-05-12 kl. 08:45, skrev john doe:

focus on one card first then clone it!:)
I'll focus on this suggestion now l because it sounds like it could save 
me a lot of time.


But before I start, I have to ask if it is actually possible to clone a 
bootable image (that's what I have, right?) from one SD-card to another, 
if the SD-cards are a bit different?


I have one 64GB Extreme, one 64GB Extreme PLUS and one 32GB Extreme 
PLUS, all SD-cards from SanDisk.


Let's say I start with the smallest, what's the command line sequence 
for cloning it onto e.g. 64GB Extreme PLUS?


One of the reasons I ask is that I got the impression that the speed 
optimisations that are made by the box-fill-disk command somehow has a 
dialogue with the card when the card's read/write parameters are set:


"Optionally tune ext4 filesystems for specific MicroSD NAND chip pattern."
https://salsa.debian.org/tinker-team/box/commit/be07a3a1b0

If each card type (and size) talks back in its own way, then I guess I 
can only clone a card onto cards of identical type (and size)?



Best regards.

//Erik



Re: pmount could perhaps be of greater utility?

2019-05-12 Thread Erik Christiansen
On 12.05.19 13:45, Eric S Fraga wrote:
> On Sunday, 12 May 2019 at 17:52, Erik Christiansen wrote:
> > On 11.05.19 14:38, Eric S Fraga wrote:
> >> This is nice; is there an equivalent for FAT file systems?  Most of the
> >> devices I mount using pmount are sd cards (cameras etc.).
> >
> > Pmount is just a wrapper around the standard mount program, and that
> > will try to guess the fs type if not specified in the invocation - as
> > above. That manages ext2 and ext3 without assistance, but ... Ah, yes,
> > with a vfat stick it gives:
> 
> Sorry, I should have been more explicit.  I use pmount all the
> time.  Works fine.  What I was looking for was an equivalent of e2label
> for vfat, if that even makes any sense.

Dunno how much sense can be found here, as dosfslabel doesn't do it, but
this gives the appearance of doing it for me:

$ blkid | awk --field-separator '"' '/sdb1/ { print $2 }'
4DAB-09E3

from blkid's line:

/dev/sdb1: UUID="4DAB-09E3" TYPE="vfat"

As it replicates the automounter's behaviour, and that uses the label
for ext[23] sticks, I'm happy to take that UUID as the label, since I
have nothing else to go on. (Never had a winderz box in 30 years in IT,
or the 11 years since.)

Erik



Re: pmount could perhaps be of greater utility?

2019-05-12 Thread Erik Christiansen
On 11.05.19 14:38, Eric S Fraga wrote:
> On Saturday,  4 May 2019 at 16:43, Erik Christiansen wrote:
> >  To provide that convenient automation, I use:
> >
> >  $ which lmount
> >  lmount is a function
> >  lmount () 
> >  { 
> >  pmount $1 `e2label $1`
> >  }
> 
> This is nice; is there an equivalent for FAT file systems?  Most of the
> devices I mount using pmount are sd cards (cameras etc.).

Pmount is just a wrapper around the standard mount program, and that
will try to guess the fs type if not specified in the invocation - as
above. That manages ext2 and ext3 without assistance, but ... Ah, yes,
with a vfat stick it gives:

$ lmount /dev/sdb1
e2label: Bad magic number in super-block while trying to open /dev/sdb1
Couldn't find valid filesystem superblock.

And "tune2fs -l /dev/sdb1" says the same. Quite what the automounter
does to overcome that, I haven't yet figured out. A quick rewrite of
the tiny wrapper wrapper does improve matters somewhat:

lmount () { # Mount a USB stick at 
/media/read_stick_label
   if [ mp=`e2label $1` ] ; then# if e2label can grok the label.
  pmount $1 $mp
   else # When that fails, TRY TO
  pmount -t vfat $1 vfat# use fs type as mountpoint, for now.
   fi
}

mounts vfat OK, but the "label" argument, now third, is ignored despite
being compliant with the manpage. So it falls back to mounting on
/media/sdb1 in a most wilful manner:

/dev/sdb1 on /media/sdb1 type vfat
(rw,nosuid,nodev,noexec,relatime,uid=1000,gid=1000,fmask=0177,dmask=0077,codepage=cp437,iocharset=iso8859-1,shortname=mixed,quiet,utf8,errors=remount-ro)

Either I'm not holding my mouth right, or that looks like a bug.

> Thanks.

We're not home yet.

Erik



intermittent or not? "Could not resolve 'deb.debian.org'"

2019-05-11 Thread Erik Josefsson
I have successfully put the [5 May Teres image] on three SD cards and 
all is fine (well, as far as that the exploration of the box-add-gui 
option goes), except that it seems only one of the SD cards can 
sometimes connect to deb.debian.org when I do sudo apt update.


The other two say "Could not resolve 'deb.debian.org'", every time i try.

The old hp laptop that is about to break down does sudo apt update 
without complaining.


The three SD cards should be identical.

Can there be a limit on the server deb.debian.org on how many times I 
can ask it for data?


Can there be a limit on my wifi router?

Are the SD cards not identical after all? If not, where do I look for a 
difference that could explain the difference between how they work when 
doing apt update?


Server response looks like this:

debian@box:~$ sudo apt update
Err:1 http://deb.debian.org/debian buster InRelease
  Could not resolve 'deb.debian.org'
Err:2 http://deb.debian.org/debian buster-updates InRelease
  Could not resolve 'deb.debian.org'
Err:3 http://security.debian.org/debian-security buster/updates InRelease
  Could not resolve 'security.debian.org'

The same command of course works perfectly fine when I connect the Teres 
laptop directly to the internet with an ethernet cable (through USB).


Best regards.

//Erik

[5 May Teres image] 
https://box.redpill.dk/nonfree/nonfree-teres1-buster-1.0rc1.img.gz







Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-11 Thread Erik Josefsson

Den 2019-05-11 kl. 01:22, skrev Jonas Smedegaard:

Quoting Erik Josefsson (2019-05-11 00:51:38)

My original problem was that I could not figure out how to get both
Swedish and pipe "|" at all (which Jonas duly noted by removing "¦"
from the original subject line).

I edited the subject line in my posts unrelated to the content of the
thread: Since recently emails sent by my "alot" which is my main Mail
User Agent (MUA) gets rejected by Debian servers if header fields
contain non-ASCII characters.


The unintended consequence of interpreting your slight edit of the 
subject line as a comment on the content of the thread was that I 
learned a lot about my own mistakes :-)


Thank you!

That encourages me to ask another stupid question: I'd like to know why 
the "Keyboard model" has to be set before "Keyboard layout" when walking 
through the dpkg-reconfigure menues?


If it was the other way around, the first choice, "Keyboard layout", 
could perhaps make an informed selection from the list of "Keyboard 
models" that could be relevant at all.


In any case, what you care about as a user is "Keyboard layout", and in 
most cases when you have to make a series of choices, you start with 
your known knowns, not your known unknowns.


Best regards.

//Erik



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-10 Thread Erik Josefsson

Den 2019-05-10 kl. 18:21, skrev David Wright:

On Fri 10 May 2019 at 15:45:34 (+0200), Erik Josefsson wrote:



https://www.iso.org/standard/57852.html

If it was compliant, then I guess that would make an informed choice
of "Keyboard model" easier than it is now.





The only rule I know is that claiming compliance with standards can
cost serious money.



Thanks for that insight and explanation!



And there's my major hick-up: 7 keys would be plenty if the output
would suffice to consist of about 100 different signals since 2^7=128
(to later map on characters, numbers and whatnot). 8 keys would be
excessive. I do understand the historical reasons for 105 keys (or
80), but how they relate to what really matters (the digital output)
is a mystery.

I don't think that these shifty keys are treated in such a logical
manner. I've always assumed that there's a keyboard controller chip
that's stamping "personality" on the keys, particularly Fn.



Indeed there is a keyboard controller chip that "takes care of all 
keyboard matrix scanning, key de-bouncing and communications with the 
computer, and has an internal buffer if the keystroke data cannot be 
sent immediately. The PC motherboard decodes the data received from the 
keyboard via the PS/2 port using interrupt IRQ1".


More from same source: "If, for example, you press 'shift' and 'A' then 
both keys will generate their own scan codes, the 'A' scan code value is 
not changed if a shift or control key is also pressed. Pressing the 
letter 'A' generates 'lC'h make code and when released the break code is 
'F0'h, 'lC'h.

Pressing 'shift' and 'A' keys will generate the following scan codes:
The make code for the 'shift' key is sent '12'h.
The make code for the 'A' key is sent 'lC'h.
The break code for the 'A' key is sent 'F0'h, 'lC'h.
The break code for the 'shift' key is sent 'F0'h,' 12'h.
If the right shift was pressed then the make code is '59'h and break 
code is 'F0'h, '59'h.
By analysing these scan codes the PC software can determine which key 
was pressed. By looking at the shift keystroke the software can 
distinguish between upper and lower case."


source: 
https://www.isy.liu.se/edu/kurs/TSTE12/laboration/TSTE12_Lab1_170824.pdf


Thanks for the hints leading me to that page.



It cannot really be physicality of the "Keyboard models", nor the
(brand) names of the them, but rather the digital output that is
defining whether one "Keyboard model" is different from the other. Or
am I completely wrong here?

If I am not wrong, the next question is if there are really 193
different keyboard models in that sense?

I mean, with the same keyboard layout (e.g. Finnish), how many of the
193 would give the exact same result on screen with one particular
keyboard (e.g. the Teres laptop)?

I guess more than two (which I now know is the case).

My own take: to be on that list, someone maintaining X has to obtain a
model of that keyboard to map out all the keys. By the time that's
been done, time has past and you likely will find that that model is
history as far as shopping is concerned. Unlike with kernel
development, there's not the pressure to keep up with new models as
they come out. Pruning the list of its older models is not a
priority either.



Unfortunately that makes perfect sense.





I guess that with only 80 keys on your keyboard, many of the
differences between these different models are dealing with keys you
simply don't have. I can use pc105 for all my laptop, however many
keys they have.

As far as I can see, the "source code" to Teres' keyboard does not say
anything about that, but the Schematics file lists 25 different keys
(KBD_X0 to KBD_X16 and KBD_Y0 to KBD_Y7), and there is a micro
controller ATMEGA16U4-AU.

https://github.com/OLIMEX/DIY-LAPTOP/blob/master/HARDWARE/A64-TERES/TERES-PCB5-KEYBOARD/Rev.A/TERES-PCB5-KEYBOARD_Rev.A.sch

I'm fine with thinking that KBD_X0, KBD_X1 etc on the "inside" are
connected to the 40 physical keys on the "outside". Actually with 23
electronic keys to combine, it would be enough with an unique output
per electronic key plus ,  and + to get 92
different combinations. That should be enough, no?

Enough for what? I'm not sure what you mean. But as far as your use of
the keyboard is concerned, the keypresses have been through the
microprocessor, the kernel, and perhaps the xorg driver, so you're
not going to see any one-to-one mapping.



Sorry for writing out loud, I'm not sure what I was thinking. But 
anyway, it should be possible to write a program that listens to 
keypresses and asks you to press different keys like the "left-of-z key" 
and then suggest to you which "Keyboard model" you actually have, 
regardless which "Keyboard model" you have chosen with dpkg-reconfigure. 
Then no pruning of the list would be necessary.


(I mean something like "people who have ¦ left of Z of

Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-10 Thread Erik Josefsson

Hi David!

Thanks for helping me sort out my thoughts!

Den 2019-05-06 kl. 22:42, skrev David Wright:

On Sun 05 May 2019 at 20:52:40 (+0200), Erik Josefsson wrote:

Den 2019-05-05 kl. 16:26, skrev David Wright:

Is this some sort of ticking off for wondering why the OP is*so*
keen to be able to type ¦ directly on the keyboard that they are
almost willing to use a USB keyboard with a laptop to get it?
Particularly as the wiki page referred to above has a reference to
http://jkorpela.fi/latin1/3.html#A6
which states "It is advisable to avoid using this character, since its
code position is occupied by another character in ISO Latin 9 (alias
ISO 8859-15), which will probably widely replace ISO Latin 1 at least
in European usage."

Now, using Unicode might avoid this danger, but it's still odd to
want this character so much when it appears to be as much of a relic
as the aforementioned ECU is. And, after all, the answer is that
they didn't.

For what it's worth, I had the foggy idea that I had to figure out how
to make the Teres keyboard reproduce the output from the Scandinavian
USB keyboard. What else would be "right"?

[Disclaimer: I'm not familiar with the Teres keyboard beyond looking at
https://www.olimex.com/Products/DIY-Laptop/SPARE-PARTS/TERES-006-Keyboard/
(assuming this is it), and I've no idea of what keys your USB keyboard
has, nor knowledge of Swedish keyboard conventions.]


Yes, that's the Teres keyboard.

The wikipedia picture ofISO/IEC 9995-3:2002 applied to the US keyboard 
layout has 3 keys to the left and 4 keys to the right of the spacebar. 
Teres has 4 keys to the left and 3 keys to the right, otherwise they 
look the same (also the print on the keys):


https://en.wikipedia.org/wiki/ISO/IEC_9995#/media/File:KB_US-ISO9995-3.svg

This similarity makes me wonder why I cannot find any information from 
Olimex (or elsewhere) whether the Teres keyboard is fully compliant with 
the ISO standard that seems to be the one at hand (and which also seems 
current):


https://www.iso.org/standard/57852.html

If it was compliant, then I guess that would make an informed choice of 
"Keyboard model" easier than it is now.


I also guess that compliance would not only mean that the number of 
keys, their relative positions and the print on the keycaps would be 
defined, but also, and more importantly, that the digital output would 
follow certain rules.


And there's my major hick-up: 7 keys would be plenty if the output would 
suffice to consist of about 100 different signals since 2^7=128 (to 
later map on characters, numbers and whatnot). 8 keys would be 
excessive. I do understand the historical reasons for 105 keys (or 80), 
but how they relate to what really matters (the digital output) is a 
mystery.



It cannot really be physicality of the "Keyboard models", nor the 
(brand) names of the them, but rather the digital output that is 
defining whether one "Keyboard model" is different from the other. Or am 
I completely wrong here?


If I am not wrong, the next question is if there are really 193 
different keyboard models in that sense?


I mean, with the same keyboard layout (e.g. Finnish), how many of the 
193 would give the exact same result on screen with one particular 
keyboard (e.g. the Teres laptop)?


I guess more than two (which I now know is the case).



When the 105 and 102 options then gave the same result, it got
completely lost.

And I'm still kind of lost since I don't really understand what a
"Keyboard model" is. So already at the first menu choice of
dpkg-reconfigure keyboard-configuration I don't really know what I'm
doing there.

In the dpkg-reconfigure keyboard-configuration menu there are [193
different keyboard models] to choose from.

But two of them are the same, at least from the point of view of a
Teres laptop.

How does that work?

I guess that with only 80 keys on your keyboard, many of the
differences between these different models are dealing with keys you
simply don't have. I can use pc105 for all my laptop, however many
keys they have.



As far as I can see, the "source code" to Teres' keyboard does not say 
anything about that, but the Schematics file lists 25 different keys 
(KBD_X0 to KBD_X16 and KBD_Y0 to KBD_Y7), and there is a micro 
controller ATMEGA16U4-AU.


https://github.com/OLIMEX/DIY-LAPTOP/blob/master/HARDWARE/A64-TERES/TERES-PCB5-KEYBOARD/Rev.A/TERES-PCB5-KEYBOARD_Rev.A.sch

I'm fine with thinking that KBD_X0, KBD_X1 etc on the "inside" are 
connected to the 40 physical keys on the "outside". Actually with 23 
electronic keys to combine, it would be enough with an unique output per 
electronic key plus ,  and + to get 92 
different combinations. That should be enough, no?




What's more important is the layout: for example a British layout
puts \| left of z, whereas a US one will make that key <> and the
\| will be 3 keys right of p. In response 

Re: Netiquette [Was: Re: pmount could perhaps be of greater utility?

2019-05-07 Thread Erik Christiansen
On 07.05.19 09:05, rhkra...@gmail.com wrote:
> So, I'll use "publicly" -- I was going to do that, but it just seemed wrong 
> at 
> the time ;-)

It seems harder to remember uncommon spelling now than when I was
younger, and until the spellchecker disagreed, I'd gone with your
spelling - it's more consistent. But then English isn't famous for that.

Erik



Netiquette [Was: Re: pmount could perhaps be of greater utility?

2019-05-07 Thread Erik Christiansen
On 07.05.19 07:38, rhkra...@gmail.com wrote off-list:
> On Tuesday, May 07, 2019 12:01:49 AM Erik Christiansen wrote:
> >  only the author is dumb enough 
> 
> Why use language like that?  (It does not contribute to the welcoming 
> environment that I'd like to see cultivated here.)
> 
> Aside: I've replied privately, but I would like to reply publically (sp?) in 
> order to spread the message, but only if you feel comfortable with that 
> (which 
> I don't expect you will).)

If my judgemental wording has offended the author on the other list,
then I will admit to careless use of language. The out-of-the-blue shot
across my bow from David, using that awkwardly and unproductively
constructed use case looked like a deliberate straw man attack, coming
hot on the heels of a deprecation attempt. Where a shell provides syntax
alternatives, all still documented and supported, it may be perceived as
unwelcoming and unproductive to spontaneously hound one usage in favour
of one's own bias. Still, it would be better if my response had been more
sanguine.

Erik

P.S. s/publically/publicly   (Yep, spellchecking in Vim in Mutt is OK
  with that. Caveat: I use a British
  dictionary. Haven't checked for possible USA
  divergent spelling.)
-- 
Time is a great teacher, but unfortunately it kills all its pupils.
  - Hector Louis Berlioz



Remove nautilus to stop automounts? [Was: Re: pmount could perhaps be of greater utility?

2019-05-07 Thread Erik Christiansen
On 04.05.19 13:48, Jonas Smedegaard wrote:
> Quoting Erik Christiansen (2019-05-04 08:43:53)
> >  There doesn't seem to be an option for pmount to mount at
> >  /media/label_read_from_the_media
...
> I don't personally use pmount since some years, but that sure sounds 
> like a nice suggestion: Please consider filing as a bugreport against 
> pmount with severity "wishlist".

Hmmm, reportbug says:

Your version (0.9.23-2) of pmount appears to be out of date.
The following newer release(s) are available in the Debian archive:
  experimental: 0.9.99-alpha-1
  unstable: 0.9.23-3+b2
Do you still want to file a report [y|N|q|?]? N

but

# apt-get update
# apt-get install pmount

gives:

pmount is already the newest version.

so I'd probably have to move from wheezy to something newer to be up to
date on that utility. No time for that now.

The nifty pmount feature becomes unnecessary if I instead disable the
automounter, eliminating label-defined mountpoints. But:

# apt-get install dconf-editor  # gives:

The following packages have unmet dependencies:
 dconf-editor : Depends: libdconf1 (>= 0.25.1) but it is not going to be 
installed
Depends: libglib2.0-0 (>= 2.55.1) but 2.33.12+really2.32.4-5 is 
to be installed
Depends: libgtk-3-0 (>= 3.22.0) but 3.4.2-7+deb7u1 is to be 
installed

so the easiest way might just be to remove nautilus, as it's never been
used here. The gnome DE wouldn't fall over without it?  

Erik



Re: pmount could perhaps be of greater utility?

2019-05-06 Thread Erik Christiansen
On 07.05.19 10:12, David wrote:
> On Mon, 6 May 2019 at 23:53, Erik Christiansen  
> wrote:
> > On 06.05.19 09:03, Greg Wooledge wrote:
> > > On Sat, May 04, 2019 at 01:48:01PM +0200, Jonas Smedegaard wrote:
> > > > Quoting Erik Christiansen (2019-05-04 08:43:53)
> 
> > > > >  pmount $1 `e2label $1`
> 
> > > and is using the ancient deprecated command substitution syntax (which
> > > will work in this case, but is not a good habit).
> 
> > That does appear to remain opinion. The venerably traditional syntax is
> > still fully legal supported bash syntax, e.g.:
> >
> > http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03
> >
> > The recent (late last century, IIRC) introduction of the $(...)
> > alternative syntax has admittedly brought newer *nix users who know
> > nothing else, and so delude themselves that there is nothing else. That
> > is a misapprehension. To each, his own, especially amongst adequately
> > equivalent alternatives.
> 
> Hi Erik
> 
> Maybe you would enjoy answering this question then?
> https://lists.gnu.org/archive/html/help-bash/2019-05/msg0.html
> 
> Because apparently no-one else has, hehe :D

I can see why - the question wilfully exploits the fact that bash is not
a full programming language, and only the author is dumb enough to construct
such self defeating perversity as using two echos to fabricate difficulty
where none need exist. (Please read next paragraph before kneejerking.)

In a real case of substitution of more substantial commands, it is both
simple and convenient to perform the operations sequentially (i.e. on
separate lines), rather than obfuscate with unnecessary nesting.

Having an intermediate result in a shell variable can often save a lot
of debugging time, both during script development and later, when
unanticipated input causes undesired effects. Having to deconstruct a long
nested assemblage in order to debug it leads to a chained implementation
in any event.

Erik

-- 
Good judgement comes from experience.
Experience comes from bad judgement.  - Jim Horning



Re: pmount could perhaps be of greater utility?

2019-05-06 Thread Erik Christiansen
On 06.05.19 09:03, Greg Wooledge wrote:
> On Sat, May 04, 2019 at 01:48:01PM +0200, Jonas Smedegaard wrote:
> > Quoting Erik Christiansen (2019-05-04 08:43:53)
> > >  $ which lmount
> > >  lmount is a function
> > >  lmount () 
> > >  { 
> > >  pmount $1 `e2label $1`
> > >  }
> > 
> > I recommend to install package shellcheck and run "shellcheck lmount".
> 
> My initial reaction was similar, but he might not be using a regular
> shell.  At the very least, his "which" command is not the standard
> which(1) utility, because that wouldn't know about shell functions.
> 
> So, either he isn't in bash/ksh/dash, or his "which" command has been
> overridden with a function or alias.  (On the other hand, his output
> from "which" looks identical to bash's "type" output.  So maybe he
> did something like alias which=type.)

Well surmised, good sir. It's more than 30 years since I found "which"
on HP-UX inadequate and "type" meaninglessly mnemonic of "print", thus
the alias. Through SunOS, Solaris, and Linux, the inadequacy has
remained - and so the remedy.

> At the end of the day, if this is supposed to be a bash function, it
> has three quoting errors,

Yep, if the robustness required for users other than an author were
applicable, then I see two absences of double quotes. But it is worth
remembering that there are no robustness requirements when the author is
the only user, and supporting a space in "/dev/xxx" is in any event a
pointless exercise.

> and is using the ancient deprecated command substitution syntax (which
> will work in this case, but is not a good habit).

That does appear to remain opinion. The venerably traditional syntax is
still fully legal supported bash syntax, e.g.:

http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_06_03

The recent (late last century, IIRC) introduction of the $(...)
alternative syntax has admittedly brought newer *nix users who know
nothing else, and so delude themselves that there is nothing else. That
is a misapprehension. To each, his own, especially amongst adequately
equivalent alternatives.

HAND

Erik
(Who has used the newfangled syntax on occasion, just to see if it works.)

-- 
Do not do unto others as you would they should do unto you.
Their tastes may not be the same.
  - George Bernard Shaw



Re: apache2 missing a file, won't run.

2019-05-06 Thread Erik Christiansen
On 05.05.19 17:16, Gene Heskett wrote:
> You have made it very clear not to assign a pw to root, do everything 
> with sudo.

That's just religion, Gene, promulgated to minimise queries and
complaints from people getting themselves into trouble. Like
vaccination, it only needs 95% coverage to provide herd immunity. To
avoid having to fuss with getting the sudo thing to actually work here,
I still do a "su -" in a spare xterm, and leave the root session open
for a while, till the current problem is sorted.

To remind that more than ordinary user care is warranted in that xterm,
in the event of leaving it open beyond short term memory, I put this in
/root/.bashrc

export PS1="\[\033[1;31m\]\u@\h:\W\$ \[\033[0;0m\]"

to make root's prompt red, and declare itself as root.

It takes more than a generalisation to alter my habits of more than 30
years. My take is: Use what works best for you, especially if you accept
the consequences without complaint. But I figure I'm treading a parallel
path to yours there.

Erik



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-05 Thread Erik Josefsson

Den 2019-05-05 kl. 16:26, skrev David Wright:

Is this some sort of ticking off for wondering why the OP is*so*
keen to be able to type ¦ directly on the keyboard that they are
almost willing to use a USB keyboard with a laptop to get it?
Particularly as the wiki page referred to above has a reference to
http://jkorpela.fi/latin1/3.html#A6
which states "It is advisable to avoid using this character, since its
code position is occupied by another character in ISO Latin 9 (alias
ISO 8859-15), which will probably widely replace ISO Latin 1 at least
in European usage."

Now, using Unicode might avoid this danger, but it's still odd to
want this character so much when it appears to be as much of a relic
as the aforementioned ECU is. And, after all, the answer is that
they didn't.


For what it's worth, I had the foggy idea that I had to figure out how 
to make the Teres keyboard reproduce the output from the Scandinavian 
USB keyboard. What else would be "right"?


When the 105 and 102 options then gave the same result, it got 
completely lost.


And I'm still kind of lost since I don't really understand what a 
"Keyboard model" is. So already at the first menu choice of 
dpkg-reconfigure keyboard-configuration I don't really know what I'm 
doing there.


In the dpkg-reconfigure keyboard-configuration menu there are [193 
different keyboard models] to choose from.


But two of them are the same, at least from the point of view of a Teres 
laptop.


How does that work?

//Erik

[193 different keyboard models]

A4Tech KB-21
A4Tech KBS-8
A4Tech Wireless Desktop RFKB-23 — безжична
Acer AirKey V
Acer C300
Acer Ferrari 4000
Acer portàtil
Advance Scorpius KI
Amiga
Apple
Apple Aluminium (ANSI)
Apple Aluminium (ISO)
Apple Aluminium (JIS)
Apple portàtil
Asus portàtil
Atari TT
Azona RF2300 wireless Internet
BenQ X-Touch
BenQ X-Touch 730
BenQ X-Touch 800
Brother Internet
BTC 5090
BTC 5113RF Multimedia
BTC 5126T
BTC 6301URF
BTC 9000
BTC 9000A
BTC 9001AH
BTC 9019U
BTC 9116U Mini Wireless Internet and Gaming — безжична, за Интернет и игри
Cherry Blue Line CyBo@rd
Cherry Blue Line CyBo@rd (alt.)
Cherry B.UNLIMITED
Cherry CyBo@rd USB-Hub
Cherry CyMotion Expert
Cherry CyMotion Master Linux
Cherry CyMotion Master XPress
Chicony Internet
Chicony KB-9885
Chicony KU-0108
Chicony KU-0420
Chromebook
Classmate PC
Compaq Armada portàtil
Compaq Easy Access
Compaq Internet (13 tecles)
Compaq Internet (18 tecles)
Compaq Internet (7 tecles)
Compaq iPaq
Compaq Presario portàtil
Creative Desktop Wireless 7000 — безжична
Dell
Dell 101-key PC
Dell Inspiron 6000/8000 portàtil
Dell Latitude portàtil
Dell Precision M65 portàtil
Dell Precision M portàtil
Dell SK-8125
Dell SK-8135
Dell USB Multimedia
Dexxa Wireless Desktop
Diamond 9801/9802
DTK2000
eMachines m6800 portàtil
Ennyah DKB-1008
Everex STEPnote
FL90
Fujitsu-Siemens Amilo portàtil
Generies 101-sleutel PC
Generies 104-sleutel PC
Genius Comfy KB-12e
Genius Comfy KB-16M/Multimedia KWD-910
Genius Comfy KB-21e-Scroll
Genius KB-19e NB
Genius KKB-2050HS
Gyration
Happy Hacking
Happy Hacking per Mac
Hewlett-Packard Internet
Hewlett-Packard Mini 110 portàtil
Hewlett-Packard NEC SK-2500 Multimedia
Hewlett-Packard nx9020
Hewlett-Packard Omnibook 500
Hewlett-Packard Omnibook 500 FA
Hewlett-Packard Omnibook 6000/6100
Hewlett-Packard Omnibook XE3 GC
Hewlett-Packard Omnibook XE3 GF
Hewlett-Packard Omnibook XT1000
Hewlett-Packard Pavilion dv5
Hewlett-Packard Pavilion ZT1100
Honeywell Euroboard
HTC Dream
IBM Rapid Access
IBM Rapid Access II
IBM Space Saver
IBM ThinkPad 560Z/600/600E/A22E
IBM ThinkPad R60/T60/R61/T61
IBM ThinkPad Z60m/Z60t/Z61m/Z61t
Keytronic FlexPro
Logitech
Logitech Access
Logitech Cordless Desktop
Logitech Cordless Desktop (alt.)
Logitech Cordless Desktop EX110
Logitech Cordless Desktop iTouch
Logitech Cordless Desktop LX-300 — безжична
Logitech Cordless Desktop Navigator
Logitech Cordless Desktop Optical
Logitech Cordless Desktop Pro (2a. alt.)
Logitech Cordless Freedom/Desktop Navigator
Logitech diNovo
Logitech diNovo Edge
Logitech G15, допълнителни клавиши чрез G15daemon
Logitech Internet
 Logitech Internet 350
Logitech Internet Navigator
Logitech iTouch
Logitech iTouch Cordless Y-RB6
Logitech iTouch Internet Navigator SE
Logitech iTouch Internet Navigator SE USB
Logitech Ultra-X
Logitech Ultra-X Cordless Media Desktop
MacBook/MacBook Pro
MacBook/MacBook Pro (intl.)
Macintosh
Macintosh (oud)
Memorex MX1998
Memorex MX2500 EZ-Access
Memorex MX2750
Microsoft Comfort Curve 2000
Microsoft Internet
Microsoft Internet Pro (Suec)
Microsoft Natural Elite
Microsoft Natural Ergonomic 4000
Microsoft Natural Pro OEM
Microsoft Natural Pro/Internet Pro
Microsoft Natural Pro USB/Internet Pro
Microsoft Natural Wireless Ergonomic 7000
Microsoft Natuurlik
Microsoft Office sleutelbord
Microsoft Wireless Multimedia 1.0A
NEC SK-1300
NEC SK-2500
NEC SK-6200
NEC SK-7100
Northgate OmniKey 101
OLPC
Ortek Multimedia/Internet MCK-800
PC-98
PC genèric de 102 tecles (intl.)

Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-05 Thread Erik Josefsson

Den 2019-05-05 kl. 12:47, skrev Jonas Smedegaard:

Quoting Erik Josefsson (2019-05-05 12:06:53)

With some stickers to put onto the printed keys I'll be fine. Grateful
for pointers to such.

Did you try search the web e.g. for "keyboard stickers"?

I did! And "swerty" came up!

http://johanegustafsson.net/projects/swerty/

He says "Swerty for Linux" has been tested  on Ubuntu 9.04, 9.10, 10.04, 
and 12.04.


I guess this means I could file a whishlist bug for both "TERES-I 
keyboard" as 'Keyboard model' and and "Swerty" as 'Keyboard layout' as 
choices presented by dpkg-reconfigure keyboard-configuration :-)


Best regards.

//Erik



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-05 Thread Erik Josefsson

Den 2019-05-05 kl. 04:29, skrev Erik Josefsson:

Den 2019-05-04 kl. 21:43, skrev Jonas Smedegaard:

For danish, picking the layout "Danish (Win keys) has pipe key reachable
as AltGr+= (where AltGr is the right Alt key).

I also set "Menu" (which is the key between right Alt and right Ctrl) as
compose key.


So if you were to make a Danish Teres laptop, you'd make the following 
choices in dpkg-reconfigure keyboard-configuration?


Keyboard model:  Generic 102-key PC (intl.)
Keyboard layout: Danish - (Win keys)
Key to function as AltGr:    The default for the keyboard layout
Compose key: Menu key
Use Control+Alt+Backspace to
terminate the X server?  

Those won't work for me, but there are a couple of Finnish options I 
will try. 


Found that keyboard model "Generic 102-key PC (intl.)" and keyboard 
layout "Finnish - Finnish (Winkeys)" works for me (the rest as above).


At last! :-)

With some stickers to put onto the printed keys I'll be fine. Grateful 
for pointers to such.


Sorry for the noise.

//Erik


Configuring keyboard-configuration

Please select the model of the keyboard of this machine.
-Keyboard model: Generic 102-key PC (intl.)
Please select the layout matching the keyboard for this machine.
-Keyboard layout: Danish - Danish (Win keys) [and below "Finnish - 
Finnish (Winkeys)"]
With some keyboard layouts, AltGr is a modifier key used to input some 
characters, primarily ones that are unusual for the language of the 
keyboard layout, such as foreign currency symbols and accented letters. 
These are often printed as an extra symbol on keys.

-Key to function as AltGr:  The default for the keyboard layout
The Compose key (known also as Multi_key) causes the computer to 
interpret the next few keystrokes as a combination in order to produce a 
character not found on the keyboard. On the text console the Compose key 
does not work in Unicode mode. If not in Unicode mode, regardless of 
what you choose here, you can always also use the Control+period 
combination as a Compose key.

-Compose key:  Menu key
By default the combination Control+Alt+Backspace does nothing. If you 
want it can be used to terminate the X server.

-Use Control+Alt+Backspace to terminate the X server? 

Danish - Danish (Win keys)

½½11223344556677889900++´
qqwweerrttyyuuiiooppåå¨''
aassddffgghhjjkkllææøø
zzxxccvvbbnnmm,,..--


§§!!""##¤¤%%&&//(())==??`
QQWWEERRTTYYUUIIOOPPÅÅ^**
AASSDDFFGGHHJJKKLLÆÆØØ
ZZXXCCVVBBNNMM;;::__


¾¾¡¡@@££$$€€¥¥{{[[]]}}±±||
@@łł€€®®þþ←←↓↓→→œœþþ¨~˝
ªªßßððđđŋŋħħ̉ĸĸłł´^
««»»©©““””nnµµ¸··̣

+
¶¶¹¹²²³³¼¼¢¢⅝⅝÷÷««»»°°¿¿¦¦
ΩΩŁŁ¢¢®®ÞÞ¥¥↑↑ııŒŒÞÞ°ˇ××
ºº§§ÐЪªŊŊĦĦ̛&&ŁŁ˝ˇ
<<>>©©‘‘’’NNºº˛˙˙

Finnish - Finnish (Winkeys)

§§11223344556677889900++´
qqwweerrttyyuuiiooppåå¨''
aassddffgghhjjkkllööää
zzxxccvvbbnnmm,,..--


½½!!""##¤¤%%&&//(())==??`
QQWWEERRTTYYUUIIOOPPÅÅ^**
AASSDDFFGGHHJJKKLLÖÖÄÄ
ZZXXCCVVBBNNMM;;::__


/@@££$$€€‚‚{{[[]]}}\\¸
qqww€€rrþþyyuuııœœ̛˝~ˇ
əəßßððffgghhjjĸĸ/øøææ
ʒʒ××ccvvbbŋŋµµ’’̣––

+
¡¡””»»««““„„<<>>°°¿¿˛
QQWWRRÞÞYYUU||ŒŒ̉°ṓ
ƏƏẞẞÐÐFFGGHHJJØØÆÆ
ƷƷ··CCVVBBŊŊ——‘‘˙,



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|" and "¦"?)

2019-05-04 Thread Erik Josefsson

Den 2019-05-05 kl. 04:31, skrev Doug:


What is on the last key on the right, directly above the right Enter 
key? On a US keyboard, the is a back slant (unshifted) and the pipe, 
shifted. You haven't mentioned that key at all.


The print on that physical key on the Teres laptop is backslash \ and 
(shifted) pipe | .


The keyboard physically looks like this (also the black letters map on 
the print on the keys):


https://en.wikipedia.org/wiki/ISO/IEC_9995#/media/File:KB_US-ISO9995-3.svg

except for the last row that from left has 
.


Btw, that svg file seems to refer to an ISO standard that looks current:

https://www.iso.org/standard/57852.html

So maybe the Teres keyboard is actually standard compliant, despite (or 
thanks to?) the penguin key?


//Erik








Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-04 Thread Erik Josefsson

Den 2019-05-04 kl. 21:43, skrev Jonas Smedegaard:

For danish, picking the layout "Danish (Win keys) has pipe key reachable
as AltGr+= (where AltGr is the right Alt key).

I also set "Menu" (which is the key between right Alt and right Ctrl) as
compose key.


So if you were to make a Danish Teres laptop, you'd make the following 
choices in dpkg-reconfigure keyboard-configuration?


Keyboard model:  Generic 102-key PC (intl.)
Keyboard layout: Danish - (Win keys)
Key to function as AltGr:    The default for the keyboard layout
Compose key: Menu key
Use Control+Alt+Backspace to
terminate the X server?  

Those won't work for me, but there are a couple of Finnish options I 
will try.


Thanks for taking time.

//Erik



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|")

2019-05-04 Thread Erik Josefsson

Den 2019-05-04 kl. 19:08, skrev Jonas Smedegaard:

Quoting Kenneth Parker (2019-05-04 18:23:48)

On Sat, May 4, 2019 at 10:37 AM Erik Josefsson  wrote:



-> Generic 105-key PC (intl.)
-> Other
-> Swedish
-> Swedish
-> The default for the keyboard layout
-> No compose key
-> Use Control+Alt+Backspace to terminate the X server? 
sudo shutdown -h now

And it works! Now I am just missing "|" and "¦".

Nothing specific to Teres-I laptop about that.


How do you know?

There are no signs on the box telling me that the Teres laptop keyboard 
is one or the other of the [keyboards listed] by dpkg-reconfigure 
keyboard-configuration and the link to the hardware source don't say 
either:


https://github.com/OLIMEX/DIY-LAPTOP/tree/master/HARDWARE/A64-TERES/TERES-PCB5-KEYBOARD


Problem is that you want a pipe key "|" reachable


Yes, that is the problem!


on a 102-key keyboard


The Teres laptop keyboard has 80 physical keys. Why do you call it a 
"102-key keyboard"?



with a swedish layout.

Swedish layout is this: https://en.wikipedia.org/wiki/QWERTY#Swedish

Notice how "<" and ">" (on a 105-key US layout is right of "M", shifted)
is left of "Z" on a key which is missing on 102-char keyboards.


Myscandinavian USB keyboard has 105 physical keys, but since the Teres 
laptop keyboard has 80 physical keys I cannot really notice "a key which 
is missing on 102-char keyboards".


Please note that both myUSB keyboard and the Teres keyboard delivers 
identical output with the two dpkg-reconfigure keyboard-configuration 
options I have tried "Generic 105-key PC (intl.)" and "Generic 102-key 
PC (intl.)".


Thanks for feedback!

//Erik


[keyboards listed]

A4Tech KB-21
A4Tech KBS-8
A4Tech Wireless Desktop RFKB-23 — безжична
Acer AirKey V
Acer C300
Acer Ferrari 4000
Acer portàtil
Advance Scorpius KI
Amiga
Apple
Apple
Apple Aluminium (ANSI)
Apple Aluminium (ISO)
Apple Aluminium (JIS)
Apple portàtil
Asus portàtil
Atari TT
Azona RF2300 wireless Internet
BenQ X-Touch
BenQ X-Touch 730
[and more...]



Re: dpkg-reconfigure keyboard-configuration (Swedish with "|" and "¦"?)

2019-05-04 Thread Erik Josefsson

Den 2019-05-04 kl. 18:23, skrev Kenneth Parker:


On Sat, May 4, 2019 at 10:37 AM Erik Josefsson  wrote:


-> Generic 105-key PC (intl.)
-> Other
-> Swedish
-> Swedish
-> The default for the keyboard layout
-> No compose key
-> Use Control+Alt+Backspace to terminate the X server? 
sudo shutdown -h now

And it works! Now I am just missing "|" and "¦".


With US Keyboards, I see either of those characters, right of the "p" 
key.  I was not aware that there were two, distinct characters.


One of them ("|" on my current keyboard) is used as a "Pipe" symbol, 
for when I "pipe" the results of one command into another.


Which?



Actually, I'm just missing pipe (for exactly that reason).

The "¦" symbol is apparently called "broken bar" and happens to be the 
what my "scandinavian" USB- keyboard gives when the physical key between 
the  and the  key is pressed together with gr>+. I have never used it before and I don't think it has a 
function in any language, see wikipedia:


https://en.wikipedia.org/wiki/Vertical_bar#Solid_vertical_bar_vs_broken_bar

I have not yet figured out how to make the Teres keyboard do the pipe.

//Erik




dpkg-reconfigure keyboard-configuration (Swedish with "|" and "¦"?)

2019-05-04 Thread Erik Josefsson
I've now repeated the same sequence of commands a couple of times to 
make [SD-cards for the Teres laptop] and finally it looks like I get the 
same results every time :-)


*** make new Teres SD-card with new Teres laptop
mkdir /home/debian/teres
cd /home/debian/teres
wget http://box.redpill.dk/nonfree/nonfree-teres1-buster-1.0b22.img.gz
gunzip nonfree-teres1-buster-1.0b22.img.gz
lsblk --paths
lsblk --paths
umount /dev/sda
sudo cp nonfree-teres1-buster-1.0b22.img /dev/sda
*** move new Teres SD-card to new Teres laptop
sudo box-fill-disk
sudo apt update
sudo box-add-gui
sudo apt install etckeeper
sudo apt install man
sudo dpkg-reconfigure keyboard-configuration
-> Generic 105-key PC (intl.)
-> Other
-> Swedish
-> Swedish
-> The default for the keyboard layout
-> No compose key
-> Use Control+Alt+Backspace to terminate the X server? 
sudo shutdown -h now

And it works! Now I am just missing "|" and "¦".

I have tried "Generic 105-key PC (intl.)" and "Generic 102-key PC 
(intl.)" in the menue following the command 'dpkg-reconfigure 
keyboard-configuration' (see above), but there is no difference between 
105 and 102 wrt what the Teres keyboard produce on screen (see below).


I have also tried with an USB keyboard which has one extra key between 
 and . That extra key delivers "|") and "¦" with both 
"Generic 105-key PC (intl.)" and "Generic 102-key PC (intl.)" (and Swedish).


I can of course use the USB keyboard with my laptop, but it would be 
more convenient if I could get the Teres keyboard to do "|" and "¦".


So, does anyone know how to make the Teres keyboard not only output 
Swedish letters, but also "|" and  "¦"?


Maybe there is a "keyboard model" I can choose that is a better fit than 
"Generic 105-key PC (intl.)" and"Generic 102-key PC (intl.)"?


Thank you for your time.

//Erik


[SD-cards for the Teres laptop] https://box.redpill.dk/nonfree/


Generic 105-key PC (intl.)

DELTACO USB keyboard

No key pressed
§§11223344556677889900++´
qqwweerrttyyuuiiooppåå¨
aassddffgghhjjkkllööää''
<>ZZXXCCVVBBNNMM;;::__

ALT+GR
¶¶¡¡@@££$$€€¥¥{{[[]]}}\\±±
@@łł€€®®þþ←←↓↓→→œœþþ¨~
ªªßßððđđŋŋħħ̉ĸĸłłøøææ´´
||««»»©©““””nnµµ¸··̣

ALT+GR+SHIFT
¾¾¹¹²²³³¼¼¢¢⅝⅝÷÷««»»°°¿¿¬¬
ΩΩŁŁ¢¢®®ÞÞ¥¥↑↑ııŒŒÞÞ°ˇ
ºº§§ÐЪªŊŊĦĦ̛&&ŁŁØØÆÆ××
¦¦<<>>©©‘‘’’NNºº˛˙˙


Teres keyboard

No key pressed
§§11223344556677889900++´
qqwweerrttyyuuiiooppåå¨''
aassddffgghhjjkkllööää
zzxxccvvbbnnmm,,..--

SHIFT
½½!!""##¤¤%%&&//(())==??`
QQWWEERRTTYYUUIIOOPPÅÅ^**
AASSDDFFGGHHJJKKLLÖÖÄÄ
ZZXXCCVVBBNNMM;;::__

ALT+GR
¶¶¡¡@@££$$€€¥¥{{[[]]}}\\±±
@@łł€€®®þþ←←↓↓→→œœþþ¨~´´
ªªßßððđđŋŋħħ̉ĸĸłłøøææ
««»»©©““””nnµµ¸··̣

ALT+GR+SHIFT
¾¾¹¹²²³³¼¼¢¢⅝⅝÷÷««»»°°¿¿¬¬
ΩΩŁŁ¢¢®®ÞÞ¥¥↑↑ııŒŒÞÞ°ˇ××
ºº§§ÐЪªŊŊĦĦ̛&&ŁŁØØÆÆ
<<>>©©‘‘’’NNºº˛˙˙



Generic 102-key PC (intl.)

DELTACO USB keyboard

No key pressed
§§11223344556677889900++´
qqwweerrttyyuuiiooppåå¨
aassddffgghhjjkkllööää''
<>ZZXXCCVVBBNNMM;;::__

ALT+GR
¶¶¡¡@@££$$€€¥¥{{[[]]}}\\±±
@@łł€€®®þþ←←↓↓→→œœþþ¨~
ªªßßððđđŋŋħħ̉ĸĸłłøøææ´´
||««»»©©““””nnµµ¸··̣

ALT+GR+SHIFT
¾¾¹¹²²³³¼¼¢¢⅝⅝÷÷««»»°°¿¿¬¬
ΩΩŁŁ¢¢®®ÞÞ¥¥↑↑ııŒŒÞÞ°ˇ
ºº§§ÐЪªŊŊĦĦ̛&&ŁŁØØÆÆ××
¦¦<<>>©©‘‘’’NNºº˛˙˙


Teres keyboard

No key pressed
§§11223344556677889900++´
qqwweerrttyyuuiiooppåå¨''
aassddffgghhjjkkllööää
zzxxccvvbbnnmm,,..--

SHIFT
½½!!""##¤¤%%&&//(())==??`
QQWWEERRTTYYUUIIOOPPÅÅ^**
AASSDDFFGGHHJJKKLLÖÖÄÄ
ZZXXCCVVBBNNMM;;::__

ALT+GR
¶¶¡¡@@££$$€€¥¥{{[[]]}}\\±±
@@łł€€®®þþ←←↓↓→→œœþþ¨~´´
ªªßßððđđŋŋħħ̉ĸĸłłøøææ
««»»©©““””nnµµ¸··̣

ALT+GR+SHIFT
¾¾¹¹²²³³¼¼¢¢⅝⅝÷÷««»»°°¿¿¬¬
ΩΩŁŁ¢¢®®ÞÞ¥¥↑↑ııŒŒÞÞ°ˇ××
ºº§§ÐЪªŊŊĦĦ̛&&ŁŁØØÆÆ
<<>>©©‘‘’’NNºº˛˙˙



pmount could perhaps be of greater utility?

2019-05-04 Thread Erik Christiansen
>From the pmount manpage for stretch:

»
 pmount device [ label ]

 This will mount device to a directory below /media if policy is met
 (see below). If  label is given, the mount point will be /media/label,
 otherwise it will be /media/device.
«

 There doesn't seem to be an option for pmount to mount at
 /media/label_read_from_the_media

 To provide that convenient automation, I use:

 $ which lmount
 lmount is a function
 lmount () 
 { 
 pmount $1 `e2label $1`
 }

 Is it worth adding a pmount option to provide that simple but useful
 convenience for general consumption?

 Why? Well some days the automounter just doesn't work on my old Debian
 install. The little LED on the stick blinks furiously for seconds on
 end after stick insertion, but then ... nada. No joy on running mount
 to see if the absence of the GUI navigator-thingy really is indicative.
 And my script for off-site backups expects the backup media at the
 mountpoint which the automounter normally sets, based on the label.
 
 Just a thought.

 Erik



Re: which mutt?

2019-05-03 Thread Erik Christiansen
On 03.05.19 18:01, Russell L. Harris wrote:
> P.S.  Would someone kindly tell me how, while in Mutt and reading a
> message such as this, to launch a browser to open links such as [1]
> and [2] above?

A convenient alternative is to just double-click on a link in mutt's
display in an xterm, then paste anywhere in the middle of firefox/iceweasel
(not in the URL box up top). That works with a simple config:

URL Drop to Invoke:
   To be able to drop a URL anywhere in the window, to open it:
   Put about:config in the URL box, scroll to  middlemouse.contentLoadURL, and
   click to toggle it to true. Now a URL highlighted in an xterm can be pasted
   to firefox (and opened) with one middlemouse click - even if it has a
   spurious space/line-break in it.  (Thanks to John L. Fjellstad)


Then html messages can generally be subjected to e.g.:

text/html; /usr/bin/html2text '%s'; copiousoutput; description=HTML Text

which preserves the recipient's text experience, keeping display in
mutt. (Yup, the real one - since late last millennium. ;-)

Erik

-- 
HTML is not email, and email doesn't contain HTML, so please turn HTML
formatting OFF in your email client. We have filters in place that will
reject your message if your posting contains HTML.
   - http://gpl-violations.org/mailinglists.html



Re: How do I trace changes in configuration files?

2019-05-01 Thread Erik Josefsson

Den 2019-05-01 kl. 13:29, skrev Dan Purgert:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256

Erik Josefsson wrote:

I'm trying to learn how to set up my two Teres laptops so that they are
identical.

[...]

I have tried to document my personal preferences before, but I have
always ended up with unreadable handwritten notes.

This time I thought I should do it in a more systematic way by somehow
capture the difference between the default install and the result of my
(often irrational) efforts to make my machines look and feel like I want
it to.

So, is there a way to trace/record/capture changes in all configuration
files?


There are as many as people reading this channel :)

Probably the simplest (and, to some extent, most error prone) is to
simply make copies, edit only the copies. For example:

   cp orig.conf orig.conf.$(date +%y-%m-%d_%H%M%S)
   vi orig.conf

and then you'll end up with stuff like

   orig.conf
   orig.19-05-01_065356
   orig.19-05-01_104022
   (etc)

Then just use 'diff' against any two files to see what changed between
them.



Thanks Dan, I'll start with that method and maybe later I'll try Jonas' 
proposal with etckeeper and git.


But first, in which top level directories could files that change be 
located?


There are quite a few to choose from: bin, boot, dev, etc, home, lib, 
lib64, lost+found, media, mnt, opt, proc, root, run, sbin, srv, sys, 
tmp, usr and var.





Or you can use a revision tool. I ran across "rcs" a few years ago, and
while it's not something I always use, when I remember, it's pretty good
at what it does.

Either of these could be wrapped up in a little script --

   #!/bin/bash
   # 'rvi' - "revision-controlled" vi wrapper
   # create a backup then edit the original file

   cp -p "$1" "$1".$(date +%y-%m-%d_%H%M%S)
   vi "$1"

   ALTERNATE

   #!/bin/bash
   #'rvi' - revision control vi wrapper
   # use the 'rcs' tool to checkout/checkin files

   co -l "$1"
   vi "$1"
   ci -u "$1"

Personally I like vi, but if you don't, replace it with whatever your
editor of choice is.  The scripts probably have flaws that someone will
point out soon (like calling it with no file, or multiple files, etc).


The idea is then to just replace the default configuration files with
the files where my preferences have been saved.

As far as actually propagating changes, that gets a little more
difficult -- but if all the config files are in $HOME/.config ... well,
just use a cronjob to sync daily or something.



For now, I just want to see where (and if) my setup is stored (e.g. 
where does my wifi's SSID and passphrase end up? maybe in more than one 
place?).


Thanks for your help Dan!

//Erik



How do I trace changes in configuration files?

2019-05-01 Thread Erik Josefsson
I'm trying to learn how to set up my two Teres laptops so that they are 
identical.


I have now repeated the [first steps] a couple of times so that I feel 
that I know what I am doing (I don't necessarily understand what I am 
doing though). I have two identical machines that run from two identical 
SD cards.


So I'm ready for the next step, configuring some of the programs that 
are installed (e.g. shotwell, thunderbird and xfce itself).



I have tried to document my personal preferences before, but I have 
always ended up with unreadable handwritten notes.


This time I thought I should do it in a more systematic way by somehow 
capture the difference between the default install and the result of my 
(often irrational) efforts to make my machines look and feel like I want 
it to.


So, is there a way to trace/record/capture changes in all configuration 
files?


The idea is then to just replace the default configuration files with 
the files where my preferences have been saved.



Thanks for taking time.

//Erik


[first steps] https://box.redpill.dk (I do box-add-gui, not box-add-tui )




Re: Net::DNS::Nameserver

2019-04-26 Thread Erik Christiansen
On 26.04.19 23:09, mick crane wrote:
> I did wonder if was some scheme I was unaware of.
> I noticed a couple of weeks ago somebody used these "::" between words to
> identify something.
> Like in apt you have
> /var/lib/apt/lists/security.debian.org_debian-security_dists_buster_updates_main_source_Sources
> made me think that these dots was some way of identifying a thing so that
> everything is the same over the whole wide world .
> Or something like that.

More the opposite. i.e. make the tail end of the long::name::thingy
identifiable in a _restricted_ scope. The :: nomenclature first appeared
(to my eyes) in C++ several decades ago. For perl to adopt an existing
convention is a step forward for the language.

Here's a brief exchange describing ::, the scope-resolution operator:

https://stackoverflow.com/questions/15649580/using-in-c

Erik

-- 
Arguing that Java is better than C++ is like arguing that grasshoppers taste
better than tree bark.   - Thant Tessman



iwd and DNS (was: Re: Attempting a VERY minimal install (using --no-install-recommends ;))

2019-04-25 Thread Erik Josefsson

Den 2019-04-25 kl. 07:21, skrev David Wright:

The only thing guaranteed by installing the "Depends" is that
all the function calls will point at some runnable code rather than
just pointing into thin air.


Thin air and deep waters is where I'm at.

I'm trying to set up the "tui" [text-based user interface] for the 
[Teres debian laptop].


I think the tui is designed to be quite minimal (hence I post in this 
thread).


I am surprised that I got iwd to connect to MY_OWN_WIFI:

iwctl station wlan0 get-networks
iwctl station wlan0 connect MY_OWN_WIFI

by copying psk file MY_OWN_WIFI.psk from another machine and then by putting it 
into /var/lib/iwd/ on the Teres debian laptop.

But it seems I have no DNS resolution (I can use the links-browser to go to web 
pages by IP numbers, but not by domain names).

I cannot do apt update. I get a "temporary failure resolving 'deb.debian.org'".

I'm not sure what exactly I'm asking for here. I guess I need the IP number of 
a DNS-server that some program can ask where deb.debian.org is located.

Grateful for hints.

Best regards.

//Erik


[text-based user interface] https://box.redpill.dk/  (scroll down to ##Addons)
[Teres debian laptop] https://box.redpill.dk/cli_with_quirks/



Re: What's the device name of my microSD card?

2019-04-21 Thread Erik Josefsson

On 4/21/19 8:05 PM, David Wright wrote:

On Sun 21 Apr 2019 at 18:30:28 (+), Erik Josefsson wrote:

On 4/21/19 6:14 PM, Patrick Wiseman wrote:

 From the command line, 'df' returns free disk space and lists all
mounted devices by device name. (One of probably many ways to do
it!)

On 4/21/19 6:17 PM, Paul Sutton wrote:

if you run lsblk it will list devices connected to the system

Here's the output of both commands, not sure I can figure out which
one(s) is(are) my usb-Generic_STORAGE_DEVICE (i.e. a microSD put into
a USB-thingie):

debian@hamlet:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev  961108    0    961108   0% /dev
tmpfs 201708 3260    198448   2% /run
/dev/mmcblk0p2  61214500 11372112  47335168  20% /
tmpfs    1008520    50808    957712   6% /dev/shm
tmpfs   5120    0  5120   0% /run/lock
tmpfs    1008520    0   1008520   0% /sys/fs/cgroup
tmpfs    1008520    8   1008512   1% /tmp
tmpfs    1008520    0   1008520   0% /var/tmp
/dev/mmcblk0p1    202277    48430    143403  26% /boot
tmpfs 201704   24    201680   1% /run/user/1000

debian@hamlet:~$ lsblk
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda    8:0    1 29.7G  0 disk
└─sda1 8:1    1 29.7G  0 part
mmcblk0  179:0    0 59.5G  0 disk
├─mmcblk0p1  179:1    0  204M  0 part /boot
└─mmcblk0p2  179:2    0 59.3G  0 part /
mmcblk2  179:256  0 13.8G  0 disk
├─mmcblk2p1  179:257  0   50M  0 part
└─mmcblk2p2  179:258  0 13.7G  0 part
mmcblk2boot0 179:512  0   16M  1 disk
mmcblk2boot1 179:768  0   16M  1 disk


When I'm at it, here's the full ls completion from ls -al /dev/disk/by-id

debian@hamlet:~$ ls -al /dev/disk/by-id/
mmc-R1J56L_0x7da477d7
mmc-R1J56L_0x7da477d7-part1
mmc-R1J56L_0x7da477d7-part2
mmc-SN64G_0x3376cd3a
mmc-SN64G_0x3376cd3a-part1
mmc-SN64G_0x3376cd3a-part2
usb-Generic_STORAGE_DEVICE_1532-0:0
usb-Generic_STORAGE_DEVICE_1532-0:0-part1

I don't understand this output from   ls -al   as the -l switch should
show a lot more information, viz:


Indeed, I only pasted completion, not the output. Apologies.

Here's the output:

debdebian@hamlet:/dev/disk/by-id$ ls -al
total 0
drwxr-xr-x 2 root root 200 Apr 21 17:22 .
drwxr-xr-x 7 root root 140 Apr 21 17:22 ..
lrwxrwxrwx 1 root root  13 Apr 21 17:22 mmc-R1J56L_0x7da477d7 -> 
../../mmcblk2
lrwxrwxrwx 1 root root  15 Apr 21 17:22 mmc-R1J56L_0x7da477d7-part1 -> 
../../mmcblk2p1
lrwxrwxrwx 1 root root  15 Apr 21 17:22 mmc-R1J56L_0x7da477d7-part2 -> 
../../mmcblk2p2
lrwxrwxrwx 1 root root  13 Apr 21 17:22 mmc-SN64G_0x3376cd3a -> 
../../mmcblk0
lrwxrwxrwx 1 root root  15 Apr 21 17:22 mmc-SN64G_0x3376cd3a-part1 -> 
../../mmcblk0p1
lrwxrwxrwx 1 root root  15 Apr 21 17:22 mmc-SN64G_0x3376cd3a-part2 -> 
../../mmcblk0p2
lrwxrwxrwx 1 root root   9 Apr 21 17:22 
usb-Generic_STORAGE_DEVICE_1532-0:0 -> ../../sda
lrwxrwxrwx 1 root root  10 Apr 21 17:22 
usb-Generic_STORAGE_DEVICE_1532-0:0-part1 -> ../../sda1




lrwxrwxrwx 1 root root 13 Apr 21 14:52 mmc-SD01G_0x00c2ed5b -> ../../mmcblk0
lrwxrwxrwx 1 root root 15 Apr 21 14:52 mmc-SD01G_0x00c2ed5b-part1 -> 
../../mmcblk0p1

which is showing my SD card out of a digital camera.


Yes, looks the same.




The first line is the card itself, the second is a single partition
containing a FAT16 filesystem.


Thanks for your explanation, it's getting clearer that "disk" (from 
lsblk) is the same as "device name" (as asked for in the instructions) 
and what you call "the card itself".




The names you're quoting should be symbolic links created by udev, and
they should point to the /dev names assigned by the kernel.


It's the usb-Generic storage I want to copy the gz image to.

Your instructions would appear to write to the whole device, which is
quite normal. The image itself will contain any partitioning required.
In my case, that would be to /dev/mmcblk0. It looks like you have more
choice, so take care.



I now think I should copy to /dev/disk/by-id/sda, but I will sleep on it!




Cheers,
David.


Thank you David.

And thanks to everybody.

//Erik



Re: What's the device name of my microSD card?

2019-04-21 Thread Erik Josefsson

On 4/21/19 6:14 PM, Patrick Wiseman wrote:
From the command line, 'df' returns free disk space and lists all 
mounted devices by device name. (One of probably many ways to do it!)


On 4/21/19 6:17 PM, Paul Sutton wrote:

if you run lsblk it will list devices connected to the system


Here's the output of both commands, not sure I can figure out which 
one(s) is(are) my usb-Generic_STORAGE_DEVICE (i.e. a microSD put into a 
USB-thingie):


debian@hamlet:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
udev  961108    0    961108   0% /dev
tmpfs 201708 3260    198448   2% /run
/dev/mmcblk0p2  61214500 11372112  47335168  20% /
tmpfs    1008520    50808    957712   6% /dev/shm
tmpfs   5120    0  5120   0% /run/lock
tmpfs    1008520    0   1008520   0% /sys/fs/cgroup
tmpfs    1008520    8   1008512   1% /tmp
tmpfs    1008520    0   1008520   0% /var/tmp
/dev/mmcblk0p1    202277    48430    143403  26% /boot
tmpfs 201704   24    201680   1% /run/user/1000

debian@hamlet:~$ lsblk
NAME MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda    8:0    1 29.7G  0 disk
└─sda1 8:1    1 29.7G  0 part
mmcblk0  179:0    0 59.5G  0 disk
├─mmcblk0p1  179:1    0  204M  0 part /boot
└─mmcblk0p2  179:2    0 59.3G  0 part /
mmcblk2  179:256  0 13.8G  0 disk
├─mmcblk2p1  179:257  0   50M  0 part
└─mmcblk2p2  179:258  0 13.7G  0 part
mmcblk2boot0 179:512  0   16M  1 disk
mmcblk2boot1 179:768  0   16M  1 disk


When I'm at it, here's the full ls completion from ls -al /dev/disk/by-id

debian@hamlet:~$ ls -al /dev/disk/by-id/
mmc-R1J56L_0x7da477d7
mmc-R1J56L_0x7da477d7-part1
mmc-R1J56L_0x7da477d7-part2
mmc-SN64G_0x3376cd3a
mmc-SN64G_0x3376cd3a-part1
mmc-SN64G_0x3376cd3a-part2
usb-Generic_STORAGE_DEVICE_1532-0:0
usb-Generic_STORAGE_DEVICE_1532-0:0-part1


It's the usb-Generic storage I want to copy the gz image to.

Thanks for your help!

//Erik



What's the device name of my microSD card?

2019-04-21 Thread Erik Josefsson
I have just assembled a [Teres machine] to learn how to set it up from 
the instructions on http://box.redpill.dk/ mentioned before on this list.


I run into my ignorance already at instruction 2: "Locate device name of 
your microSD card".


It turns out when I use completion with ls /dev/disk/by-id/ that my new 
USB microSD card reader says that my micro SD card has two names:


   usb-Generic_STORAGE_DEVICE_1532-0:0
   usb-Generic_STORAGE_DEVICE_1532-0:0-part1

This ambiguity becomes problematic when I try instruction 4) "Decompress 
and copy image onto card" with "Fast method" b):


   sudo sh -c 'zcat core-lime2-1.0b17.img.gz > /dev/disk/by-id/my-sd-card'

I guess that the placeholder "my-sd-card" is neither of the two names above.

Basically: How do I find out the device name of my microSD card?

Best regards.

//Erik

[Teres machine] 
https://www.olimex.com/Products/DIY-Laptop/KITS/TERES-A64-BLACK/


Re: Simple Linux to Linux(Debian) email

2019-04-08 Thread Erik Christiansen
On 08.04.19 17:43, to...@tuxteam.de wrote:
> On Mon, Apr 08, 2019 at 09:33:03PM +0900, Mark Fletcher wrote:
> > Hello all
> > 
> > As I wrote this I began to consider this is slightly OT for this list; 
> > my apologies for not putting OT in the subject line but mutt won't let 
> > me go back and edit the subject line.

As already mentioned, mutt allows editing of the headers prior to
sending. 's' invokes editing of the Subject.

> Mutt can do that, too. To send via an alternative SMTP server, I do
> roughly:
...

That seems very convenient for a mutterer, yet (out of ancient habit) I
use mailx to fling off a quick short missive constructed on the command
line, here any calendar events looming in the next fortnight:

x=`calendar -l 14 -f ~/Personal/calendar`
( [ -n "$x" ] && echo "$x" | mail -s "$x" erik )

(Yes, popular bash idiom has recently (maybe even this century) morphed
from backquotes to $(...) gumpf. \Whatever/ )

You may want to put something other than the first line of the script
output in the subject line, -s "...".

$ apt-cache search mailx | grep mailx
bsd-mailx - simple mail user agent
heirloom-mailx - feature-rich BSD mail(1)

Even more manual would be to employ netcat or telnet to port 25, and
talk raw SMTP. (Handy when diagnosing a remote mailhost's
peculiarities.)

Erik



Re: Measuring (or calculating) how many bytes are actually written to disk when I repeatedly save a file

2019-04-07 Thread Erik Christiansen
On 07.04.19 08:12, rhkra...@gmail.com wrote:
> Sorry, I should have tried to be more clear -- sort of a digression, but I 
> came from an environment where anytime someone used the word assume, someone 
> else would point out what (they thought) that meant (it makes an ass out of 
> [yo]u and me).

Not the boys in blue, by any chance? Station sergeants tend to plant
that lesson early in a rookie's consciousness, I hear.

> I still use the word, but use the "(I know)" as a defensive mechanism to 
> stave 
> off the expected response.

Given that the implication of "assume" is to take something on faith,
without supporting evidence, a safer word might be "surmise". A guess
with an implication of thoughtful deliberation behind it leaves little
for the overly opinionated to gnaw on.

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 30.03.19 01:29, deloptes wrote:
> John Hasler wrote:
> 
> > I'm not trying to persuade anyone to use Emacs.  I am trying to convince
> > people not to be deterred from trying it because of myths such as "You
> > can't use Emacs if you can't program in Lisp".
> 
> Sorry John, but all of this is obsolete, if you are pragmatic enough, you
> would admit it. Just take a step back and have a look from the other side.
> What I am trying to say is that it is not worth investing time in learning
> it - learning not lisp, but the whole emacs stuff and partially lisp,
> because as someone said sooner or later you need this or that - finally
> this is THE feature of emacs. If you do not take advantage of lisp, then
> why not use any other editor. Sorry!

As a 30 year vim/vi veteran, I'm not wildly predisposed to emacs, but
some of its users might prefer 3-key chords to vim's modality - having
to remember whether you're in normal or insert mode for minutes at the
time. (Unless you turn on an indicator. I change the cursor colour as
well as having mode displayed in the status line. Over-65s may be granted
that dispensation, perhaps.)

The only other editor I've used is the line editor, CREDIT. (Yes,
everything was in capitals only, IIRC.) That was 1981, and it was on
the Intel "Blue Box" MDS, complete with 8" floppy drives. (Harddrives
were only know on mainframes and top end minicomputers back then.)

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 29.03.19 10:50, Gian Uberto Lauri wrote:
> >>>>> "EC" == Erik Christiansen  writes:
> 
> EC> Yes, yes, reflexive combativeness is jolly good fun, but
> EC> understanding is more useful in the long term.
> 
> In my experience, if the language is elegant and wise, you can write
> your code "easily" and often you get better coding.
> 
> EC> word used refers to being an analogue, i.e. taking the same place
> EC> in the other editor.
> 
> As someone else wisely pointed out in this thread (my apologies for
> forgetting the name), Emacs is built in Lisp, the interpreter and some
> speed critical parts are coded in C, but the latter are somewhat "C
> coded Lisp objects".
> 
> Differently from other tools that can be extended with "plugins", in
> Emacs is simpler to pass from the "I know which key to press" to the
> "I know what code to write" - provided you have some minimal knowledge
> of Lisp syntax and constructs - because in Emacs every keystroke
> triggers a function call and you Emacs tells you which function is
> invoked, how to use it and even, if you have the lisp sources
> installed, see its implementation. That's how some "random amateur
> lisp coder" was able to bang the original html-helper-mode to the tool
> he used to survive ASP pages :).

Yup, again, output-only mode - unrelated to input. A ROM-based monologue
doesn't make for much of a conversation, certainly not a thoughtful one.

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 29.03.19 10:44, deloptes wrote:
> One can live and do everything without Emacs. 

Can't resist paraphrasing that in light of Emacs' OS-like reputation:

One can live and do everything within Emacs ... or without.

I would be tempted to have a look at ne, except that my fingers would
just continue to work vim-wise, after more than 30 years of daily vim/vi 
use, up to 8 hrs per day. 

When leading software development teams, I never asked team members
which editor they favoured, either at hiring interview, or later. We
just agreed on coding standards, and they configured their editors to
conform. 

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 29.03.19 08:47, Gian Uberto Lauri wrote:
> >>>>> "EC" == Erik Christiansen  writes:
> 
> EC> On 28.03.19 21:32, Matyáš Bobek wrote:
> >> I reckon writing vim extensions in C must be quite obscure... How
> >> is it done?
> 
> EC> It's not. They are written in vimscript, analogous to elisp.
> 
> Sorry not. While Elisp is a Lisp dialect, therefore is a language that
> has been formally proved to be equivalent to turing-machine, that is
> not certain for vimscript.

Yes, yes, reflexive combativeness is jolly good fun, but understanding
is more useful in the long term. The statement you think you've replied
to would seem to use "equal"¹, but the actual word used refers to being an
analogue, i.e. taking the same place in the other editor.

Erik

¹ As in "of equal standing", perhaps.

-- 
No one really listens to anyone else, and if you try it for a while
you'll see why.
   - Mignon McLaughlin



Re: text editors

2019-03-29 Thread Erik Christiansen
On 29.03.19 17:26, Erik Christiansen wrote:
> " Toggle relative line numbering.
> function! NList_toggle()
> if  == 1
>  set nornu" For absolute, elide the 'r'.
>   else
>  set rnu  " For absolute, elide the 'r'.
>   endif
> endfun

Apologies. There's almost always something omitted when pasting from
elsewhere. Let's include the connection to the F1 key:

noremap  :call NList_toggle()

A more meaningful function name would be better, too.
(but important here is only the connection, and the toggling, for the
moment.)

Erik



Re: text editors

2019-03-29 Thread Erik Christiansen
On 27.03.19 11:07, mick crane wrote:
> On 2019-03-26 19:27, Wayne Sallee wrote:
> > I use vim.
> > 
> > Log in as user that will use vim, and run the following command:
> > 
> > cat > .vimrc << "EOF"
> > set nosi noai
> > set number
> > 
> I have line numbers as the default but copy/paste with the mouse also copies
> the numbers so I have to turn it on and off.

True, so it's handy to be able to toggle them on and off on a single
keystroke. I use F1, as it is easy to find. This vimscript in .vimrc
then implements the switch, in my case for _relative_ line numbers, as
they allow e.g. y7+ to copy current line plus the lines down to a chosen
point, without having to count the lines. That's a greater productivity
improver than just knowing you're on line 27423:

" Toggle relative line numbering.
function! NList_toggle()
if  == 1
 set nornu" For absolute, elide the 'r'.
  else
 set rnu  " For absolute, elide the 'r'.
  endif
endfun

To avoid stairstepped insert when pasting that here from the clipboard,
I have F12 mapped to:

set pastetoggle= "  is easier. (See "Paste")

I tend to forget that I also have the alternative:

" Paste
" Paste without needing pastetoggle to avoid staircase text, due to ai always 
set.
" Works with "+y in another vim instance. Also avoids wrapping.
nnoremap  "+p
inoremap  ^["+p^Mi
nnoremap  "+y

(The ^[ is entered as control-v Esc, and ^M as control-v Enter, but you
knew that.)

 is Alt-p. Your choice of invoking key may differ.

So, yep, Vim does allow two-key chords, and the distinction from Emacs
reduces a little when you do that. Vimscript may look a little C-like in
places, but that can't be helped. (Awk is also significantly C-like.
Perl is much more successful at voiding the benefit of common language
know-how.)

Erik



Re: text editors

2019-03-28 Thread Erik Christiansen
On 28.03.19 21:32, Matyáš Bobek wrote:
> I reckon writing vim extensions in C must be quite obscure... How is it
> done?

It's not. They are written in vimscript, analogous to elisp. There is a
large landscape of add-ons written in the language, and a choice of
managers to automate the minor tedium of installing them in the right
place. The few bits of vimscript in my .vimrc are minimal, such as a
function to append section length in lines or pages when the section is
folded.

Erik



Re: text editors

2019-03-28 Thread Erik Christiansen
On 28.03.19 12:34, rlhar...@oplink.net wrote:
> Once you start using Emacs macros and see the benefit, you likely shall find
> yourself creating and using numerous macros within each editing session.
> You demonstrate once to the robot, and the robot faithfully mimics you,
> without error.  The only question is whether you are willing to teach the
> robot by recording your keystrokes in a macro (it takes two keystrokes

in Vim or Emacs. 

> ).



Re: text editors

2019-03-26 Thread Erik Christiansen
On 26.03.19 11:52, John Hasler wrote:
> mick crane wrote:
> > there it is then, although I've so far managed to avoid Emacs since
> > heard it is more of an operating system than an editor.
> 
>  Teemu Likonen writes:
> > There are those who know Emacs, and there are those who know decades
> > old jokes about Emacs.
> 
> And there are those who avoid learning what Emacs is actually like
> because they have heard decades old jokes about it.

IME, the real reason why we won't consider the other editor is because
of the time and energy spent learning the first good one we came across,
and the grating frustration and lost productivity of dropping to the
bottom of the learning curve to switch to horse of a different colour
but similar performance. The "typing chords" vs modality difference
essentially becomes moot once you adapt to your choice. Probably.

Erik



Re: text editors

2019-03-25 Thread Erik Christiansen
On 25.03.19 07:53, mick crane wrote:
> not heard about folding.

It can be very handy. I have around 420 pages of notes in one file. They
present as a one-page contents table with section page counts. While
cursoring down and then across opens a chosen fold, there are several
folding levels to the bottom. Hierarchical groping and digging is an
inefficient constraint suffered by GUIs; it is much quicker to just use
vim's '/' to search for a keyword. Given capitalised headings and
keywords, suffixed with a ':' for the major section on that topic, the
right line in 28532 lines is quickly found, and the required folds
opened automatically.

> I'm not very good at this.

Give it 30 years. Experience creeps up on you.

> kind of related I'm having difficulty copy and pasting.
> If on windows [sorry] and in putty session for Debian no gui vi, if

Commiserations. I'd be sorry too if I had to use windows. (Avoided it
entirely during 30 years in IT - took a fat redundancy package when
windows finally caught up, and retired.

> highlight text with mouse then it is automatically saved to windows
> clipboard for pasting but then in putty cannot scroll past bottom of screen.

Sounds like a putty limitation? I'll admit to only ever having copied to
an X11 clipboard, so can't offer relevant experience. I've never used
gvim - plain vim in an xterm works fine with the X11 clipboard, so long
as I remember to turn off autoindent before pasting, to avoid a
stairstep paste. (I have the F12 key mapped to toggle vim's "paste"
attribute, so a single key handles both on and off.)

> If set marks and then yank to other mark text is yanked but is not in
> windows clipboard buffer for pasting.

Have you checked whether the yank goes into the "* (clipboard) register?
Check also the "+ register, in case the windows clipboard is looking
there instead. A post on the vim-use ML might elicit more info related
to your environment. Back in 2011, Gary Johnson had a "Copy and paste
problem" which was fixed for windows with "set clipboard^=unnamed".)

:help 'clipboard'
:help :set^=

I tend to just use a mouse drag to grab text to the X11 clipboard for
pasting into something GUI.

> In visual mode I can highlight all text with go to mark but that is not in
> windows buffer either.
> I tried all different commands to try to get text into windows buffer but
> nothing seems to work.

Check   " :set clipboard ? "

IIUC, it should include unnamed and unnamedplus for problem-free
communication with the windows clipboard - inferring from a couple of
archive posts from 2011,12. Including unnamedplus isn't good for the
linux clipboard, though.

If all else fails, the vim-use mailing list is a darned sight more
knowledgeable on vim/windows stuff.

Erik



Re: text editors

2019-03-24 Thread Erik Christiansen
On 25.03.19 04:38, mick crane wrote:
> Is there any text editor, preferably in a terminal that has the facility to
> protect lines in the document, not the document itself ?
> I've got 2 blocks of "code" that look similar and I keep editing the wrong
> one and then it doesn't work.

The only thing I can think of, using vim (haven't used anything else for
30 years), is to turn on folding, and include a warning in a comment on
the first line of the block. Whether folding is on blank lines (simple
paragraph/block folding), or foldmethod=marker, the first line line is
displayed while folded.

Having to unfold the block, with only the warning and a short initial
line of code or block identifier visible, ought to be sufficiently
alerting if the blood level in the caffeine stream is not too high.

Putting the warning in "foldtext" wouldn't work, because then it'd
appear on all folded paragraphs - unless you used foldmethod=manual, and
only folded the troublesome blocks.

In extremis, you could write a vimscript function to do all sorts of
weird stuff on folding, but I think it would be a bit of work to put a
password on unfolding.

:help folding

Erik



  1   2   3   4   5   6   7   8   9   10   >