Installing fonts locally in Linux

You can simply copy the font either as separate .TTF files or as a whole directory named after the family of the font, into the hidden directory .fonts inside your user’s home directory.

Then, if you want to start using the new font immediately, do rebuild the font cache with the command:

  • fc-cache -f -v
Advertisements

See differences between PDF files

A very convenient tool to visually display differences between two PDF files is diffpdf.


Fast image viewer for Linux

Meet feh – a fast and minimalist image viewer, suitable for quickly scrolling though your collection of resized photos without annoying jerks and delays.

It can be installed from your package repository.

One way to use it is to open the terminal window in the folder where your images are stored and run command:

  • feh -ZF

Here “Z” stands for zoom, and “F” stands for full screen. So it goes full screen and any images smaller than the screen size will be zoomed up. You can also add “r” parameter to recursively scan all subdirectories.

You can also set delay between slides. Read more about it all:

  • man feh

Opening WebP with Gimp

If your version of Gimp does not yet have support for images in Google’s WebP format, you probably still can open them using gimp-webp plugin. Just check it out from Github and follow the instructions.


Convert PDF to EPS

You may want to convert a PDF file to EPS format, for example to insert it in a Microsoft Word of LibreOffice Writer document.

One way to do is like this. This workflow creates an intermediary Postscript file during the conversion. Note: no need to provide name of the output EPS file, it will be created automatically.

 

  • pdf2ps myfile.pdf myfile.ps; ps2eps myfile.ps

Photoshop PSD thumbnailer for Gnome file manager

This script generates a system script and associated meta-information for displaying Adobe Photoshop .PSD image thumbnails in Gnome file manager. It is intended to work with Nautilus, but also works with Nemo in Linux Mint 18.2 Sonya Cinnamon, even though “Add GConf Hooks” section of the script fails.

Run the script with sudo and reboot afterwards.

The script was acquired from askubuntu.com here, and it is actually preferable that you get it from there, because here it may be automatically reformatted and fail at execution. It is posted here only for archival purposes.


#!/bin/bash

# ———————————————————–
# — Write psdthumbnailer
# ———————————————————–
OUTFILE=/usr/lib/psdthumbnailer
(
sudo cat <<‘EOF’ # bin/bash # Arguments / Parameters %i %o %s f_in=$1 f_out=$2 f_size=$3 # Execute Convert PSD to PNG through ImageMagick exec convert “psd:$f_in[0]” -scale “$f_sizex$f_size” “png:$f_out” EOF ) > $OUTFILE
# ———————————————————–
# — Write photoshop.thumbnailer
# ———————————————————–
OUTFILE=/usr/share/thumbnailers/photoshop.thumbnailer
(
sudo cat <<‘EOF’ # bin/bash [Thumbnailer Entry] TryExec=/usr/lib/psdthumbnailer Exec=/usr/lib/psdthumbnailer %i %o %s MimeType=image/vnd.adobe.photoshop; image/x-photoshop; image/x-psd; EOF ) > $OUTFILE
# ———————————————————–
# — Set File Permissions
# ———————————————————–
sudo chmod 0755 /usr/lib/psdthumbnailer
sudo chmod 0644 /usr/share/thumbnailers/photoshop.thumbnailer

# ———————————————————–
# — Add GConf Hooks to parse thumbnails
# ———————————————————–
sudo gconftool-2 –set /desktop/gnome/thumbnailers/image@vnd.adobe.photoshop/enable –type bool true

sudo gconftool-2 –set /desktop/gnome/thumbnailers/image@vnd.adobe.photoshop/command –type string “/usr/lib/psdthumbnailer %i %o %s %i %o %s”

# ———————————————————–
# — Install Dependencies
# ———————————————————–

sudo apt-get install imagemagick


List fonts used in PDF document

If you want to see what fonts have been used in creation of a PDF document, you can use pdffonts utility of poppler-utils package for this. Just type:

  • pdffonts yourfile.pdf