Linux – tinyMediaManager on Kubuntu 18.04

I run a network attached storage (NAS) device at home to manage all my media (e.g., music, videos, photos, etc.). I have used various programs over the years to manage the naming and organizing of my music files but just recently discovered tinyMediaManager for managing video files. Since it’s written in Java, it works on any OS, including Linux.

Given my large collection of movies, I have been looking for software that would properly name and organize all of them. tinyMediaManager seemed like the perfect solution, but I immediately hit a snag once I tried to get it running on Kubuntu 18.04 (my current distribution of choice). I couldn’t get the GUI to launch. It took some doing, but I eventually figured out how to make this work on Kubuntu 18.04.

First, download the tar.gz file here. (Note: I couldn’t download it using Chrome, as the tinyMediaManager site only lets you download it using a browser that allows Java and, as of Chrome 45, Chrome doesn’t. I used Firefox, which worked fine.).

Untar that file and move the resulting folder wherever you want it to reside (obviously, somewhere you have access to it, but, otherwise, it doesn’t matter).

Now, the tricky part. According to the tinyMediaManager website, all you need to do to launch the program is use a terminal to navigate to the folder you just untarred and use the command:

cd /home/ryan/tinyMediaManager
./tinyMediaManager.sh

When I tried this, it didn’t work. It seemed like it was trying to do something, but then the GUI wouldn’t open and… nothing. Disappointed, I started looking for answers. I eventually found the “launcher.log” file in the tinyMediaManager folder and that gave me the clue I needed to solve the problem. As it was trying to launch, it was running into a problem with a specific thread and library in the version of Java I had installed by default. Here was the error:

Exception in thread "Getdown" java.awt.AWTError: Assistive Technology not found:

It turns out, tinyMediaManager has not been updated to work with newer versions of Java. So, here’s what you can do.

First, install the Open Java Development Kit version 8 which is the latest version it works with:

sudo apt-get install openjdk-8-jdk

It turns out, you can have multiple openjdk’s installed at the same time. I was running as my default openjdk 11. Now, in order to switch to the openjdk 8 environment, type in the following command at the terminal:

sudo update-alternatives --config java

You’ll then be given the chance to choose which openjdk you want to use, like in this screenshot:

Choose openjdk 8 as your default. Then try running tinyMediaManager again. If the software gods are smiling upon you, the GUI will launch:

Linux – Adding and Organizing Music with Clementine

In the almost 15 years I’ve been using Linux I have gone through a number of music playing apps. From Amarok to Banshee to Rhythmbox and at least a few more. My favorite at the moment is Clementine. I’ve grown to really like the basic interface of Clementine and it does a good job with pretty much everything I need.

The one issue I had with it over the years is that I didn’t think I could use it to add music to my music library and organize it at the same time. Turns out, I was wrong. Clementine does have the ability to add songs to your music library and organize them (into folders and renaming the files). It’s just not the most intuitive process. So, I figured I’d outline the process below.

First, you obviously need to install Clementine.

You’ll then need to set your music directory in Clementine which is where you want to store your music files. Go to Tools -> Preferences.

In the window that opens, click on “Music Library” and then add the folder where you want to store your music:

Next, to add music to your folder, go to the left side of Clementine and look for where it says “Files”:

Click on that and you’ll be able to browse to any folder on your computer.

I usually put the music I want to add to my collection on my desktop, so I navigate there, find the folder, and then right-click on it. In the context menu that comes up, click on “Copy to library.”

In the window that comes up next, you’ll have the option to change how the files are organized, both at the folder level and with the renaming of files.

You also have the option of changing the destination (which doesn’t make much sense since you want the music in your primary music folder). You also have a bunch of other options, like deleting the files after they are copied, changing the naming conventions, etc. Once you’re ready, hit “OK” and your music files will be copied into your music library named exactly how you want them to be named and organized how you want them to be organized.

Linux – Fixing the Epson (V33 Perfection) Scanner Issue in Kubuntu 18.04

As of Kubuntu 17.10, my Epson V33 Perfection scanner stopped working with Linux. I bought this scanner specifically because it did work with Linux. That it stopped working was a serious disappointment as I have been using the same scanner for years and regularly need it for a variety of things.

I tried installing older versions of the software (I’ve kept the downloads from Epson for years) but that didn’t work. I tried it on a different computer with the same OS and that didn’t work. I tried a lot of troubleshooting and came up empty. After hours of trying various solutions, I gave up (that was a few months ago).

However, when my CPU died on my desktop computer forcing me to reformat it again about a month after I had previously tried, I figured it was time to try to solve this again. This time, however, I quickly came across the answer online (see here). It turns out, this is a bug in the latest version of the scanning software that ships with Linux, which confirmed that it wasn’t a problem with my scanner or with Epson’s software. Here’s what I did to fix the problem.

First, go ahead and install the latest version of Epson’s software from their website (start here – or just here – lots of clicks to get to where you need to go).

Untar the file you download and read the directions for how to install the software. (Basically, navigate to the directory you just untarred in a terminal then run ./install.sh).

Before this bug, that was all you needed to do and the scanner would work. Now, there are two more steps.

The second step, also at the terminal, is to type in:

sudo ln -sfr /usr/lib/sane/libsane-epkowa* /usr/lib/x86_64-linux-gnu/sane

I’m not exactly sure what this command does but the “ln” command creates symbolic links, so I’m guessing it’s linking two files or commands that help correct the bug in the latest iteration of the software.

Then, open a text editing program and create a new, blank file. In that file, you’re going to add the following content:

# chmod device EPSON group
ATTRS{manufacturer}=="EPSON", DRIVERS=="usb", SUBSYSTEMS=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="*", MODE="0777"

The first line of this file is just a comment. The second adds information about Epson scanners.

Save the file as “79-udev-epson.rules”.

Now, move that file from wherever you created it to the following directory:

“/etc/udev/rules.d/”

Like this:

Now, restart your computer. This worked for me. Hopefully, it will work for you too.

 

Linux: How to Install Zotero Standalone (in KDE or Kubuntu)

I’ve used Zotero to manage my collection of books, articles, and other citations since Zotero was released. The software has become much more robust over time. As of the latest major milestone release (5.0), Zotero has moved to standalone software exclusively (they no longer piggyback on Firefox). With Mac and Windows, you can download executable files to install Zotero. With Linux, it’s a little trickier. Here’s my method for installing Zotero so I can launch it from the KDE application menu.

First, download the tar.gz file from Zotero.

Second, untar (i.e., unzip) the folder inside the tar.gz compressed file.

Move the resulting folder (Zotero_linux-x86_64) to a directory where you’ll want to run Zotero from. I use my /home/[user]/ folder but it can be any folder with read/write/execute access.

The Zotero website says that you should then run the bundled “set_launcher_icon.” I usually do that, but I still need to add Zotero to my application launcher. To do this, right-click on the KDE application launcher menu like this:

Select “Edit Applications.”

In the window that pops up, decide where you want to put Zotero (I went with Education) then select “New Item.” You’ll get this window:

Fill it in with the following information:

Name: Zotero
Description: (Whatever you want.)
Comment: (Again, whatever you want.)
Command: /home/[user]/Zotero_linux-x86_64/zotero

You can also add an icon for Zotero (I always do), like this one.

Obviously, replace [user] with your username. The line that really matters is the Command line as that is where the OS will know to look for the Zotero launcher. Make sure it is pointing to the file names “zotero” in the application folder (not “zotero.desktop” as that won’t launch the application).

Once you’ve done that, you should be able to launch Zotero for the quick launcher or from the application launcher:

 

 

Virtual Private Hosting – How to Remove a Domain with Certbot SSL Certificate (on Ubuntu 16.04 with apache)

It used to be pretty easy to remove a domain from my Virtual Private Server – dissable the site in apache, delete the files, delete the underlying database, and remove the domain from my DNS manager. Done.

With SSL certificates now a standard part of hosting websites (see here), this is complicated by the removal of those certificates. I am extremely grateful to the EFF for providing a free way to get SSL certificates through certbot and letsencrypt. Adding domains with certbot is pretty easy, but changing the domains with certificates is not so easy. In fact, it’s pretty complicated and there aren’t great directions out there (which is why I put this guide together).

In this guide, I’ll show you how to remove a domain from a virtual private server (I use linode.com) along with removing the SSL certificate. I was hosting a domain and website for a friend, but that person decided they no longer needed the domain. Here’s how I removed it.

First, it’s always a good idea to back up the files associated with the domain, just in case. I use phpMyAdmin to manage my SQL databases. Log in to your phpMyAdmin site, find the database associated with your site, and select Export.

You shouldn’t need to change any options, just select “Go” and phpMyAdmin will export the entire database.

To download all the files associated with your site, you can zip them from an SSH terminal or download them via FTP. I use Filezilla. Find the folder that contains all the files for your website and download the whole thing.

Now that you have a backup of everything, it’s time to start unmounting.

First, you should dismount your site in apache.

sudo a2dissite [domain]

You also need to dismount the site with encryption, which is the same command, but with the following addition:

sudo a2dissite [domain]-le-ssl.conf

Then reload your apache2 configuration:

service apache2 reload.

If you’ve done everything correctly, when apache reloads, there won’t be any errors.

Next, delete the certificate associated with your domain in certbot. To delete the certificate associated with a specific domain, the command is:

certbot delete –cert-name [enter domain here]

That will delete the certificate associated with that domain.

You may also need to update your certificate profile by using the command:

certbot –apache

This will list all of the domains you have certificates for. You can then select all of the other domains on your server but drop the one you want to delete. That will create a new certificate with all of the domains minus the one you have deleted.

If you are wondering whether certbot has actually removed your domain, you can check by going to /etc/letsencrypt. You want to make sure that your domain is no longer showing up in either the /live,  /renewal, or /archive folders. If you still see it in there, it should be safe at this point to delete any folders with the name of the domain in it.

Next, you can delete the corresponding database. In phpMyAdmin, click on “Server: localhost” then click on “Databases.” Select the box next to the database you want to delete, then, at the bottom, click “Drop”. You’ll get a warning about destroying a database. Select OK and the database is gone.

We’re almost done. Now, delete the files for your site. You can do this with the rm command from the terminal or using your FTP client.

Now, you should delete the apache site files that are located in /etc/apache2/sites-available. These are the two that were dismounted earlier: [DOMAIN].conf and [DOMAIN]-le-ssl.conf.

You can restart the apache service one more time to make sure everything is working, but you should be good.

Finally, you can delete the domain from your DNS manager.

That should do it. The domain should now be gone, entirely, from your server.