technology

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:

technology

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.

 

technology

R (Linux) – basic installation

To install the R programming environment on Linux is pretty straightforward, but it does require a little bit of know how in order to find the correct packages. As is typically the case with Linux, there are multiple ways to get things done. I like to use Synaptic for installing and removing software, but you can also use the software manager that comes with your Linux distribution (in Linux Mint it’s called Software Manager) or the command line (in KDE based distributions, Konsole).

For the most up-to-date installation of R, it’s actually best to install directly from the R repository. A list of Linux repositories for the R environment is located here. In order to install from the repository, you need to update your list of repositories in Synaptic. To access your repository list in Synaptic, click on Settings -> Repositories.

In the new Software Sources window, click on “Additional repositories” and you’ll get this window:

Click on Add a new repository. You’ll get this window:

The exact information you put into that window will vary based on which mirror you chose. Here is what I added in mine:

deb xenial/

In order to ensure you have the right files and to follow best security practices, you should install the signing key as well. Directions for installing the signing key are found here, but it can be done with a simple command from a terminal:

sudo apt-key adv –keyserver keyserver.ubuntu.com –recv-keys E084DAB9

Once you have done all of that, you can install R from Synaptic.

First, open Synaptic, which will require your password. You’ll get the basic Synaptic Package Manager window:

Next, in the search box, search for “r-base”. Right-click it and select “Mark for installation” to install “r-base”:

In the above screenshot, I have already installed r-base, so the option “Mark for installation” is greyed out. But, obviously, that’s what I already did. When you select this, Synaptic will automatically select all the other necessary packages (there are about 10 to 15 additional packages necessary for R to run: r-cran-class, r-cran-lattice, r-cran-spatial, r-cran-survival, r-cran-codetools, r-cran-nnet, r-cran-mass, r-cran-boot, r-cran-nlme, r-cran-rpart, r-cran-cluster, r-cran-kernsmooth, r-cran-foreign, r-cran-mgcv, r-cran-matrix, r-recommended, r-base-core).

If you plan on installing any other R packages, it’s not a bad idea to also install “r-base-dev,” as it helps fill in dependencies for other packages.

Once you’ve selected r-base, hit Apply in Synaptic and all the software will be installed.

You now have the base software for R installed.

To open the R environment in a terminal, launch a terminal and simply type “R” at the prompt, like this:

Here’s where things can get a little complicated. To do different things in R requires various libraries or packages. Some of these can be installed using the R terminal while others need to be installed from your Linux distribution’s repositories. To install a library or package using the R terminal, you use the following command once you have opened the R environment:

install.packages(“PACKAGENAME”)

The first time you run this, the R environment will ask you to select a mirror.

Choose one close to your location. R will then install the package, assuming you type everything correctly.

NOTES:

Before you start trying to install additional R packages, it’s a very good idea to install the following Linux packages:

r-base-dev build-essential

If you run into an error message, there are several possibilities. First, check to make sure you typed everything correctly. R is not forgiving on spelling mistakes. Second, if the error is something like:

installation of package ‘PACKAGENAME’ had non-zero exit status

Or

dependency ‘PACKAGENAME’ is not available

There is a good chance that you need to install a package or library using Synaptic (or from a terminal using apt). For instance, to install the “tm” package, there is an unsatisfied dependency (meaning, a library or package that needs to be installed but cannot be installed using the R installer). The dependency is the ‘slam’ package. This can be installed using Synaptic (or, from a terminal, using the command “sudo apt-get install r-cran-slam”). Once you’ve installed the dependency, try re-installing the package and the error messages should go away.

 

NOTES:

I also have found that I like RStudio as an IDE for working with R. It’s a little bit friendlier to use than a straight command line interface as it keeps track of variables and loaded libraries. The personal version for your desktop can be downloaded here.

And a note on RStudio on Linux. I regularly get an offset from the cursor location and where the cursor actually is in the command window. It turns out this is a font issue. If you go up to Tools -> Global Options -> Appearance and change the font to anything else, this problem will go away.

technology

Android: Wink Hub and Sprint’s Data Optimizer

I reformatted my Android phone (LG G3 with Android 5.0.1, software version LS990ZVG) the other day to address a problem I was having.  After reformatting, I reinstalled all of my apps and everything seemed to be working fine until I tried to log into the Wink Hub app to adjust the settings for some of the lights in my house.  When I tried to log in, I got the following error:

looks like we encountered an error on the server; please try again later

I figured that Wink’s servers might be down, so I gave it a little bit of time and tried again.  An hour later, I got the same message.  Thinking it might be a real outage, I googled to see if Wink was reporting anything and didn’t see anything, though it did happen to coincide with Amazon’s AWS service going down, so I thought it might be related.  The light situation wasn’t that urgent, so I didn’t think much of it until the next day when I had the same light issue and wanted to adjust the settings of the Wink Hub on my phone again.  I tried to log in and got the same error, again.  This time I figured something must be wrong.  I tried a few things before I found out the real problem.

First, I tried clicking on “I forgot my password” to have my password reset, but I got the same error.  That meant I couldn’t reset my password and there was definitely something wrong.

I tried uninstalling and reinstalling the Wink Hub app, but got the same error after reinstalling the app.

Then I started googling.  In one forum buried deep in the recesses of the internet, I found a hint at what might be the problem.  And, not surprisingly, it’s the same piece of software that has plagued me for years: Sprint’s stupid Data Optimizer app.  I’ve had issues with this app in the past as it slowed and killed my data connection.  I routinely turn it off immediately after I reformat my phone because it is so worthless.  As it turns out, it was the culprit with this problem as well since I had forgotten to turn it off.

You can find the app in your list of apps under Optimize & Protect (see the screenshot):

Sprint Data Optimizer

When you open the app, you’ll see the following two options:

Sprint Data Optimizer

Click on Data Optimizer and you’ll see this screen:

Sprint Data Optimizer

Turn the Data Optimizer off and you can now log into the Wink Hub app.

I don’t know exactly what the problem is, but I’m guessing it has to do with how the Sprint Data Optimizer manages data.  It likely is compressing it and the Wink Hub app may not allow login credentials to be sent that way to the server.  Regardless of the problem, as soon as I turned this terrible piece of software off, I was able to log into the Wink Hub app and adjust my lighting settings.

technology

Linux: Installing Redshift

There is a growing body of research suggesting that blue light before bedtime can be associated with sleep problems.  I’ve known about this for a while, but have just recently started having sleep problems.  I decided to try some of the programs that make changes to the color of your monitors to see if it helps.  On Android, I installed Twilight.  On Linux, I went with Redshift.  There was a minor complication in installing Redshift, so I figured I’d detail how to install the software and get it working on here for anyone else who wants to give it a try.

First, there are two software packages you need to install: redshift and geoclue-2.0.  If you don’t install geoclue-2.0, redshift won’t know your location and won’t be able to adjust your screen relative to the amount of light outside and to sunrise and sunset.  I originally tried launching Redshift without geoclue-2.0 installed and it gave me an error.  Make sure you install it.  If you want to have redshift as a widget in KDE, you can also install: plasma-widget-redshift and plasma-applet-redshift-control.  And for a GUI: redshift-gtk.

From the commandline:

sudo apt-get install redshift geoclue-2.0 plasma-widget-redshift plasma-applet-redshift-control redshift gtk

Or in Synaptic:

Screenshots for Redshift Tutorial

Screenshots for Redshift Tutorial

Once you’ve installed these packages, you can launch Redshift from the application launcher.

Screenshots for Redshift Tutorial

With the GTK option, you’ll get this little icon in your System Tray:

Screenshots for Redshift Tutorial

The System Tray icon allows you to turn Redshift on and off (right-click).  It also provides some information about current settings.

Once it’s installed, Redshift gets right to work, adjusting the color of your monitor and slowly shifting the color throughout the day.

If you’d like Redshift to start automatically when you boot the computer, make sure that you enable it in the Autostart options in System Settings:

Redshift autostart

If you need to adjust any settings, you can do so by using the command line and a configuration file, detailed here.