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.


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

Add image to MP3

You can add album art images to your mp3 files. Use EasyTAG (GUI) or eyed3 (CLI) ID3 tag editors to accomplish that.

Example. Use eyed3 to remove any embedded images, then list options for embedded image file, then embed an image for an icon:

  • eyeD3 --remove-images test.mp3
  • eyeD3 --list-image-types
  • eyeD3 --add-image=test.jpg:ICON test.mp3

Autostart improvised IDE

Possibly you prefer to use simple tools for your Web development tasks, and possibly you get annoyed by the need to start all those applications one by one every time.

You may automate the task though.

Here is a sample launcher script, which starts a console, a mySQL client logged into database (Note: the password is provided in plain text, which is not secure, so think if you can use that, if you can’t just leave “-p” and log in manually every time. Also note: password follows immediately after “-p”, there is no gap), a console ready to display errors from Apache error log, and a xed editor with some file already in it. The script is suited to fit 1680 x 1050 display.

If you are running Mint Mate, you can add a Custom Application Launcher calling this script to your panel, and you can use this icon for it, which fits nicely.

mate-terminal --geometry 102x42+0+0 -x sh -c 'echo "\033]0; cli \a"; cd /var/www/mysite_com; exec bash' &
mate-terminal --geometry 102x42+870+0 -x sh -c 'echo "\033]0; mySQL \a"; mysql -u data_mysite -D data_mysite -pdata_mysite; exec bash' &
mate-terminal --geometry 204x16+0+725 -x sh -c 'echo "\033]0; log \a"; cd /var/log/apache2; tail -n 0 -f error_mysite_com.log; exec bash' &
caja "/var/www/mysite_com" &
xed "/var/www/mysite_com/index.php" &


Copy symlink as file

You can copy symbolic links so that at the destination they show up as regular files. Just use -L option for the cp command.

This example copies all files from the current directory to directory ~/keys, and turns any symbolic links to regular files in the process (“dereferences” them):

  • cp -L * ~/keys

Run screensaver in Mate

You can instantly activate the screensaver in Linux Mint Mate by running this command at the command prompt:

  • mate-screensaver-command --activate