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.

 


Find paragraph breaks in LibreOffice

To find paragraph breaks (i.e. the ASCII line feed character 0A hex)  in LibreOffice, use the currency symbol “$” as the search string.

Make sure to look into “Other options” and check “Regular expressions” in the “Find & Replace” dialog.

P.S.

By the way, searching for “\n” and replacing it with “\n” can be done only once, as on the repeated action there will be no matches found anymore and searching for “$” must be done instead. Read some more about this bug/feature/inconsistency here.

 


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.


UTF-8 from MySQL does not show correctly in PHP

The data you have in MySQL is all in UTF-8, you have UTF-8 specified in your HTML, PHP is set up to use UTF-8, but you still get gibberish as output, with question marks showing up on screen instead of correct symbols.

The problem may be that the communication between MySQL and PHP is not happening in UTF-8.

Try telling “SET NAMES ‘utf8′” to MySQL when you initiate the connection, before you run any other queries.

For example, as soon as you establish the connection to database, run this in your script:

mysqli_query( $conection, “SET NAMES ‘utf8′” );


Reset filters in LibreOffice

You may experience a situation where may not be able to reset filters in LibreOffice, with the Data -> More filters -> Reset all.

Use the alternative way by directly ordering the rows to be shown by Format -> Row -> Show.

 


Postfix 451 4.3.0 Temporary lookup failure

You set up Postfix and attempt to send the mail, but receive an error saying “451 4.3.0 Temporary lookup failure”.

Check to see if you have /etc/postfix/transport file. If you don’t, run the command below and try again:

  • cd /etc/postfix
  • touch transport
  • postmap transport