Using HP LaserJet 2010 printer with Linux Mint

The problem: HP LaserJet 2010 printer gets recognized by Linux Mint but fails to print.

The solution:

  • Remove all automatically installed printers
  • sudo hp-setup -i

Let it download the HP plugin and accept defaults, then print test page (you must not be root or the print will fail).

Thunderbird does not start

This may happen after a crash.

Problem: You attempt to start your Thunderbird, but its GUI window does not show. You can see it running as a process in the background, but nothing else happens.

Cause: The problem may be caused by a surviving lock file in the user profile directory.

Solution: Navigate to .thunderbird in your user directory, select the appropriate profile directory and delete or remove file .parentlock therein.


Renew Let’s Encrypt certificate

If you have no automatic certificate renewal, you may found out one day that the browser is telling you that your site is “unsafe” as the certificate has expired.

Just type at the command line:

  • letsencrypt renew

But you can also add a simple cron job for automatic renewal, for example:

  • 15 5,17 * * * /usr/bin/letsencrypt renew

Checking twice a day is recommended for the unlikely event if something happens to your certificate due to the Let’s Encrypt themselves.

If the certificate is valid and new nothing happens aside from reading the certificate locally, so you can run it as often as you want.

Mount Truecrypt volume without Truecrypt

Some of you may have some old Truecrypt volumes lying around. Truecrypt was a nice and handy utility which is not developed anymore, unfortunately. But you still can mount the volumes created by it.

One way to do it on Ubuntu:

  • sudo cryptsetup tcryptOpen myvol


  • – the file name of your volume
  • myvol – arbitrary name of the virtual disk to be created

You will be asked for a passphrase, and if you still can remember it, the volume will be mounted under /dev/mapper with the name you provided and will show up as just another disk.

Generate QR code

  • This simple command will give you an SVG file with QR code vector image in it:
echo "Hello world!" | qrencode --level=H --dpi=300 --type=SVG -o qr.svg
  • If a bitmap is enough, just type:
echo "Hello world!" | qrencode --level=H --dpi=300  -o qr.png

  • Even this simple command will work:
qrencode -o qr.png "Hi!"

  • Change the color from standard black to any if you like:
echo "Hello world!" | qrencode --foreground=808080ff --level=H --dpi=300 --type=SVG -o qr.svg
  • Alpha supported too:
echo "Hello world!" | qrencode --foreground=FFFF00FF --background=0000FF55 --level=H --dpi=300 -o qr.png
echo "Hello world!" | qrencode --foreground=FFFF00FF --background=0000FF55 --level=H --dpi=300 --type=SVG -o qr.svg


Remove Apache server signature from footer

By default error pages served by Apache2 contain a line at the bottom, stating version of Apache, OS etc.

If you want it gone, edit /etc/apache/apache2.conf:

  • Add a line:
ServerSignature Off
  • Reload the new configuration:

service apache2 reload


P.S. While you are at it you may also add this to tell server not to share more information about itself than necessary:

ServerTokens ProductOnly


Prevent Apache from listing files in directory

One way to prevent automatic directory listing with Apache2 is to disable its autoindex module (results in: 403 Forbidden):

  • sudo a2dismod autoindex
  • service apache2 restart

To enable it later again:

  • sudo a2enmod autoindex
  • service apache2 restart

Another way is to edit Apache2 main configuration file /etc/apache2/apache2.conf (results in: 404 Not Found):

  • Find the section which looks like the one below

<Directory /var/www/>
Options Indexes FollowSymLinks
AllowOverride None
Require all granted

  • Remove the word "Indexes":
  • service apache2 reload