Creating a systemd timer as a user on Debian 9.9

To set up a simple systemd timer as a user on Debian 9.9, here are the following steps to make it work.

Systemd version :

systemctl --version
systemd 232

As a user, both the .service unit and .timer unit must be located in $HOME/.config/systemd/user.
If this folder does not exist, create it :

mkdir -p $HOME/.config/systemd/user

If both the .service and .timer files are named as test, it must be enabled and started :


systemctl --user enable test

systemctl --user start test

The expected output should be found using journalctl :

journalctl -f

References :

https://wiki.archlinux.org/index.php/Systemd/Timers

systemd.time(7) manpage

Using systemd as a user

Advertisements

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

Reason: 3=DEAUTH_LEAVING

The ASUSTek Wifi USB adapter works fine once plugged into a laptop running Debian 9.3
Setting up its networking configuration is straightforward using iw, ip link and dhclient.

Although this new device is recognized by NetworkManager, its configuration failed and the process gets stuck at :

Reason: 3=DEAUTH_LEAVING

It looks like that NetworkManager does not like wireless interfaces with

This issue has been already encountered :

https://lists.debian.org/debian-user/2017/06/msg01045.html

Here is their workaround :

ln -s /dev/null /etc/systemd/network/99-default.link

Unplug-plug your USB dongle and NetworkManager should be working fine.

WARNING : Failed to connect to lvmetad. Falling back to device scanning

At boot time, the following message can pop up :

WARNING : Failed to connect to lvmetad. Falling back to device scanning

This message is displayed, whether running Debian stable or Debian testing.

To get rid of this message, disable lvmetad in /etc/lvm/lvm.conf


use_lvmetad=0

Update the initramfs for the current kernel your system uses :

update-initramfs -k $(uname -r) -u; sync

Reboot your system and you’re done !

Ubuntu workaround for this issue

This issue has already been reported in the Debian bug tracking system : #846946

Auto-closing HTML tags in Vim on Debian Buster

Debian provides deb packages for Vim and Vim scripts. Vim scripts are a set of addons to vim to automate repetitive tasks or adding new functionalities to the Vim editor.

This addon, closetag.vim, will be installed and enabled and ready for use when editing an HTML file.

Debian provide a central way to manage Vim addons, vim-addons-manager, system-wide or a per-user configuration.
To install it :

apt install vim-addon-manager vim-scripts

To enable it just for you :

vim-addons install closetag

A local copy of closetag.vim is created in ~/.vim/macros

To enable it in your Vim editor :

:let g:closetag_html_style=1
:source ~/.vim/macros/closetag.vim

The auto-closing function is available in insert mode by typing Ctrl-_

More infos :

https://github.com/vim-scripts/closetag.vim
http://www.vim.org/scripts/script.php?script_id=13

Debian Packaging Policy for Vim