IBM Model F AT

IBM Model F AT and Microsoft Optical Trackball

Probably could use a little cleaning but this is the ultimate buckling spring board in my opinion and is finally in my possession. Capacitive PCB for a sensing assembly instead of a membrane like the Model M's buckling spring mechanism. Not that the Model M is bad, this just lot a smoother, more tactile and louder. Only mild irritation is the placement of ESC since I'm a vi user.

My apologies for the condition of the desktop itself. It's a fifteen year old big box store particle board desk and the veneer is really letting go. A future project will likely be building a new top for it or outright building a whole new desk.

Debian Mirror on Libre Computer ROC-RK3328-CC

ROC-RK3328-CC

In the age of 100Mbps+ fiber internet connections it's hard to imagine why you'd need to mirror your OS packages locally. There are a couple of reasons, most of them go to being a good neighbor to the larger package mirrors and in my opinion it never hurts to have a locally acessible backup of the entire package tree in case things get weird and you lose internet connectivity for a while. Mostly I do it because between physical hosts and virtual machines I have quite a few Debian boxes floating around on different releases. Pointing them all at a local machine and just having the mirror grab the files saves the host on the other end a lot of bandwidth.

Small single board computers are great for this in theory. They take up little space and power but until recently that has come at the cost of performance and storage. I've never been terribly impressed with the Raspberry Pi and it's limited connectivity has made it less than ideal for this sort of task. Enter the Libre Computer ROC-RK3328-CC board. It shares the same form factor as the RPi B type boards (so it works with those cases) but has more RAM, a faster CPU, actual gigabit Ethernet, eMMC slot and a USB 3.0 port. It also uses less power than the RPi3B+. I went with the 4GB edition because why not but this could easily be done on the 2GB or 1GB version of the board if you want to save a little money. The killer features for this task is the gigabit and USB 3.0 port, you don't need 4GB of RAM to run a couple of cron scripts and nginx.

First you'll need an OS for you SBC. I'm currently running a self made Armbian but Libre Computer has Debian-based images as well. My Renegade board off a 32GB eMMC but it can be a bit tricky to flash one of those. The MicroSD slot should provide good enough performance to run the OS if you want to go that route for simplicity's sake. For my mirror I'm grabbing Jessie (oldstable), Stretch (stable), Buster (testing) and Sid (unstable) in AMD64 and i386 flavors using debmirror. This takes up around 600GB as of November 2018 so a 1TB hard drive or SSD should do the job. Personally I just went with a dual bay 3.5" USB 3 enclosure and a couple of 2TB drives with BTRFS RAID1.

The Debian distribution that is packaged for the ROC-RK3328-CC board has an empty fstab by default. After plugging in your USB drive, formatting it (if needed) and finding the UUID (ls -lah /dev/disks/by-UUID) add an entry like so:

UUID=your UUID here /mnt/usb   btrfs    nofail  0       2

The nofail option allows the board to continue booting if the drive is not present for some reason. Btrfs is optional, ext4 or xfs will work fine.

Best practices dictate setting up a separate user for the mirror:

groupadd mirror 
useradd -d /var/mirror -g mirror
mkdir /mnt/usb/mirror
chown -R mirror:mirror /mnt/usb/mirror
ln -s /mnt/usb/mirror /var/mirror 

Next add some packages:

apt-get install nginx ed screen xz-utils debmirror debian-keyring

Debmirror needs access to the GPG keys to verify the source of the packages, so you'll need to import them into the mirror account:

su - mirror
gpg --no-default-keyring --keyring trustedkeys.gpg --import /usr/share/keyrings/debian-archive-keyring.gpg

Every once in a while the keys will need updating (particularly when a new version of Debian is released), updating the keys is the same as the initial installation:

gpg --no-default-keyring --keyring trustedkeys.gpg --import /usr/share/keyrings/debian-archive-keyring.gpg 

Next up we need to script out the mirror update process. After some tinkering and searching mine ended up looking like this:

#!/bin/sh
FTP=ftp.us.debian.org
DEST=/mnt/usb/mirror/debian
VERSIONS=jessie,stretch,testing,sid
ARCH=amd64,i386
debmirror ${DEST} --host=${FTP} --root=/debian --dist=${VERSIONS} -section=main,contrib,non-free,main/debian-installer --i18 --arch=${ARCH} --passive --cleanup $VERBOSE

and I saved it to /usr/local/bin/mirror.sh

It's now time to do the initial sync, this can take a while so run it in screen session:

screen su mirror -c "/usr/local/bin/mirror.sh"

After that's finished (probably several hours later), we'll make the mirror accessible via nginx. In my case I had to uncomment the following line in /etc/nginx/nginx.conf:

server_names_hash_bucket_size  64;

as for some reason it was having a cow over the length of my hostname.

I created a vhost file at /etc/nginx/sites-available/000-yourhost.yourdomain.com:

server {
    listen       80;

    server_name wren.buttonhost.net www.wren.buttonhost.net;

    access_log /var/log/nginx/wren.buttonhost.net-access.log;
    error_log /var/log/nginx/wren.buttonhost.net-error.log;

        location / {
                root /var/mirror/;
                autoindex on;
                }
        }

I have the DNS assigned on my DNS server/gateway but you'll need to figure out how to deal with that. Just make sure yourhost.yourdomain.com points at this machine's IP.

Then link this file in the /etc/nginx/sites-enabled directory:

cd /etc/nginx/sites-enabled
ln -s ../sites/available/000-yourhost.yourdomain.com 000-yourhost.yourdomain.com.cfg

My machine is called wren.buttonhost.net, please change the name in the configuration file to your own machine's vhost name!

and restart nginx:

systemctl nginx restart

Afterwards you should be able to navigate to that host in a web browser and see your mirror.

Debian Mirror in Firefox

The last step is to automate the update process via cron, here in /etc/cron.d/debmirror:

# sync Debian mirrors three times a week
30 5 * * 1,3,5 mirror /usr/local/bin/mirror.sh

You now have a Debian mirror that you can fit in your pocket and run off a lithium battery pack if needed. Why would you need that? I don't know, why wouldn't you? Outside of the parts about the fstab, what packages to install and symlinking the /var/mirror directory to the USB drive the rest of this should work on any Debian machine regardless of architecture.

The 2019 Trackball Revival

Trackball and Mouse

In an attempt to head off some elbow tendon pain I started looking into a different mouse for the office. The suspect mouse is the Dell laser model that came with my work machine a few years ago. At home I use a much more ergonomic Logitech G400 that doesn't seem to give me issues. The Dell has very extreme angle on the front so it's a very unnatural fit for my hand. Maybe it works for people with smaller hands? It doesn't help that the DPI settings seem to be messed up and it will only swap between turtle in molasses and rabbit on meth. It's pretty hard to use in either of those modes. While I'm guilty of keyboard snobbery I'm generally OK with whatever mouse I can find that is comfortable. The Microsoft D66 and Logitech MX518/G400 are usually my go to as they fit my hand well, are relatively inexpensive, don't require any third party software and are basically everywhere. I guess it's time that I started getting into other relatively obscure input devices.

I haven't used a trackball since the late 90s. Back then I didn't care for the trackball as scroll wheels were becoming big and more and more pieces of software were utilizing them. At the time there really weren't any trackballs on the market with a scroll wheel. Optical mice were also starting to come on the scene and were popular among gaming enthusiasts. At the time trackballs didn't have scroll wheels which was a real sore point in early FPS games. We had a Logitech Marble back then, which is still available new BTW. It's a fine track ball but lacking the scroll wheel was a let down back then.

Now a days scrolls wheels are available on the few trackballs still on the market in the US (they're apparently still big in Japan and that's not a joke). There aren't many available as they've fallen out of favor with most people. Logitech makes a couple and there are some sellers online that sell Japanese import Elecoms. I went with a Logitech M570 as the MX Ergo was quite expensive. Plus I'm generally not a fan of non-user replaceable batteries and the rubberized coating the MX Ergo had. While I had used a Logitech Marble years ago I'd never used a thumb ball type trackball period so this was a first. So far I can say the M570 is a pleasure to use. It's only been a little over a week but I'm already comfortable with it. As far as gaming goes I've only managed to try a little Team Fortress 2 with it and I can see a trackball being a huge advantage in FPS games once you adjust. To be honest I'm not sure why these things are more popular than they are with gamers. The M570 is a tad small in the width department so my fingers tend to fall off the right hand side of the device but otherwise it fits my had well. I really don't care for the wireless part, especially since it's not Bluetooth and requires a small USB receiver, but it at least runs on a single AA that's user replaceable. Wireless trackballs don't make a lot of sense if you ask me. They don't move and aren't something you're going to use across the room, but it's what the kids like so whatever.

I think the key to preventing RSI is to stop the repetitive part of it so I'm not ditching the mouse completely. Changing position and devices will help in that direction quite a bit. I'm may be on eBay looking at some older models of trackballs too as most have been relegated to the dust bin of history, although some models can be quite pricey as they have a bit of a cult following. Elecom gets high marks on the new market but they can be pricey as they have to be imported. Really, if you want to one out I'd say give the M570 or a Trackman Marble a shake. You won't be out but for about $20-25 or so and if you like it there are other higher-end options out there. As an added bonus ne'er-do-wells won't really be able to mess you machine and I've already baffled a few people when I had to work in an open office setting this week ...

Unexpected Snow Day

Today was one of those days where a dusting to 1" turned into a bit more snow for Boone. All of these photos were taken through out the day with the Fuji x100s.

View from Summit

Theater Construction

East Hall from Sanford

Dog on a Walk

Ran into some folks out and about doing or wearing interesting things. This dog was pretty excited to get a move on.

Hat

Winter clothing can sometimes be interesting.

Snow Stack

As far as I could tell this is like that thing where people stack stuff on their cat but with a person.

2018 Holiday Random Print Mail Bombardment

Like getting random stuff in the mail? This year I'm going to mail out some prints to people who want them. They'll be either 4" x 6" or 5" x 7" depending on the paper I have laying around at the time. The image will be mostly random, could be pertinent to how we know each other or just whatever the heck I feel like printing. All of them will be photos I have taken.

If you want to participate please send the address of your mail hole or receptacle to leander@one-button.org.

In person delivery is an option if you are with in my laziness radius.

Images

Japanese Input on Fedora KDE

I've been taking a Japanese class over the last semester so I've had a need for Japanese input on laptops. I've been running Fedora KDE on my portable machines lately and I had no trouble finding documentation on changing up input methods on Fedora GNOME but there was little out there on the KDE spin. Some of the Kubuntu documentation got me in the right direction though.

The method I found for kata and kanji input uses fcitx, which have packages in the Fedora repos:

sudo dnf install fcitx-kkc kcm-fcitx

After those have installed add the Fcitx utility to the Autostart items in Plasma 5. Also, add the fcitx input modifiers in /etc/profile.d/fcitx.sh:

export XMODIFIERS="@im-fcitx"
export QT_IM_MODULE=fcitx
export GTK_IM_MODULE=fcitx

Restart the machine and open up the Fcitx Input Method configuration, you'll want to add the Japanese Kana Kanji as a secondary input method. If you don't see it come up in a search uncheck the "Only Show Current Language" option.

Input Method Selection

Now you should be able to hit Crtl+Space in any text input field and replace Romanji with Kana or Kanji characters. Additional presses of the space bar will cylce through different characters for the same sound. So you can have にほんご or 日本語 for example. Pressing Crtl + Space exists the Kana Kanji input mode. Pressing return after a typing a word in kana or kanji finishes the slection and allows you to move on to the next word. Very useful and no swapping keyboard layouts!

Input Method Selection

Autumn 2018

Just a few photos from the last couple of month around Boone, NC. All taken with either the x100s or X-T2.

Road Cones

Doggo in Coat

Blue Sky

Autumn Gradient

Stairs

Go Vote

Leaves on Ground

Early Snow

IBM Model M 1393464 Restore

This was originally posted some time ago on Deskthority. Hosting it here for posterity's sake.

Recently I stumbled on a 1393464 Model M off eBay for a decent price. This was a model with custom keycaps made for the American Airlines reservation system. Otherwise it's a normal 2nd generation Model M from 1990. I just think the differently printed keycaps look neat.

It arrived and I found that some of the keys were non-functional and I tracked it back to a dead line in the membrane. Since I'd never fully deconstructed a Model M before I decided to give it a go. Usually I just do the screw mod when the rivets break. Ordered the $10 membrane from Unicomp and it arrived Saturday. Just tonight I go the board all the way back together and it works! Typing this post on it right now. Below are some photos are comments on the process. It was more challenging than I thought it would be, getting the springs and flappers to stay in place while you re-attach the membrane and back plate is kind of tricky ...

1393464 Pre-disassembly

1393464 Pre-disassembly

Model information, this particular unit was built on Feb 06 1990

1393464 Pre-disassembly

Beige/cream barrel plate, this is a new one to me. I've only ever seen black ones ...

1393464 Pre-disassembly

Just a quick note on the new membranes from Unicomp: if you have an older M you're resotoring you'll need to trim off the rightmost four lines from the smaller ribbon cable. These membranes work with the older Ms but have the built-in lines for the LEDs on the new models. I just used a razor blade and some patience.

1393464 Pre-disassembly

New membrane pre-install...

1393464 Pre-disassembly

Keycaps back in and ready to be tested!

1393464 Pre-disassembly

All back together and ready to go. All in all not too bad of an experience and I found some threads on here helpful. Just thought I'd share the journey. Not sure how rare or special this particular Model M as it just showed up in my running eBay search. Found some info on the Clicky Keyboards site but that's about it. I think the membrane went bad due to some liquid exposure as it looks like there was some dried liquid in between the sheets. Anyway, should be good for another 28 years now I reckon.

Winter

Just a couple of shots from last week's snow storm.

Fujifilm X100s processed in Darktable. First real snow of the 2017-2018 winter at a few inches here in downtown Boone, NC.

Winter 2018 1

Winter 2018 2

RTL-SDR NOAA Weather Radio Streamer in Linux

If you’re into amateur radio you’ve probably heard of these cheap DVB-T tuner dongles re-purposed as software defined radios. They’re very popular for building scanners and streaming setups. I’ve got a couple of models that I use with Gqrx for listening to traffic on the local repeaters, weather radio and a few other things.

This weekend I finally had enough time to sit down and setup rtl_fm and try out a streaming solution for listening to NOAA weather broadcasts. I’ve streamed scanner and weather radio traffic using Icecast before but that was with a external radios and a mic input. This time I wanted to use a machine with no sound card (my home server machine). All of this was done on Debian Linux 8, to get started we need three pieces of software:

rtl-sdr ezstream icecast2

All are available in the default repositories so just install them with apt.

Next I had to configure icecast2, the most basic configuration should work but at least change your admin and source password in the authentication block:

 <authentication>
        <!-- Sources log in with username 'source' -->
        <source-password>password123</source-password>
        <!-- Relays log in username 'relay' -->
        <relay-password>password123</relay-password>

        <!-- Admin logs in with the username given below -->
        <admin-user>admin</admin-user>
        <admin-password>password123</admin-password>
   </authentication>

That should at least allow you to connect and get up and going. There are other options to secure and/or tweak but I’m not going to cover those here.

I used my NooElec Nano SDR as a test source. The rtl-sdr package comes with a program to handle FM tuning called rtl_fm. There are a few options to tinker with here but only too options are critical for operation here:

rtl_fm -f 162.500m -M fm -
-f 162.500m: sets the tuner frequency to 162.500Mhz 
-M fm: tells the tuner to use standard narrow FM tuning, if you want to listen to commercial radio you’d use wbfm or wideband FM. 
-: directs output to stdin

Send that output to lame to encoding:

lame -r -s 24 -m m -b 64 --cbr - - 
-r: assume raw pcm input 
-s 24: set the sample rate to 24K 
-m m: mono mode, NOAA doesn’t broadcast in stereo 
-b 64: set bitrate to 64kbps, it’s more than enough for this 
--cbr: constant bitrate 
- -: stdin/stdout

A quick note here, you’re going to have to mess with the sample rate in LAME to get things sounding right most likely. I arrived at 24K, much higher or lower and the pitch is off. It may not work with your model SDR, etc.

Lastly ezstream needs configuring. It took a while to get a working MP3 configuration sorted out but I eventually arrived here:

<ezstream>
    <url>http://localhost:8000/WNG588</url>
    <sourcepassword>password123</sourcepassword>
    <format>MP3</format>
    <filename>stdin</filename>
    <!--
      Important:
      For streaming from standard input, the default for continuous streaming
      is bad. Set <stream_once /> to 1 here to prevent ezstream from spinning
      endlessly when the input stream stops:
     -->
    <stream_once>1</stream_once>
    <!--
      The following settings are used to describe your stream to the server.
      It's up to you to make sure that the bitrate/quality/samplerate/channels
      information matches up with your input stream files.
     -->
    <svrinfoname>WNG from Mt Jefferson, NC</svrinfoname>
    <svrinfourl>https://hubble.buttonhost.net</svrinfourl>
    <svrinfogenre>Public Information</svrinfogenre>
    <svrinfodescription>NOAA Weather Radio from Mt Jefferson NC</svrinfodescription>
    <svrinfobitrate>64</svrinfobitrate>
    <svrinfochannels>1</svrinfochannels>
    <svrinfosamplerate>44100</svrinfosamplerate>
    <!-- Allow the server to advertise the stream on a public YP directory: -->
    <svrinfopublic>0</svrinfopublic>
</ezstream>

Save this to /etc/ezstream using your favorite text editor and pass it to eztream thusly:

ezstream -c /etc/ezstream.xml

The whole thing piped together looks like this:

rtl_fm -f 162.500m -M fm - | lame -r -s 24 -m m -b 64 --cbr - - | ezstream -c /etc/ezstream.xml

I just stuck that whole string into a shell script. If you want it to start at boot time you can shove it into /etc/rc.local for a quick and dirty solution.

Once all that is done it’s a simple matter of navigating to your Icecast server at http://whatever_url_u_have.com:8000 and clicking the m3u icon by the stream listed there. Open that file in whatever music player you want and enjoy. I use VLC, Rhythmbox or iTunes (when I find myself on a Mac) myself. Otherwise you can just check the weather app on your phone like a normal person. Next up I want to work on getting frequency scanning working so I can get the scanner back online.

Oh and you can check out the fruits of my work here: http://hubble.buttonhost.net:8000/WNG588.m3u

VLC WX

Page 1 / 5 >>>