Re: [Dorset] Hibernate in (K)Ubuntu

2020-05-06 Thread Terry Coles
On Wednesday, 6 May 2020 12:03:16 BST Terry Coles wrote:
> On Wednesday, 6 May 2020 11:08:09 BST Terry Coles wrote:
> > I haven't found an equivalent page  for Kubuntu 18.10 (which I'm running),
> 
> > but this page for 18.04 sets out what needs to be done:
> Duh!  Senility creeps in!  I'm actually running Kubuntu 19.10 not 18.10. 
> When I searched for 'Kubuntu 19.10 hibernate', I found
> 
> https://launchpad.net/ubuntu/eoan/+package/hibernate
> 
> I'll try it out this evening.

Well it didn't work ;-(

Here is what I got:

sudo hibernate --dry-run
hibernate:Warning: Tuxonice binary signature file not found.
terry@OptiPlex:~$ 

I installed tuxonice-userui, but that made no difference.  Maybe the system 
needs rebooting, but that would mean I would lose all the data computed, so 
that will have to wait.

I'm going to Suspend instead.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Example awk(1) from Last Night.

2020-05-06 Thread Ralph Corderoy
Hi,

In case anyone was following along and still wants to see the code which
naturally disappeared when we packed up here it is.

$ head ?
==> 1 <==
subject: foo bar

==> 2 <==
subject: foo
 bar

==> 3 <==
subject: foo
 bar

==> 4 <==
subject: xyzzy

==> 5 <==
subject: fo=?utf-8?Q?=6f?= bar
$
$ scan -width 0 -format '%(decode{subject}):%{subject}:%(putlit{subject}):' 
+.
foo bar:foo bar: foo bar:
foo bar:foo bar: foo
 bar:
foo bar:foo bar: foo
 bar:
xyzzy:xyzzy: xyzzy:
foo bar:fo=?utf-8?Q?=6f?= bar: fo=?utf-8?Q?=6f?= bar:
$
$ scan -width 0 -format '%(msg) %(decode{subject})' +.
1 foo bar
2 foo bar
3 foo bar
4 xyzzy
5 foo bar
$
$ scan -width 0 -format '%(msg) %(decode{subject})' +. |
> awk '{m=$1; sub(/[^ ]* /, "", $0)} NR>1 && $0==l {print m} {l=$0}'
2
3
$

And that one-line awk above, as I originally wrote it, re-formatted to
be a usable script, i.e. chmod +x, is

#! /usr/bin/awk -f

   { m = $1;  sub(/[^ ]* /, "", $0) }
NR > 1 && $0 == l  { print m }
   { l = $0 }

It would be interesting to see the length of a functionally equivalent
Python version as a lot of what awk makes implicit is tedious code in
many other languages and requires much more comprehension for
non-programmers, e.g. method functions of an object, context objects,
etc.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Home PBX Resources.

2020-05-06 Thread Ralph Corderoy
Hi,

Conversation in the virtual meeting late last night turned to
establishing a PBX at home hanging off a single POTS line.  Here's some
related resources based on what was said and a bit of searching since.

What are FXO and FXS?  A brief summary:
https://en.wikipedia.org/wiki/Foreign_exchange_service_(telecommunications)#Use_in_voice-over-IP_systems

More detail: https://www.dceexpress.com/what-are-fxs-and-fxo/

So I think the incoming POTS would connect to an FXO device which, `from
the point of view of a telephone exchange, appears to be a telephone'.
The other side of the FXO would be a digital interface to the computer,
e.g. a PCI Express card.

Once it's digital, VoIP phones could be used around the house with each
having a unique extension number.  Android and iOS devices can also run
apps to be a VoIP phone; there might be lots of those already around,
especially older models.

A well-known telephony interface manufacturer is
https://www.sangoma.com/telephony-cards/analog/

An alternative is for the existing land-line number to terminate with a
VoIP supplier on the Internet and to use the home's Internet connection
thereafter.  A POTS does have the advantage of working in a power cut.

-- 
Cheers, Ralph.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Hibernate in (K)Ubuntu

2020-05-06 Thread Terry Coles
On Wednesday, 6 May 2020 13:41:29 BST PeterMerchant wrote:
> I ran up my ancient Dell Inspiron 6000 (32 bit) running xubuntu 18.04, and
> it has a suspend feature, but no obvious hibernate.

When I used it, I was probably running one of the earliest versions of 
(K)Ubuntu.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Hibernate in (K)Ubuntu

2020-05-06 Thread PeterMerchant

You made me do it..

I ran up my ancient Dell Inspiron 6000 (32 bit) running xubuntu 18.04, and it 
has a suspend feature, but no obvious hibernate.

Peter


--
 Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
 Check to whom you are replying
 Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
 New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Hibernate in (K)Ubuntu

2020-05-06 Thread Patrick Wigmore
On Wed, 06 May 2020 13:09:58 +0100, Terry Coles wrote:
> I haven't encrypted my laptop because it rarely leaves the house (my
> wife uses  it mostly).

> I have never felt it necessary to encrypt my desktop.

I thought as much, but it was such a low hanging fruit of an answer 
that I thought it was worth picking it.

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Hibernate in (K)Ubuntu

2020-05-06 Thread Terry Coles
On Wednesday, 6 May 2020 13:03:38 BST Patrick Wigmore wrote:
> It's probably worth mentioning that hibernate is (usually)
> incompatible with encrypted swap, which you would normally have if you
> are using any kind of disk encryption.

I haven't encrypted my laptop because it rarely leaves the house (my wife uses 
it mostly).  I probably should because I might leave it in the pub/club after 
a LUG Meeting, but that's unlikely to happen any time soon!

I have never felt it necessary to encrypt my desktop.

In any case, there is very little on either machine that is of any value to 
anyone else.  I use a Password Manager for my many passwords.

So my un-encrypted laptop still doesn't support hibernation.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Hibernate in (K)Ubuntu

2020-05-06 Thread Patrick Wigmore
It's probably worth mentioning that hibernate is (usually) 
incompatible with encrypted swap, which you would normally have if you 
are using any kind of disk encryption.

When (K)Ubuntu first started offering encrypted home directories as a 
standard feature, I did not immediately make the connection that 
enabling that feature was the reason why I'd lost the ability to 
hibernate my laptop. If you think about it, it makes perfect sense, 
but I didn't think about it!

I did find this, however:
https://help.ubuntu.com/community/EnableHibernateWithEncryptedSwap

-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


Re: [Dorset] Hibernate in (K)Ubuntu

2020-05-06 Thread Terry Coles
On Wednesday, 6 May 2020 11:08:09 BST Terry Coles wrote:
> I haven't found an equivalent page  for Kubuntu 18.10 (which I'm running),
> but this page for 18.04 sets out what needs to be done:

Duh!  Senility creeps in!  I'm actually running Kubuntu 19.10 not 18.10.  When 
I searched for 'Kubuntu 19.10 hibernate', I found

https://launchpad.net/ubuntu/eoan/+package/hibernate 

I'll try it out this evening.

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk


[Dorset] Hibernate in (K)Ubuntu

2020-05-06 Thread Terry Coles
After yesterday's discussion in the 'New BOINC project that does computing for 
COVID-19' thread and last night's discussion online, I decided to pursue 
Ralph's suggestion to use systemd to hibernate the machine.

I've started a new thread because this really has nothing to do with BOINC!

Anyway, I started off by searching for systemd hibernate and found this:

http://manpages.ubuntu.com/manpages/bionic/man8/systemd-suspend.service.8.html

Amongst other things this says:

'Note that systemd-suspend.service, systemd-hibernate.service, and systemd-
hybrid-sleep.service systemd-suspend-then-hibernate.service should never be 
executed directly. Instead, trigger system sleep states with a command such as 
"systemctl suspend" or similar.'

So I searched for 'systemctl hibernate' and found quite a few complaints about 
this not working in Kubuntu and Ubuntu and it would seem to me, reading a 
number of pages, that these distros are not set up for hibernation by default.

I haven't found an equivalent page  for Kubuntu 18.10 (which I'm running), but 
this page for 18.04 sets out what needs to be done:

https://askubuntu.com/questions/1031633/enable-hibernate-in-ubuntu-18-04-lts

I'm still debating whether or not I should try this or simply use Suspend (to 
RAM).

BTW.  My laptop doesn't support Hibernate either, but I can recall doing on an 
old one that I had some years ago.  (I've only run Kubuntu on my personal 
machine since around 2002, so it used to do it once.)

-- 



Terry Coles



-- 
  Next meeting: Online, Jitsi, Tuesday, 2020-05-05 20:00
  Check to whom you are replying
  Meetings, mailing list, IRC, ...  http://dorset.lug.org.uk
  New thread, don't hijack:  mailto:dorset@mailman.lug.org.uk