DevHeads.net

Postings by Chris G

xxx.yyy.distupgrade files in /etc/apt/sources.list - what are these?

I have just used do-release-upgrade to upgrade my system to xubuntu
17.10.

It looks as this upgrade has created some oddly named files in
/etc/apt/sources.list, these are:-

-rw-r--r-- 1 root root 78 Dec 3 16:12 owncloud.list.distUpgrade
-rw-r--r-- 1 root root 48 Dec 3 16:12 syncthing.list.distUpgrade

Can anyone tell me what these files are for?

How to allow easy editing of www-data owned files by a user

I've been trying to find a good solution to this problem for *years*
but I'm still hitting problems with it. The current problem is that
syncthing doesn't deal well with directories and files which have
different owners on different systems.

The essential problem is that web files which are manipulated by
apache need to be owned by www-data but I want to be able to edit
these files as well.

Is it a good idea to limit the range of servers that can connect to port 25?

I have run postfix for a number of years on my home (xubuntu) server
machine with my router firewall limiting connections on port 25 to
just the range of IP addresses which are my domain hosting company's
SMTP servers.

This caused me a problem recently when they started using a new SMTP
server which wasn't in the ranges allowed by my firewall.

I can obviously add the address of the new server but would have the
same problem the next time they add a new server.

Strategies for using backup MX records

This is a fairly naive and open-ended question I'm afraid but I'm sure
others here may have similar setups and thus have answers.

I run Postfix on a home server which is on all the time of course but,
as it's connected via a 'domestic' broadband service it's not a 100%
reliable connection. There are also times when I reconfigure things
(e.g. upgrade the server) that cause downtimes.

What sort of strategies are available for coping with the (rare)
disconnections of a few hours that occasionally occur?

Another systemd-resolved problem in 17.04

After my problems with systemd-resolved being unable to resolve
unqualified names I've hit another issue that seems to be a resolver
problem as well.

I left my laptop running for a few days and this morning DNS was
broken, most queries were getting REFUSED returned by the local
resolver. All other systems on the LAN (not yet 17.04) had DNS
functioning OK.

Restarting system-resolved seems to have fixed the problem (I did mean
to send it a SIGUSR2 but killed it by mistake).

Network Manager problem when changing WiFi connection in 17.04

Another problem with 17.04 that isn't in 16.04.

If you change the WiFi SSID you're connected to by simply clicking on
the new SSID then, in 17.04, Network Manager thrashes around for
several minutes and sometimes fails completely to reconnect. If you
explicitly 'disconnect' from the first WiFi SSID and then click on the
new one it works perfectly OK.

This doesn't happen in 16.04.

(I'm actually running xubuntu 17.04 but I suspect this is an Ubuntu
rather than a specific xubuntu issue)

Further problems with systemd-resolved on xubuntu 17.04

Well, having bodged my domain name into /etc/resolv.conf it seems that
systemd-resolved is *still* somewhat broken.

When I start the system it can resolve local names OK but after a
while (I haven't quite determined how long it is yet, but somewhere in
the ten to twenty minutes area I think) it fails to resolve local
names, as before with SERVFAIL.

If I restart systemd-resolved then it works again.

The result of 'systemd-resolve --status' remains unchanged all the
time.

Aha! ...

Further to DNS problem on 17.04

I've dug further into this problem, I think the fundamental issue is
that it seems that LLMNR *can't* be disabled:-

root@t470:/etc/systemd# more resolved.conf
# This file is part of systemd.
#
# systemd is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as
published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.

How to get the systemd resolver to resolve local (i.e. unqalified) names?

Before the systemd-resolved came along my systems resolved local (i.e.
unqualifed) names quite happily, e.g. on my older xubuntu 16.04
systems I can do:-

chris@backup:~$ host esprimo
esprimo.zbmc.eu has address 192.168.1.3
chris@backup:~$ host esprimo.zbmc.eu
esprimo.zbmc.eu has address 192.168.1.3
chris@backup:~$ host pi
pi.zbmc.eu has address 192.168.1.2
chris@backup:~$

...

SIM in Lenovo T430

I have a Lenovo T430 with Ubuntu 16.04, it's an excellent little laptop.

Does anyone know if Ubuntu can use the SIM slot in this laptop for data
and/or for making calls? If so what software might I need to install?

Can anyone expain this difference between almost identical postfix installations

I am trying to diagnose why messages from on system fail to arrive
whereas identical messages from another similar system arrive
successfully.

Both systems are single board computers running postfix 2.9.6 under
Debian. The main.cf on both systems is identical.

Different treatment of ports 465 and 587 between postfix versions 2.9 and 3.1

I am running postfix 3.1.0 on an xubuntu 16.04 system and postfix 2.9.6
on a Raspberry Pi running Debian.

They seem to act very differently as regards the use of ports 465 and
587 and I'd like things clarified so I can understand better.

I use both postfix installations to send outgoing E-Mail (i.e. mail
which is leaving my home LAN) to my hosting company's servers. Their
documentation says that I should use port 465 and TLS to connect to
the SMTP server.

On the postfix 3.1 system this works, I specify port 465 in main.cf
and everything is as it should be.

Managing cron and similar E-Mails from headless systems

I have several headless systems doing useful work around the place:-

A Raspberry Pi providing local DNS and DHCP

A Beaglebone Black on our boat monitoring temperatures and batteries

An old desktop doing backups in the garage

etc.

Most of these have one or more cron jobs running periodic rsync
backups, copying data, etc. If the cron job has an error then it
sends E-Mail to the owner of the job ('chris' in most cases, might be
root in a couple).

It's (moderately) easy to set up an MTA and /etc/aliases so that the
messages are sent to my normal E-Mail.

Is disk really bad if mkfs.ext4 -c -c reports errors?

I have been reformatting a disk which had a few corrupted files on it
with the following command:-

mkfs.ext4 -c -c /dev/sdb1

(Yes, I know this destroys all the data, everything except the few
corrupted files has been copied off the disk)

The second pass of badblocks is reporting some errors. Does this
indicate that the disk is dying?

The problem is that the documentation doesn't really tell one what the
errors mean. Do the reported errors get remapped using the bad blocks
list or are they errors which *can't* be remapped because the bad
blocks list is full?

Latest (4.4.0-53) kernel fails to boot - kernel panic

My old[ish] Acer Aspire netbook running 16.04.1 has just upgraded
itself to the 4.4.0-53 kernel, it crashes at startup with a kernel
panic, which ends as follows:-

---[ end kernel] panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)

Fortunately the 4.4.0-51 kernel is still installed and still works
fine if selected from the boot menu 'advanced' options.

I looked at the grub.cfg file and the entries for 4.4.0-53 and
4.4.0-51 look the same (apart from the number difference) so I don't
really understand what's gone wrong, unless the 4.4.0-53 kernel really
is broken.

Is i

Systemd module loading error, doesn't seem to break anything though

Running xubuntu 16.04 on an Acer Apire One netbook I am getting the
following error at boot:-

[FAILED] Failed to start load kernel modules

However the system continues to load and boot OK.

How to find what options are configured in a standard Ubuntu package?

I'm trying to find out what configuration options were used to build
the wpa_supplicant that comes with Ubuntu 16.04.

Is there anywhere that documents what options have been used to build
programs in the Ubuntu repositories?

Interrupted release upgrade, how to sort out left-over old packages?

I think I know now the cause of my 'left-over' PHP5 packages in a
16.04 installation. (See previous thread)

The system in question got interrupted (the cat walked across the
keyboard!) while doing a do-release-upgrade. I restarted it and after
a couple of 'apt-get update' and an 'apt-get dist-upgrade' it seemed
to have sorted itself out and have 16.04 properly installed.

However, obviously not all the packages that should have been upgraded
were upgraded, hence my left-over PHP5 packages.

PHP5 packages can be installed on one 16.04 system but not on another

I have two xubuntu 16.04 systems both with LAMP server software on
them. On one I can see and successfully install a number of PHP5
packages, in particular php5-sqlite, on the other it can't see this
package at all using apt-search or synaptic.

I have checked through all the repsitories in /etc/apt and, as far as
I can see, they're identical.

What is wrong? I need php5-sqlite on both systems.

How to make gnome keyring ask for passphrase on the command line instead of a GUI pop-up?

I want to be asked for my passphrase on the command line in the
terminal when I ssh to somewhere. By default gnome keyring (or
whatever talks to it) asks for the passphrase in a GUI pop-up.

How can I change the default so it asks for it on the command line?

Firefox question - can I open a URL in a 'hidden' tab, or at least not move to the tab when opening it?

Is there any way in Firefox to 'open' a URL but not move to a tab to
display it?

I want to open internet radio URLs without changing what Firefox
shows, so either some sort of hidden TAB or simply a way of not going
to tabs opening certain specific URLs would do what I want.

Network Drawing tools

Are there any Linux network drawing tools?

I don't really want a full-blown Network Management solution like
OpenNMS or Nagios, I just want an easy way to map my home network that
doesn't require me to do it all manually.

How to logically negate the return value of a command?

I want to use ping to detect if a machine is available locally on a
LAN as a test for a 'match exec' in ~/.ssh/config.

The trouble is that I need to logically negate the return value, i.e.
I want to have something like:-

match exec "not ping -c 1 hostname"

However this doesn't work of course. Is there any easy way (i.e. an
executable command) which will logically not the value that ping
returns? I know I could write a little script that does the job but
if can do it without I'd be happier.

Something is broken in apt/dpkg, how to recover?

Something is very broken in the depths of apt/dpkg/synaptic on my
system.

Any attempt at running apt-get results in a segmentation fault and
also any attempt to run synaptic fails - it authenticates then the GUI
appears but before it populates with lists etc. it crashes.

I *suspect* that it's something in the 'update' part of apt that's
broken, if I do "show details" on the crash report from synaptic it
says the executable is /usr/lib/update-notifier/apt-check.py.

How do I fix this? I can't use synaptic or apt to reinstall anything.

Is there a way to get a list of added packages so they can be re-installed after a clean installation (as opposed to upgrade)?

I'd really prefer to do a clean new installation occasionally rather
than doing a distribution upgrade. On one system in particular I have
a number of issues which I think would probably be sorted out by doing
a clean installation.

It's easy enough to make a copy of (or use a different partition) for
/home so that that can be restored.

The difficult bit is to get back all the extra packages I have
installed in addition to the basic ones installed with Ubuntu/Xubuntu.

Tools for scanning/managing WiFi

Is there anything better than Network Manager for checking for WiFi
signals?

Network Manager is fine for when I'm at home where the laptop and tablet
simply connect to the home router but as soon as there's any
difficulty deciding what to connect to it's pretty useless:-

There's no control over [re-]scanning so you can't move to
different positions and request a re-scan to see if there are
different WiFi signals and/or signal strength has changed.

The signal strength indication is no help in optimising the signal,
one needs a more accurate level indicator to tell if movi

What do these messages in syslog mean (stops my trackball working)?

I have a Logitech wireless trackball that I use with my Acer Aspire
netbook running Xubuntu 12.10.

Why has ClamAV just been installed on my 12.10 system?

For some reason ClamAV has recently been installed on my 12.10 system, I
guess it must be because of something I've installed recently but I
can't think what really.

Does anyone have any idea what might install ClamAV as a dependency?

I don't think I need it really as it scans mail for malware and I can't
really see what would even be able to use it on my system.

What's the difference between hpcups and hpijs printer drivers?

When I install my Photosmart 2575 printer I get offered two printer
drivers: hpcups 3.12.6 and hpijs, 3.12.6. Is there any difference
between them and which should I choose?

Looking for simple web gallery software with some specific requirements

I'm after a web application to display pictures, there are zillions of
them out there but it's difficult to find one to match my requirements:-

Take an existing directory hierarchy of pictures and use it to
organise the album/gallery. Don't copy the pictures, use them
direct from the existing directory structure.

Must not require any write access to the pictures directory.