At : Garbled time

If you need to run a job once, at is the tool perfectly suited for this need.

The at tool requires some options to run a job at a given moment.

Without any parameters, at pops up the following error :

Garbled time

The job can be either specified from the at prompt or using the -f

Here is an example to run a job in a minute from the time the command at is executed :

at now + 1 minute

at>echo "This is a test"

at now + 1 minutes

at>echo "This is a test"

Using a text file :

at now + 1 minute -f job_file

Once the job is completed, an email is sent. Check your local Mailbox using the mail command.

Good tutorials around at providing additional examples :

https://www.computerhope.com/unix/uat.htm

https://tecadmin.net/one-time-task-scheduling-using-at-commad-in-linux/

https://linuxconfig.org/how-to-schedule-tasks-using-at-command-on-linux

https://www.thegeekstuff.com/2010/06/at-atq-atrm-batch-command-examples/

Advertisements

[WARNING] This document format requires a nonempty title element.

If you are using pandoc as a document converter from markdown to html, you may have this warning message while using the -s (–standalone) option.

[WARNING] This document format requires a nonempty title element.
Please specify either ‘title’ or ‘pagetitle’ in the metadata.

For more details about adding metadata information to your pandoc command line : https://pandoc.org/MANUAL.html#option–metadata
For example, if you want to produce an HTML file from a markdown file, the -s option uses a default template that only sets the header and the footer.
No html-based title is generated unless you explicitly request it using the -M option that sets the title metadata info.

pandoc -s -f gfm -t html -M title:Test -o test.html test.md

More info on the -s / –standalone option

Please set the ICU_VERSION environment variable to the version of ICU you have installed.

This runtime error pop up while installing Python module dataset with pip in a virtual environment on a Linux VM running Ubuntu 18.04.1 LTS.

The dataset Python module requires several dependencies, pyicu being one of them.

As mentioned on the PyICU Github project webpage, this is a Python extension wrapping the ICU C++ libraries.

Using the apt-file tool, icu-config is provided by the libicu-dev Ubuntu package.

After installing it with the package manager, dataset Python module is now properly installed.

javaldx: Could not find a Java Runtime Environment! on Ubuntu 18.04.1

Running LibreOffice from the shell can display this message :

javaldx: Could not find a Java Runtime Environment!
Please ensure that a JVM and the package libreoffice-java-common
is installed.
If it is already installed then try removing ~/.libreoffice/3/user/config/javasettings_Linux_*.xml
Warning: failed to read path from javaldx
func=xmlSecCheckVersionExt:file=xmlsec.c:line=188:obj=unknown:subj=unknown:error=19:invalid version:mode=abi compatible;expected minor version=2;real minor version=2;expected subminor version=25;real subminor version=26

This solution suggests installing libreoffice-base ubuntu package to fix it. It will also install libreoffice-java-common package while managing all the required dependencies.
Installing it removes this error message permanently On Ubuntu 18.04.1

NB : This solution works as well for Ubuntu 19.04

Enabling zenity notifications using cron

Making zenity notifications available using cron as a user is a bit tricky.

Here is the workaround to add to your scripts to make desktop notifications available.


DBUS=$(pgrep -ou $(whoami) mate)
DBUS="$(grep -z DBUS_SESSION_BUS_ADDRESS /proc/$DBUS/environ | sed 's/DBUS_SESSION_BUS_ADDRESS=//')"

# Write a notification function
function Notif {
DBUS_SESSION_BUS_ADDRESS="$DBUS" zenity --notification --text="$1" --display=:0
}

# Test this notification function
Notif "your message"

Set up a cron job to test your function using crontab -e and let’s see the magic

Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not found on Debian 9.4

Generating a pdf file from a markdown file can be done with pandoc, provided that all its dependencies are installed :

pandoc -s -o output.pdf input.md

! Font T1/cmr/m/n/10=ecrm1000 at 10.0pt not loadable: Metric (TFM) file not found. relax l.105 \fontencoding\encodingdefault\selectfont
pandoc: Error producing PDF

pandoc generates a log file missfont.log :

cat missfont.log
mktextfm ecrm1000
mktextfm ecrm1000
mktextfm ecrm1000
mktextfm ecrm1000
mktextfm ecrm1000
mktextfm ecrm1000

What Debian package provides this program ?

dpkg -S $(which mktextfm)
texlive-binaries: /usr/bin/mktextfm

In what package is located the ecrm1000 file ?

apt-file update
apt-file search ecrm1000

texlive-fonts-recommended: /usr/share/texlive/texmf-dist/fonts/source/jknappen/ec/ecrm1000.mf
texlive-fonts-recommended: /usr/share/texlive/texmf-dist/fonts/tfm/jknappen/ec/ecrm1000.tfm

Install the missing Debian package texlive-fonts-recommended :

apt install texlive-fonts-recommended

Ubuntu 17.10 as VirtualBox guest : missing vboxsf module

Running Ubuntu 17.10 as a VirtualBox guest works fine except for accessing files located on the host.
Only vboxguest and vboxvideo modules are available and loaded.
vboxsf module is missing.
Load the Guest Additions ISO image and let run the installer.

On a fresh new install, you may have this error :

Make sure to install the build-essential package :

apt install build-essential

One completed, reboot your system to make sure the right modules are loaded : vboxguest, vboxvideo, vboxsf

Once logged in, access to a directory located on your host may be denied.
Be sure that your user account is part of the vboxsf local group.
Add yourself :

usermod -aG vboxsf your_login

Log out and log in again. This should be good now