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.

Mon, 28 Sep 2015

Working on my networking issue after suspend/resume in Fedora 22

Briefly, for no good reason, my networking on the HP Pavilion g6 2210-us is broken after suspend/resume in Fedora 22.

It's not broken on live Fedora 22 and Xubuntu 15.04 images. It wasn't broken a week ago in the Fedora 22 system I've been upgrading since I started it with F18 in 2012.

I should probably just reinstall. And I probably will. Xubuntu on a new drive. Soon.

But until then, I need networking to return after a suspend/resume.

I've tried lots of things. Nothing has really worked. Closest is Wake-On-Lan issue with Realtek r8169: immediate resume after suspend from the Ubuntu Forums.

That script doesn't work.

But it did give me the idea to just run the modprobe lines:

$ sudo modprobe -r r8169
$ sudo modprobe r8169

That works. The network comes back (both wired and wireless, even though this only addresses the wired Ethernet network).

The script in /etc/pm/sleep.d seems to do nothing.

But running this script, which I titled jump_start, does work:

#! /bin/bash

modprobe -r r8169
modprobe r8169

exit 0

As a workaround, I created a launcher in Xfce, hooked it up to this two-line Bash script, and made an exception for it with visudo so I could run it from the launcher.

Now I resume the laptop, click my "jumpstart the network" icon in the panel, and I'm ready to go.

It's less than automatic, but for now it works.

I have no idea why this happened, but since every new live system I try suspends and resumes with no problems at all, this hack will keep me going until I build my new Linux system on a new hard drive. (This is a "production" laptop, and I want to avoid the anxiety of having to rebuild and configure it under pressure, so I'm opting for a new hard drive that will be a single-boot Linux system.)

Update: I may be putting my scripts in the wrong place for automatic execution in a Systemd environment. Fedora users suggest /usr/lib/systemd/system-sleep/

This is the script I put in /usr/lib/systemd/system-sleep/:

#!/bin/sh

case "$1" in
    hibernate|suspend)
   systemctl stop NetworkManager.service
        modprobe -r r8169
        ;;
    thaw|resume) 
        modprobe r8169
  systemctl start NetworkManager.service

        ;;
esac

I'm not convinced that any of this (other than running my jump_start script with the two modprobe lines) is working.

Further update: A day later, I've been using WiFi only, and the network has been available after suspend/resume with no trouble. Not sure why.

Further further update: It's spotty. I'm taking the script out of /usr/lib/systemd/system-sleep/ -- I don't think it's doing a damn thing. I still need my local script sometimes to jump-start the network.

Oct. 10 update: Things seem a lot better. I'm not 100 percent sure the problem has been solved. Maybe 80 percent.

Sat, 26 Sep 2015

Rebuilding GRUB 2 entries in Fedora 22 for UEFI systems after modifying /etc/default/grub

I'm surprised that the Fedora documentation for working with GRUB 2 doesn't address rebuilding GRUB 2 entries for EFI booting.

They do address it, but they get it wrong.

The grub2-mkconfig instructions for both BIOS and UEFI systems are the same. The problem is that this instruction will only build the BIOS entries. The UEFI entries won't be rebuilt.

Once you have your changes set in /etc/default/grub, here is how to rebuild the GRUB 2 entries for BIOS and UEFI systems?

BIOS systems

# grub2-mkconfig -o /boot/grub2/grub.cfg

UEFI systems

# grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

It is perfectly OK to do both of these commands (using root, hence the # prompt, or with sudo), but you do need the one that matches your booting method (BIOS for older systems, optionally UEFI for newer systems).

The only reason I figured this out is because I poked around quite a bit when having dual-booting issues. Someone should fix the Fedora GRUB page. I'm a Fedora member and could probably make the fix myself, but I'm not 100 percent sure what I'm doing here is the absolute best method because my GRUB bootlines after doing this look different then they do when the system (either yum or dnf) does a kernel update.

Mon, 21 Sep 2015

How to fix LibreOffice spell check in Fedora 22

I needed to use LibreOffice today. It's not something that happens very often. I almost always write or edit in a text editor, web form or Google Docs. But today I opened up LibreOffice.

I wanted to use "automatic" spell-checking in LibreOffice, which you invoke with shift-F7. But it didn't work.

I looked at my default "language," which was U.S. English. There was no little blue check next to it that indicated it had a dictionary. I checked my packages. I wasn't missing English.

It turns out there's a hack that gets spell-checking working and gives me the red squiggly lines under my misspelled words (that's the way I like to do it.

I found the answer in LibreOffice's "Ask LibreOffice" forum (which uses the same software as Ask Fedora).

Here is the fix from that helpful post:

Under Tools -> Options -> Language Settings: Writing Aids, the list of available language modules showed almost everything set. I unchecked and then re-checked "Hunspell SpellChecker" and "Libhyphen Hyphenator" and hit OK. (I strongly suspect that the hunspell was the significant checkbox). Then, when I go back to Language and look at the default language settings, the "English (USA)" entry has the ABC✔ by it, and now spell checking is working.

Best guess is that some results of invoking something from hunspell is saved by libreoffice and that with updating versions, the cached output is no longer valid. Re-invoking (when re-checking the checkbox) refreshes the cached data and now everything is all better.

It sure worked for me.

Sun, 13 Sep 2015

I build an app, Part 1: Hashes (aka key-value pairs) are easy in JavaScript (and even in Java) ... plus my coding bio

I like to learn by doing. I'm reading and typing in code and futzing around with it. But I had an idea, and I'm betting I can learn what I need to make it happen.

The idea is a "What is this acronym?" app, where there's a web page, the user types in an acronym (or partial acronym) and gets in return a list of possible full names for that acronym.

Nothing too crazy, and I'm going to keep it as simple as I can.

I want to do it as a single-page JavaScript app. Call it "just a web page with some interactive JavaScripty elements." Is that an "app"? (Don't know, don't care).

I'm choosing JavaScript for this project because I want to keep it simple. And I want to learn JavaScript.

Read the rest of this post

Tue, 08 Sep 2015

Playing with Java arrays and JavaScript objects

Today I started playing with Java arrays.

I'm also trying to figure out JavaScript objects at the same time.

(The Javascript is for a project I'm cooking up. I'll focus when I'm ready to focus.)