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.

Linux – 360 degree video editing on Linux

I recently purchased a 360-degree camera that I have used a few times. It takes 360-degree spherical photos and also films in 360 degrees. It’s not the most expensive such camera, but it does a decent job shooting 360-degree panoramic videos.

However, I have run into a couple of problems with the resulting footage on Linux.

First, as is the case with pretty much any footage shot on your phone, it can be bumpy and really needs to be stabilized. I addressed this to some degree by purchasing a 3-axis gimbal, which minimizes the need for stabilization. However, the software I typically use on Linux for editing videos – Kdenlive – doesn’t do a great job stabilizing 360-degree video. Additionally, Kdenlive doesn’t have a profile for 360-degree video and simply recognizes it as an equilateral rectangular clip (1920×960, 27.90fps). It’s still possible to edit the video using Kdenlive, but it treats it as just a wide angle clip and not as 360-degree video. Otherwise, Kdenlive edits the video as if it was any normal video clip.

Second, when you render an edited 360-degree video file in Kdenlive, it loses the tag necessary to tell youtube (or a desktop player; see below) that the video is 360-degree footage. As a result, it’s necessary to re-add that tag before the video can be played back on your computer or uploaded to youtube. There is a python script that can do this but it only works under Windows or Mac. It was released by Google and the GUI version is available here. I run it on a virtual machine and it works fine. It would be nice to be able to simply edit the necessary tags in the video using something like VLC or FFMPEG or a command line in Linux, but I have been unable to find directions that explain how to do that at this point.

Third, there are issues with playback. Until just recently (as in the end of 2017), playback of 360-degree videos on Linux was not really possible. There wasn’t a video player that had this option. However, as of the 3.0.0 version of VLC, 360-degree video playback is now possible. (As a bonus, VLC can also open 360-degree images as well. I love VLC.) Of course, VLC 3.0.0 doesn’t ship with most current Linux distributions, so you’ll have to install it from their PPA nightly branch. With VLC 3.0.0, it is now possible to video 360-degree video on Linux.

What is really needed to streamline this process on Linux? If the awesome folks running Kdenlive could create a 360-degree video profile (at least as a rendering option) that includes the necessary spherical tag, that would mean I could skip step 2 above entirely. That would be awesome. I’d happily donate some money to them if they could make that happen.