Title photo
frugal technology, simple living and guerrilla large-appliance repair

Regular blog here, 'microblog' there

Many of my traditional blog post live on this site, but a great majority of my social-style posts can be found on my much-busier microbloging site at updates.passthejoe.net. It's busier because my BlogPoster "microblogging" script generates short, Twitter-style posts from the Linux or Windows (or anywhere you can run Ruby with too many Gems) command line, uploads them to the web server and send them out on my Twitter and Mastodon feeds.

I used to post to this blog via scripts and Unix/Linux utilities (curl and Unison) that helped me mirror the files locally and on the server. Since this site recently moved hosts, none of that is set up. I'm just using SFTP and SSH to write posts and manage the site.

Disqus comments are not live just yet because I'm not sure about what I'm going to do for the domain on this site. I'll probably restore the old domain at first just to have some continuity, but for now I like using the "free" domain from this site's new host, NearlyFreeSpeech.net.

Tue, 25 Aug 2015

Use Firefox to find the right certificate for Citrix to beat SSL Error 61

I had to set up my laptop to access a new Citrix site, and I got the dreaded SSL Error 61, where the proper certificate could not be found.

It was a Go Daddy certificate, and I knew that I had it. I went to Go Daddy, got another copy and dropped it into /opt/Citrix/ICAClient/keystore/cacerts/.

The error persisted.

After a few other unsuccessful attempts, I found the answer at Ask Fedora.

Basically you find the right certificate by going through Firefox itself, exporting the certificate and then using rootly privileges to put it in /opt/Citrix/ICAClient/keystore/cacerts/.

  • In Firefox, go to the web site for your Citrix app. It should be a secure site.

  • Click on the little lock icon to the left of the URL.

  • Click "More Information"

  • Click "View Certificate"

  • Click "Details"

  • You should now see the certificate(s) you need. Click on them to select and then click "Export," and save it/them somewhere in your /home directory

  • Use the terminal and either su or sudo to copy the certificates to /opt/Citrix/ICAClient/keystore/cacerts/.

Everything should work. At least it did for me.

Sun, 23 Aug 2015

Bash script that mounts drive, backs up with rsync

I already use Bash scripts to run my rsync backups automatically, more to avoid mistakes in the rsync syntax (copying the wrong directory) than anything else.

I've been wanting to improve the script both to enhance portability by setting the target and destination directories with variables and to auto-mount the destination drive if it is not mounted already.

I decided to start with a Google search, and this entry from Frustrated Tech does exactly what I need:

Sat, 22 Aug 2015

Learning Java - why and how

Time has been a little tight over the past couple of weeks, but I had an "opening" today that I used to work on Java. Beginning Java. Very beginning Java.

I'm using the Oracle Java tutorials. You can download the whole thing as HTML in a .zip, or as epub and mobi files.

I have both the full HTML and the mobi version, which is made up of 20 separate .mobi files that I emailed to my Amazon Kindle reader because a) I'm too lazy to plug it in to the computer and b) they offer e-mail-to-Kindle, so why not use it.

I'm going through the material slowly, typing in the programs when that seems appropriate and using javac to compile and java to run them.

Read the rest of this post

Thu, 06 Aug 2015

My new coding regimen

I've been coding a little every day.

Way back, say a year ago, I could write code in the course of my job.

Not so much lately. I'm just too busy and focused on news production and other requests.

So I've been taking my "lunch" time (a loose term when you start work at 5 a.m.) to walk a bit, laptop bag in hand, to a coffee shop (Starbucks/Coffee Bean/Western Bagel depending on seating) to do a little coding.

In the past two days I've worked on my Ode Counter addin in Perl (which is live in the upper right side of this blog, and played around with writing files in Node.

It's a little time every day, and so far it's been fun.

Tue, 04 Aug 2015

Running GNOME 3.16 in Fedora 22

Since my home Internet connection has been so bad, I haven't been using my Fedora 22 laptop as my main production machine for Citrix apps, and that means I can run GNOME 3 on it without trouble.

Instead, I use the laptop for writing, web browsing, development and watching media.

And instead of my usual Xfce, I've been using GNOME 3.16 as the desktop environment.

I have few complaints. GNOME 3 is getting better and better with each release, and even between releases there have been little improvements here and there.

Right now my only complaint with GNOME 3 is with file management in Nautilus. When you drag a file into a folder, if you linger too long over the folder, you end up in it. That should be something you can configure not to happen.

To avoid this problem, I've been using Nautilus' move to feature. It's clean.

My problems with the upper panel (I'm using the TopIcons GNOME Extension) are pretty much gone. Everything shows like it's supposed to.

I like the notifications system.

GNOME Software's notion that you want to reboot for every update is absurd. I use the Yum Extender for DNF to update, and that doesn't require any rebooting. The new Yum Extender fails about 25 percent of the time. I'm confident that the Fedora team will continue polishing the application. In the meantime, dnf in the terminal works without fail.

I'm having a PulseAudio issue that presents itself in both GNOME and Xfce: When I switch audio to HDMI via PulseAudio Volume Control (aka pavu), there is no audio over that connection unless I log out and log back in. I can switch back to local audio and hear it on the laptop speakers, but going back to HDMI requires another logout/login. This fairly recent issue is not a deal-breaker but is annoying.

Otherwise, my 2-year-old HP Pavilion g6 laptop is running better than ever under Linux.

Notes:

  • While I said I was going to stop obsessing about Linux, I reserve the right to talk/write about software I'm using. Tools are still interesting. And important. My focus remains on programming. And the rest of life. (Or so I tell myself.)

  • I am getting ready to pull the trigger on 100Mb/s Time Warner Cable broadband to replace my sub-1Mb/s DSL Extreme "broadband." That would mean I could work at home more, and I would probably swing back to Xfce for production because it plays so much better with the unwieldy Citrix apps I must use.

Fri, 24 Jul 2015

Still using Linux, just not talking/reading/obsessing about it

I'm probably using more Linux than ever. My laptop runs Fedora. I'm the admin on a server running CentOS.

I will keep doing those things.

But today I unsubscribed from most of the mailing lists that have been flowing through my Gmail account over the past few years.

The Debian, Fedora, Xubuntu and Lubuntu users list? All gone. So are the development lists for Debian, Fedora and Xubuntu, and most of the others. I'm keeping a few low-volume lists. For now anyway.

I was always more of a lurker than active participant on all of those mailing lists.

Lately, and probably before that, I didn't find much of value in most of that mail. Even though the quality of the Fedora lists is a bit higher than average, I wasn't getting a whole lot out of them. I'd scan the mail, maybe read one or two posts every few days, then delete the whole lot.

At this point, I see my operating system as a tool. To get things done.

I'm not interested in Linux evangelism. If you want to use it, that's great. I still do and will do.

If not, that's cool. Do what makes you happy.

I'm still a satisfied user of Linux. It's pretty much all I've run on my laptops since maybe 2009, and I messed around a whole lot with it before that, starting in late 2006 if I remember correctly.

There's more to life.

There's my family. I sure as hell want to do better where they're concerned.

Putting together coherent sentences? I'm still very much interested.

I've threatened to write about more than Linux for years. I'd like to write about things that aren't technology. It's been in the sidebar of this particular blog for as long as I've been writing it.

I see the "tech guy" on the morning news, and I wince. Is that me? Other than the fact that I'm very obviously not on TV, I worry that it is.

There's more to life than gadgets and apps.

That being said (there's always a that being said) ...

It sounds like I'm just on the other end of the same pool, but lately programming has dominated what little free time I have. I read a whole lot about it. And occasionally do it. Maybe I'll be able to tip the scales toward more doing in the near future.

I've been playing with Go, Perl, Python and Ruby. I need to focus.

Coding is what interests me at the moment.

What I'm not playing with are Linux distributions. I don't burn ISOs of anything, don't install just to see what something's like.

New releases of obscure distributions, or even not-so-obscure ones? I'm just not into it.

The ins, outs, politics and boiling pots of the Linux world? Not interested.

Give me my working Fedora system (or maybe Debian if the hardware is willing) and let me do my work, write my code, live my life.

If that sounds melodramatic, so be it.

I reserve the right to change my mind. But for now, I'm 50 other things first and a Linux user after that.

Tue, 14 Jul 2015

Filezilla working again in Fedora 22

After many months during which the FileZilla FTP client would eat a ton of CPU and basically stop working in Fedora, whatever was wrong has been fixed, and the program is working once again.

After a FileZilla update caused the problem (and yes, I did contribute to the bug report), I set up gFTP because I need a working FTP client. And gFTP gets the job done. It's super fast. It's also not actively developed.

Maybe I'll go back to FileZilla. Maybe not. But it's nice to have the option.

Fri, 10 Jul 2015

Using dlvr.it to split my regular and 'social' posts out of Ode

I've been playing with the idea of using Ode as both a traditional blogging system as well as a social-media platform generating exactly the kinds of posts that I normally would originate on sites like Twitter.

With the help of dlvr.it, this is entirely possible not just with Ode but pretty much any blogging platform.

The key to this concept is that my social-media updates should originate on my system, where they will continue to live. They are mine. Twitter will have a copy, but I will have the "original."

And now I can tell you how easy it is to do this. And it doesn't just work for Ode but can be done on any blogging platform (including WordPress) that allows you to post to categories (or directories or folders) and tap into RSS for that specific category (or directory or folder).

Read the rest of this post

Sun, 05 Jul 2015

Learning Go: create a web server in five lines

The documentation for Go (aka Golang) is peppered with examples, and one of those examples, for Go's net/http package, shows you how to easily create a file server.

net/http is part of Go's standard library Here is the example code from golang.org/pkg/net/http:

package main

import (
    "log"
    "net/http"
)

func main() {
    // Simple static webserver:
    log.Fatal(http.ListenAndServe(":8080", http.FileServer(http.Dir("/usr/share/doc"))))
}

When you drop this code into a file in a directory (in my case I made the directory web_server and named the file main.go), then either compile it with go build or run it with go run, it creates a web server on port 8080 that serves the contents of your /usr/share/doc directory, which always exists in Linux and Unix (and probably in the Mac OS X version of Unix).

To see the results, open a web browser and go to http://localhost:8080/, and you should see a directory listing. Just like any web page, you can click on the links and see what's in those files.

This example program -- a web server in five lines -- is fun to play around with. You can change the http.Dir and serve "real" web content. You can change the port from :8080 to something else.

Sun, 21 Jun 2015

I wrote my Ode Indexette time-stamp program in golang

Last year I decided to write a short script that outputs the time/date-stamp line required for Ode's Indexette add-in.

Back in 2014, I did it in Perl, Ode's "mother" language. It's really just a two-liner with a whole lot of notes:

(Due to a quirk of Ode formatting and the $ character, I'm rendering this program via a Github Gist)

I've been playing around with lots of other languages since then. I know I should stick with one and really learn it, but for now it is what it is.

I decided to try to get the same output from the Google-created go (aka golang) programming language, and with the help of this web page, I was able to hack it together pretty quickly:

package main

 import (
    "fmt"
    "time"
 )


 func main() {

    // get the current time in UTC

     indexette_time := time.Now().UTC()

    /* print the time to standard output in the format
    required by Ode's Indexette add-in. Note that the 
    .Format parameters use an "old" date just to set 
    the format, the output will be the current time
    due to the use of time.Now() */

     fmt.Println("tag : Indexette : index-date :", indexette_time.Format("2006 01 02 15:04:05"))

}

I'm still calling the script into gedit the same way (through Snippets), and it works just as well as the Perl version.

One thing I just learned about go that's pretty cool is you can run your go program as a script, or compile it as a binary and run that. Advantages of a binary are that it's portable -- anybody with a system for which the binary is built can run it without needing to install go on their own system. And the binary should run faster than the script, though this is admittedly not an issue for three lines of code.

But it's cool anyway.

In the case of this script, I named it ode_time. Through experimentation, I figured out that the go build program that makes the binaries takes their name from the directory containing the file. So since I wanted the go binary to have the same name as the file, I gave the directory the same name, too:

My script file is here (I'm leaving out most of the path, but suffice it to say this is the place where I keep my program files):

/golang_code/ode_time/ode_time.go

I run the uncompiled script this way while in the /ode_time directory:

$ go run ode_time.go

I get this output:

Perfect!

I wanted to make a binary just because.

Here's how I did it. I am working in the /ode_time directory that contains ode_time.go:

$ go build ode_time.go

Now the directory contains two files:

ode_time ode_time.go

The first is the binary (which was automatically made executable by the go build command), and the second is the "raw" go script.

So I can now run the binary from my console like I'd run any binary that isn't in my path:

$ ./ode_time

And I get the same output.

The takeaway: I wanted to write a go program, and with the help of the Internet (and people who actually know how to do these things), I did it. And it was a program that I use on a daily basis -- whenever I write a blog post for my Ode system.

I like the idea of go, which is the language used by the Hugo static blogging system. The documentation seemed OK, but I did have to go "off the reservation" to find an example that I could work off of.

I'll clearly have to seek out tutorials and books if I want to pursue programming with go. Fortunately there are a few go books about to be released, and that might help me figure it out.