All posts by ENDLESSL00P

Set system locale on Linux

How to change language using localectl set-locale

Locales consist of a set of environment variables to define language, country, and character encoding for applications and shell sessions on a Linux system. These environment variables are used by system libraries and country-specific applications on the system.

The locale affects the time and date format, first day of the week, numbers, currency, and many other values formatted according to the language or region (country) set on a Linux system.

The locale and localectl utility provides information about the currently installed locale and changes it when needed.

locale
LANG=en_US. UTF-8
LC_CTYPE="en_US. UTF-8"
LC_NUMERIC="en_US. UTF-8"
LC_TIME="en_US. UTF-8"
LC_COLLATE="en_US. UTF-8"
LC_MONETARY="en_US. UTF-8"
LC_MESSAGES="en_US. UTF-8"
LC_PAPER="en_US. UTF-8"
LC_NAME="en_US. UTF-8"
LC_ADDRESS="en_US. UTF-8"
LC_TELEPHONE="en_US. UTF-8"
LC_MEASUREMENT="en_US. UTF-8"
LC_IDENTIFICATION="en_US. UTF-8"
LC_ALL=

Output a list of all available locales.

locale -a
aa_DJ
aa_DJ.iso88591
aa_DJ.utf8
aa_ER
aa_ER@
aa_ER.utf8
aa_ER.utf8
aa_ET
aa_ET.utf8
..

Change system locale

If you want to change the locale, the update-locale and localectl command is used. The LANG variable can be used to set the locale for the entire system.

The following command sets LANG to de_DE.UTF-8

sudo localectl set-locale LANG=de_DE.UTF-8

To set a locale for a single user, you can simply open the file .bash_profile and add the following lines.

LANG = "de_DE.utf8"
Export LANG

For Debian 10 (Buster), the dpkg-reconfigure service program is a good way to set the system locale.

sudo dpkg-reconfigure locales

The locale settings are located in the following files.

  • /etc/default/locale – Ubuntu/Debian
  • /etc/locale.conf – CentOS/RHEL

These files can also be edited manually using a preferred command line editor, such as Vim or Nano, to configure the system locale.

Further help can be found in the man pages.

man locale
man update-locale
man localectl

How to PDF thumbnail preview in Windows Explorer

How to enable PDF preview and file icons in Windows Explorer

Sumatra PDF is a small, fast and flexible PDF viewer kept in minimalist design. The free software can be installed on Windows and is alternatively available as portable software, which can also be used for operation with a USB stick.

this is how it is done

windows_explorer_miniatur_vorschau
Figure: Windows Explorer PDF Preview

Enable PDF preview in Windows Explorer with Sumatra PDF

sumatra-pdf

The Sumatra PDF Reader allows thumbnail preview in Windows Explorer, with the option enabled during installation, with options open, and “Windows should preview PDF documents” be enabled.

SumatraPDF-3.2-64-install

The Sumatra PDF Reader can be downloaded here.

In Windows Explorer, you activate the preview window in the ribbon under View, and for the file icons in the Layout – Large Symbols or Extra Large Symbols box.

explorer_vorschaufenster
Figure: Windows Explorer – View – Preview Window

Adobe Reader PDF thumbnail preview in Windows Explorer

adobe-pdf

For Adobe Reader users, activation is in the menu under Edit – Settings – General – Enable with Hacking in Checkbox at “PDF Miniature Preview in Windows Explorer”.

adobe_einstellungen_pdf miniature preview
Illustration: Adobe Reader Settings

Foxit Reader Windows Explorer PDF Preview

foxit-pdf

There is no preview setting for the Foxit Reader, Foxit is also free, the preview handler is automatically activated during installation in Windows Explorer.

Outlook printing is not possible

Printing is not possible if no item is selected

Outlook 2019 (Office 365) displays an error message when you try to print an email. The error happens both when trying to print file > as well as with right-click -> quick print, the same error message always appears. However, documents from Word or Excel can be printed on the printer.

Symptom

Printing is not possible if no item is selected. select an item and try to print again

outlook printing is not possible
Outlook: Printing is not possible if no item is selected.

Solution

Exit Outlook and open File Explorer, type %APPDATA% in the address bar, and change to the Microsoft and Outlook directory: The full path is C:Users%username%AppDataRoamingMicrosoftOutlook. Search for the file outlprnt, if it exists, it can be deleted (only this one file). The next time You start Outlook, the outlprnt file is regenerated, so the error is fixed and emails can be printed again.