Pseudo-terminal will not be allocated because stdin is not a terminal

If you need to run a job using cron and this job includes some remote access to Linux servers using ssh, your script may not behave the way you want:

Pseudo-terminal will not be allocated because stdin is not a terminal

The ssh tool provides the option -t.

As per ssh’s manpage:

-t’ Force pseudo-tty allocation. This can be used to execute arbitrary screen-based programs on a remote machine, which can be very useful, e.g. when implementing menu services. Multiple -t options force tty allocation, even if ssh has no local tty.

If you need to run a sudo command on the remote server, the option -t must be used several times as follows:
ssh -t -t -t -t fool@remote_host "sudo systemctl status apache2"

How to display the current time in a different timezone than yours ?

To quote an example from the Superuser forum:

It’s 6pm in Taipei, what time is it here?

date --date='TZ="Asia/Taipei" 18:00'
Fri Jul 16 11:00:00 BST 2010

At 11am here in London, what time is it in Taipei?

TZ=Asia/Taipei date -d "11:00 BST"
Fri Jul 16 18:00:00 CST 2010

Source: https://superuser.com/questions/164339/timezone-conversion-by-command-line

Could not launch application ‘blueman.desktop’: Unable to start application: Failed to execute child process “blueman-applet” (No such file or directory)

After an upgrade from Debian 9.9 to Debian 10, some errors were found in my .xsessions-errors file.

The apt-file utility provided by the Debian distribution provides an easy way to provide the matching Debian package for a given file.

To install it :

apt install apt-file

To provide it with the latest details from Debian repos :

apt-file update

To look for the corresponding Debian package that blueman.desktop file belongs to :

apt-file search blueman.desktop
blueman: /etc/xdg/autostart/blueman.desktop
blueman: /usr/share/Thunar/sendto/thunar-sendto-blueman.desktop

To install it :

apt install blueman

More details :

Details of apt-file Debian package

Details of blueman Debian package

Could not launch application ‘hplip-systray.desktop’: Unable to start application: Failed to execute child process “hp-systray” (No such fil e or directory)

After an upgrade from Debian 9.9 to Debian 10, some errors were found in my .xsessions-errors file.

The apt-file utility provided by the Debian distribution provides an easy way to provide the matching Debian package for a given file.

To install it :

apt install apt-file

To provide it with the latest details from Debian repos :

apt-file update

To look for the corresponding Debian package that hplip-systray.desktop file belongs to :

apt-file search hplip-systray.desktop
hplip-gui: /etc/xdg/autostart/hplip-systray.desktop

To install it :

apt install hplip-gui

More details :

Details of apt-file Debian package

Details of hplip-gui Debian package

To detect whether software based rendering is needed for Qt 5 the glxinfo program is a requirement but it was not found on this system.

After an upgrade from Debian 9.9 to Debian 10, some errors were found in my .xsessions-errors file.

To detect whether software based rendering is needed for Qt 5 the glxinfo program is a requirement but it was not found on this system.

The glxinfo program is provided by the mesa-utils Debian package.

To install it :

apt install mesa-utils

More details : Details of mesa-utils Debian package

Fix auto-indentation in Vim

Here are a few VIM commands to type within the editor to check the current settings and enable what is missing to make VIM auto-indent your file.

:filetype

If disabled, the output will be :

filetype detection:ON plugin:ON indent:OFF

To enable it :

:filetype indent on

To list all the indentations file available (for any programming language for instance)

:e $VIMRUNTIME/indent

If you find one that matches the programming language that you are typing in your editor, to indent your code :

gg=G

To make it permanent, add the following line in your .vimrc file :

filetype indent on

pdflatex not found. Please select a different –pdf-engine or install pdflatex

If you use pandoc to generate a pdf file from a markdown file, you may have this warning message :

pdflatex not found. Please select a different –pdf-engine or install pdflatex

On Ubuntu 19.04, after an initial install using the distribution package manager, no pdf engine is installed.

Using the apt-file utility and searching for pdflatex, texlive-latex-base package includes it.
This package texlive-fonts-recommended will bring additional fonts.

To install it :


apt install textlive-latex-base texlive-fonts-recommended

To test the pdf output :


pandoc test.md -s -o test.pdf