Good Running

This holiday weekend (if you can call celebrating the beginning of the end for the Native American Indians, a holiday) I managed to set two personal records in running. The first, happened on Thursday (“Thanksgiving”) where I logged my best 5K run (under 25 minutes). The second occurred on Saturday, where I set another best time for 10K (at 50 minutes). I know it’s not fast, but for some who is technically closer to fifty than forty, I think it’s pretty damn good. I’m not sure why I seemed to be in a zone with these two runs. Maybe it was because I was listening to music, which I normally don’t do; the “Rocky Training Montage” does tend to get one motivated.

And that’s all I have to say about that.

Get Geo Location

Here’s, let’s call it what it is, a hack to get geographical location (longitude & latitude).

Code:

#!/bin/env perl
use warnings;
use strict;
use LWP::Simple qw ($ua get);
$ua->timeout(15);

my $geo_url  = "https://geoiptool.com";
my $junk     = get($geo_url) || die "Problems connecting to URL!";
my $lon_line = 0;
my $lat_line = 0;
my $lon      = 0;
my $lat      = 0;
if ($junk) {
    my @lines = split( /\n/, $junk );
    my $i = 1;
    foreach my $line (@lines) {
        chomp($line);
        if ( $line =~ /Longitude/ ) {
            if ( $lon_line == 0 ) {
                $lon_line = ($i);
            }
        } elsif ( $line =~ /Latitude/ ) {
            if ( $lat_line == 0 ) {
                $lat_line = ($i);
            }
        }
        $i++;
    }
    $lon = $lines[$lon_line];
    $lon =~ s/\s+//;
    $lon =~ s/\<span\>//;
    $lon =~ s/\<\/span\>//;
    $lat = $lines[$lat_line];
    $lat =~ s/\s+//;
    $lat =~ s/\<span\>//;
    $lat =~ s/\<\/span\>//;

    if ( $lon && $lat ) {
        print "longitude: " . $lon . ", latitude: " . $lat . "\n";
    }
}

Output:

./geoloc.pl 
longitude: -80.135, latitude: 26.937

And that’s all I have to say about that.

Didn’t Want To

Didn’t feel like nor did I want to run today. Well, I actually did want to run, but wasn’t planning on because the [incorrect] weather forecast said it was going to be cooler and, being the wimp I am, was planning on the stationary bike for 45 minutes or so. But clearer heads prevailed and I put on a couple light layers (it was in the low forties), laced up my running shoes and went for about a 35 minute run. Glad I did it, now I feel better for not giving into my slack-ass nature. Sometimes, you just have get out there and do it and stop coming up with [lame] excuses.

And that’s all I have to say about that.

Amazon Echo – Multi-Room Music

Recently, I don’t know when, Amazon added Multi-room Music capability to their Echo devices. Basically, if you have multiple Echo devices, in different rooms, you can, once you set up the group, stream the same music to them all at once. This is a great feature and, to be honest, something that should have been available from the start. However, it comes with a price; it eats up your WiFi bandwidth. I found, through some very basic, unscientific testing on Speedtest.net that when not streaming to all my Echo devices (I have 3 Echo Dots) at once, I had the speeds that I expect (and pay for).

When I streamed across all three devices, there was an approximate 40% drop in bandwidth.

So, if you’re doing other things (like writing a blog no one reads, downloading large Linux ISOs or working) on the ‘Net while streaming to all your Echos, you may feel that degradation in speed.

And that’s all I have to say about that.

Installing Fedora on System76

About

This is about what I went through to install Fedora 27 (XFCE spin) onto my Gazelle system76 laptop. For those not aware, system76 provides hardware that ships with Linux (Ubuntu) instead of Windows; which actually results, depending on what you order, a system just as powerful as the usual suspects (Dell, HP, etc.) but $200-$500 cheaper because you don’t have to pay for Micro$oft Windows (yes, you are still paying for Windows when you buy from those others).

Background

So, as I mentioned earlier, system76 systems (that sounds redundant) comes with Ubuntu. For me, that lasted all of 30 minutes before I replaced it with something else. That wasn’t an easy task. With the newer Skylake processors, kernel 4.x is needed. That left distros like CentOS out the question with its 3.10 kernel; oh, it would some how install completely, but on reboot it would croak. Plus, that Gnome2 UI (think it’s Gnome3 now, but still the 3.10 kernel) just wasn’t for me. Native Debian behaved similarly. So I jumped between various other distros, such as Mint (which I view as Ubuntu with a green color scheme), wattOS (which uses LXDE, a session-managed Openbox, but still based off of Ubuntu). SparkyLinux, another LXDE distro based of the “testing” branch of Debian, wasn’t too bad. There were some others in there as well. The last one, before attempting Fedora, was system76‘s Pop!_OS. Pop!_OS uses a somewhat customized Gnome3 desktop and Ubuntu repositories. I’ve never been a fan of Gnome3. Maybe because I’m used to DEs like XFCE and Openbox where you can right-click on your desktop and get the applications menu right there, as well as being severely limited in customizing; things as simple as date/time formatting, had to find an extension for that. I did “try” to use Gnome3 for a while, but I could never get used to it. So, this is how I got to Fedora.

About Fedora

Fedora is basically a bleeding-edge distro based off RedHat (actually owned by RedHat).

Installation

The initial installation didn’t go to well. I got through everything until the end, when it attempted to write the boot loader, which it failed. Having installed countless distros of Linux, I can’t say that I’ve run into that all to often; OpenSuSe may be the one other distro that had that issue. Through some digging around the ‘Net, I found that the reason may be that the BIOS wasn’t set to UEFI. I normally don’t set my BIOS to UEFI and don’t recall on this system whether or not it was set to that or not. So, I set my BIOS to UEFI and the installation, after creating the requisite /boot/efi partition, worked flawlessly. One of the faster installs, to be honest.

Initial Boot & Login

The initial boot went fine until I tried logging in as a non-root user (who really logs into a system as root anyway?). The screen would flicker and then take me back to the login screen; as root I could log in fine. So I went to the console level, logged in with the non-root account and executed startx. As soon as XFCE came up, SELinux started giving all sorts of messaging about access my $HOME, reading $HOME/.cache, reading some other directory in $HOME, etc.

SELinux

I read/followed how to set up a policy to be OK with that, etc., but after about the fifth one, I went to find how to disabled SELinux, or, at the very least, dial it down. Initially, instead of flat out disabling in /etc/selinux/config, per recommendation from various readings, I set it to permissive. This resulted in not being able to boot at all. That’s not entirely true, it would boot, but a lot of the services would fail to start. This resulted in me having to boot into single-user mode and set SELINUX=disabled in /etc/selinux/config. This worked like a champ and booted up in record time and allowed me to log in. SELinux has been around for a while and while it has it’s purpose, I don’t know that it’s necessary for a home system. I suspect why SELinux was so upset about my $HOME was because it wasn’t encrypted. To me, it’s just a bit overkill.

Conclusion

After working through the above, everything worked as I expected. In the past I used Fedora almost exclusively, right around the time RedHat turned into the Micro$oft of the Linux world and RedHat was no longer free. After a while I started using variations of Debian, with some dabbling with Slackware and OpenBSD (and FreeBSD) of which requires a lot of hand-holding, patience, time and good code compilation error troubleshooting skill. I’ll have to get used to using DNF (Dandified yum, next-gen fork of yum) again versus Debian’s APT. Syntactically, they’re close and I’m not exactly new to using dnf.

That’s it. That was my, not so problematic experience installing Fedora on my system76 device.

And that’s all I have to say about that.