Ubuntu 20.04 NAS permission denied

On a new installation of Ubuntu 20.04, NAS mounts were readable, but not writable. When looking at the long directory listing, the files were owned by a UID and GID different than the user they were mounted for. The fix for this was to add forceuid and forcegid to the mount options in the autofs configuration file. After that, run
sudo service autofs restart
Verify the force options have been applied by accessing the mounted directory (to force automounting), then checking the output of mount and ls -l.

Uncategorized

Comments (0)

Permalink

Mapping Ctrl+Alt+Delete to Shut Down in Ubuntu 20

  1. Start Settings
  2. Select Keyboard Shortcuts
  3. In the System section, disable the shortcut for Log out
  4. At the bottom, select + to add a custom shortcut
  5. Name it Shut down
  6. Set the command to gnome-session-quit --power-off
  7. Enter Ctrl+Alt+Delete for the shortcut

Uncategorized

Comments (0)

Permalink

Backwards Natural Horizontal Scrolling

On a Thinkpad laptop with Ubuntu 20, I switched to Natural Scrolling, but was confused to find that, although vertical scrolling worked as expected, horizontal scrolling was unchanged, resulting in a very unnatural experience. It turns out that the culprit was a old input driver that was probably carried along as this laptop was upgraded over the years. The correct driver (xserver-xorg-input-libinput) was already installed, so the fix was to uninstall the old one:

sudo apt remove xserver-xorg-input-synaptics

then log out and back in again. Touchpad speed was at zero, so that had to be moved to 2/3 of maximum to restore the speed I had under the Synaptics driver.

Reference: https://askubuntu.com/questions/1029128/inverted-horizontal-scrolling-ubuntu-18-04#1199400

Uncategorized

Comments (0)

Permalink

Linux Installation Check

Packages to Install

  • synaptic
  • vim-gnome
  • gkrellm
  • kvpm (replaces system-config-lvm, which is not available for Ubuntu 18)
  • cifs-utils
  • KeepassXC
  • gnucash
  • gimp
  • darktable
  • gnome-raw-thumbnailer (to view .CR2 file thumbnails, also view in Files with zoom of 150%
  • git
  • xsane

For laptop only

  • autofs
  • libpam-fprintd

Tasks

  • Laptop only:  Enable fingerprint login under Settings > Users
  • Install or update Dotphiles
  • Laptop only: Set up Autofs
  • ds411+II mounts 
  • pCloud and sync’ed directory
  • /etc/group entry for ds411p2
  • Install NAS credentials /etc/ds411p2pwd. Set permissions to u=rw,go=. Repeat for ~/.ds411p2pwd.
  • VPN
  • Set up HP LaserJet MFP M477fdn with hp-setup

Uncategorized

Comments (0)

Permalink

Operating System Upgrade Strategy

Keep two LVM partitions on each machine.  When upgrading, always upgrade the secondary partition, leaving the primary partition in a working state.  The secondary partition then becomes the actively used one.

Uncategorized

Comments (0)

Permalink

Upgrading Jennings from Ubuntu 16.04 to 20.04

Jennings has been running Ubuntu 18.04 for a while in partition /dev/mapper/ubuntu--vg-root2. Rather than upgrade it to 20.04, I thought I’d upgrade the older Ubuntu 16.04 installation in partition /dev/mapper/ubuntu--vg-root. Here’s what needed to change:

Change from Dropbox to pCloud

This is as simple as installing from pcloud.com and setting up a sync from ~/pcloud-sync to Applications/Keepass2Android.

Upgrade Keepass

Since upgrading to Keepass 2 (the .kdbx format), I don’t have to keep locking KeepassX to an old 1.x version. Unlock the version of KeepassX, delete it and install KeepassXC. Add the keyboard shortcut Ctrl+Alt+A for autotype.

DS411+II NAS Mounts

A new router has been installed since Ubuntu 16.04 was running. The old router would create DNS entries for each client based on their host name, so ds411p2 was valid. The new one, a Comcast XB6, doesn’t do that. The hosts are reachable through .local names, so the NAS needs to be referenced as ds411p2.local now. This fix was made in /etc/fstab, as well as the fix to mount CIFS with the mount option vers=1.0 (because the NAS is old and doesn’t support the newer default version).

Fix Darktable Configuration

The files in ~/.config/darktable were from whatever version of Darktable was available in the Ubuntu 16 repositories and the current version, 3.0.1, didn’t like them. Replacing that directory tree with the one from the Ubuntu 18 installation fixed the problem.

HP Color LaserJet Pro MFP m477 Fdn Scanning

(Read through this whole section before doing anything, because it contains steps that didn’t work.)

This printer is an all-in-one and it works out of the box, except for scanning. For that, a proprietary plugin must be installed:

https://developers.hp.com/hp-linux-imaging-and-printing/binary_plugin.html

Unfortunately, the plugin doesn’t install on Ubuntu 20. hp-setup was an old version. It wasn’t upgraded because it wasn’t installed from the hplip package. To fix, find the old installation (it was 3.18.5) and run sudo make uninstall from there.

Then reinstall hplip:

sudo apt remove hplip
sudo apt autoremove
sudo apt install hplip hplip-gui

That failed, so I removed those packages and downloaded hplip from https://developers.hp.com/hp-linux-imaging-and-printing/gethplip and installed using defaults, but python-pyqt5 and python-dbus.mainloop.pyqt5 failed.

GUI installation doesn’t work on Ubuntu 20 yet, so I ran again, selecting all defaults except:

  • installation mode=custom
  • Graphical User Interfaces (Qt5)=no
  • Restart or re-plug in your printer=ignore (since my printer is connected via network)

Then run hp-plugin (as myself, it uses sudo) and accept defaults.

Now the scanner works with xsane.

Uncategorized

Comments (0)

Permalink

Finding local network hosts

To see SSH hosts, including their local host names and IP addresses:

avahi-browse -tr _udisks-ssh._tcp

Source: https://www.drdobbs.com/parallel/network-discovery-tools-putting-dns-serv/231602470

Keywords:

  • mDNS – Multicast DNS (Domain Name System)
  • DNS-SD Domain Name System Service Discovery

Uncategorized

Comments (0)

Permalink

Ubuntu 18 delay before login screen after resume

After upgrading my laptop to Ubuntu 18 (or was it 16?), after a suspend/resume, the lock screen would appear promptly, but there was a delay of about a minute after hitting Enter before the login prompt appeared. This delay was due to CIFS mounts being restored. In prior versions of Ubuntu, the mounts would sometimes be restored and sometimes not, but it didn’t wait for that before the login screen. With Ubuntu 18, it waits for the mounts before the login screen appears.  While it’s nice to be sure the mounts are always restored, the delay is a sub-optimal user experience.  The solution is to use autofs, which only mounts file systems when they are accessed.  Here’s how that is done on my Thinkpad T560 with CIFS (Samba) mounts to a Synology DS411+II.

After installing autofs, unmount the mounts in /etc/fstab that you want to have managed by autofs.  Then edit /etc/fstab and comment them out.  Edit /etc/auto.master and add an entry for each directory that will contain mounts.  For example, to add mounts in /mnt:

/mnt /etc/auto.mnt

Keep in mind the contents of the directory being managed by autofs (/mnt in this example) will not be accessible once autofs makes mounts there.  The directory contents will not be deleted, you just won’t see them again until the mount is removed.

Create the mount configuration for each mounted directory.  In our example above that would be /etc/auto.mnt:

ds411p2-public-music -fstype=cifs,vers=1.0,rw,suid,gid=ds411p2,credentials=/etc/ds411p2pwd ://ds411p2.local/music

The format of this file is similar to /etc/fstab but not the same.  For comparison, here’s that entry as it was in /etc/fstab:

//ds411p2.local/music /mnt/ds411p2-public-music cifs vers=1.0,rw,suid,gid=ds411p2,credentials=/etc/ds411p2pwd 0 0

So to create the entry in /etc/auto.mnt from /etc/fstab:

  • The first field, the mountpoint, is the second field from /etc/fstab, but change it from an absolute path to one relative to the mount directory specified in /etc/auto.master.
  • The second field is a combination of fstab’s third and fourth fields, the file system type and mount options, except file system type is prefixed with -fstype=. The other mount options follow, separated by commas, the same as in fstab.
  • The third field, the server directory, is the same as first field in fstab except it’s prefixed with :.
  • The last two fields from fstab (dump and fsck options) aren’t used.

Uncategorized

Comments (0)

Permalink

Showing the date in Ubuntu 18’s Gnome Panel

The default clock shown in the Gnome Panel has only the time in HH:MM format. If you want to display seconds or include the date, you need an extension called Clock Override. Instructions for installing it are here: http://ubuntuhandbook.org/index.php/2019/02/customize-time-date-format-ubuntu-18-04-gnome-panel/

Note, if searching for the extension in Ubuntu Software turns up nothing, go to the “All” tab, select the Add-ons category, click Extension Settings and turn on Shell Extensions. Clock Override will appear in a list of extensions below.

Uncategorized

Comments (0)

Permalink

Pixel 3 Sounds

Get Sounds

Video game sounds are available at https://downloads.khinsider.com/game-soundtracks.

Select sounds for

  • phone ringtone
  • default alarm
  • default notification
  • Charging

Download sounds to the NAS. Rename them to prefix the game name and purpose. This is because the phone stores all ringtones in the same directory and names such as 01-Credit-Sound.mp3 are common and it’s easy to forget which sound you picked for something. For example, 01-Credit-Sound.mp3 becomes galaga-default-notification-01-Credit-Sound.mp3.

Copy sounds to phone

Copy the files to pCloud and download them on the phone. They’ll be stored in /storage/emulated/0/Download.

Using Ghost Commander, move them from the Download directory to the following locations:

  • Phone Ringtone: /storage/emulated/0/Ringtones
  • Default Alarm: /storage/emulated/0/Alarms
  • Default Notification: /storage/emulated/0/Notifications
  • Charging: /storage/emulated/0/Notifications

Select sounds on phone

Set the default ringtone, notification and alarm in Settings > Sound > Advanced.

Set the charging sound in Tasker.

Uncategorized

Comments (0)

Permalink