Category Archives: docs

In which it takes over two hours to play an MP3 file on Linux in 2016

Let me preface by saying that it’s 2016. Right? Am I right? It’s 2016, I think.


Having problems in Banshee, Totem, Rhythmbox (GStreamer apps) on Lubuntu? Can’t play MP3? Can’t get any audio output at all? Try the following command:

sudo apt install gstreamer1.0-plugins-ugly gstreamer1.0-alsa

If you give a crap, it’s a combo of no MP3 decoder being installed by default for GStreamer (despite the existence of an MIT-licensed one), and dependency fail in Lubuntu (which uses ALSA, but inherits defaults from Ubuntu which uses pulseaudio).

I encountered this bug in Lubuntu 16.04, but a related report dates back as far as Lubuntu 13.04 – at least three years.

You’re welcome. :|

Complete accounting of sadfeels

A little background: I’ve fallen on hard times. My music library has been offline for years, at least 2 years if not more. I’m trying to restore it for the sake of my sanity, and all I have to work with is a 2008 Macbook running Lubuntu 16.04 – a choice of operating system not taken for the sake of my sanity, as you will soon see. I’m using Lubuntu due to economics.

Here’s what I’ve had to do in order to import my old library and get playback of MP3 music file working. MP3 is a codec which I first used in 1998. Importing and playing music should be dead simple in Banshee 2.6.2. It’s anything but. Unfortunately, I’m stuck with Banshee on Linux just like I was stuck with iTunes on OS X, because I’m a heavy user of smart playlists – when the apps manage to function at all, anyway.

It’s worth noting that Audacious, the lightweight music player installed by default in Lubuntu, was able to play MP3 out of the box as YHVH intended because it is fucking 2016 why is this a problem.

  1. Import my old iTunes media library into Banshee. Wait, no, that causes Banshee to freeze.
  2. Disable some plugins, then import! Wait, no, that causes Banshee to crash.
  3. Disable ALL the plugins except the import plugin, then import! It mostly works – a truly earth-shattering accomplishment for a program under development since 2005 and billed as version 2.6.2 (except in the Ubuntu package, which is billed as “2.9.0+really2.6.2-7ubuntu2,” I shit you not).
  4. Double-click the file and play! Wait, no, that pops up a red X icon for the given song and the next 4 songs, with no other feedback at all. Cute.
  5. First examine ~/.config/banshee-1/log and then run ‘tail -f’ on it while trying to play the MP3, in an attempt to figure out what the fuck is going on. (Why do I need to know about the existence of a log file for a fucking media player? Because I am in purgatory, that’s why, and nothing is ever simple.)
  6. Of course, there is absolutely no related human-readable output for an obvious playback error in the FUCKING LOG FILE.
  7. Do the next least-worst thing and search a vaguely-unique-sounding term in the log file which may or may not be related. BTW, 99% of users would have given up at step 1 and be left, if they had my library, trying to choose from within 89GB worth of music with the file manager.
  8. Receive vague hints from Internet that GStreamer (why do I need to know this exists?) may be “broken.” At this point, I begin to suspect licensing fail resulting in no MP3 decoder installed by default. At the moment, I don’t remember if Lubuntu 16.04 asked me about installing non-libre plugins, but if it did, this would be a GREAT candidate. :|
  9. ‘sudo apt install gstreamer1.0-plugins-ugly’ (since if there’s a plugin which handles MP3, Fluendo or otherwise, it’s likely to be “ugly,” because nerds).
  10. Double-click the file and play! NO FUCKING AUDIO OUTPUT. Begin writing this post because I need to vent and because I suspect documenting my tribulation will help at least 3d6 benighted searchers to play a FUCKING MP3 FILE on their FUCKING COMPUTER.
  11. Take a break to update a bug report on banshee, file a different bug report on banshee, and file a bug report on lxpanel for shits and giggles (volume control UX needs work). Plan an additional bug report on gstreamer for its utter lack of useful error messaging.
  12. Determine that additional gstreamer apps are also pretending to play back a file but producing no output. I’d installed totem in step 7 in order to confirm that the original playback fail was gstreamer-related. Indeed, totem is also exhibiting the new playback fail.
  13. Search ‘gstreamer “lubuntu” audio’ and find a bug from 2013 that is related.
  14. ‘sudo apt install gstreamer1.0-alsa’
  15. Double-click the file and play! Finally, it fucking works. Well, not for M4A files, but that’s another rant.

So by my count, I need to file the following bugs:

  • gstreamer error output is useless in the context of a missing MP3 decoder
  • Lubuntu has a dependency problem; gstreamer 1.0 installs a pulseaudio “sink” by default, but Lubuntu uses ALSA, not pulseaudio.

I’m tired, and I don’t get paid for this. But hey, now I can listen to the 70% of my library that’s not encoded in AAC.

Edit: If you want to play AAC (M4A) files, ‘sudo apt install gstreamer1.0-plugins-bad-faad’

How to hide Tumblr likes from certain users with AdBlock

You know the ones – those Tumblr users who just can’t get enough of your style or “aesthetic.” (What would you call them? “Tumblr groupies?” Maybe. “Tumblr crushes” implies mutual lurve of curated content, not one-sided pining.)

They “like” every post you make and reblog a lot. But the liking. The compulsive heart-clicking. You weary of it.

Anyway, say you actually do like the user, but you just want to hide their 20 million clicks of the “heart” button from clogging up your activity page AND your activity quickbox from the Tumblr dash. Well, now if you’re an AdBlock user, I have some rules for you that work as of October 2015!

This solution is great because you’ll still see the user’s posts, asks, reblogs, and all that. Only the likes will be blocked with AdBlock. This should work on AdBlock Plus and AdBlock Pro without any or much modification, but I haven’t tried it on those.

Let’s pretend we’re going to block a user named noisyuser. Without further ado, here are the rules and instructions on how to paste them into AdBlock!

Copy these rules into your clipboard:[data-tumblelog-name="noisyuser"][data-tumblelog-name="noisyuser"]

And, if you’re particularly annoyed, you can hide their avatar from your “top 4” bar on the activity page with this rule:[title="noisyuser"]

Now, click the AdBlock icon in your browser menu bar. Click Options, click Customize at the top (this may differ in other flavors of AdBlock), and then click Manually Edit Your Filters. Click Edit on the bigger list – make sure you don’t click edit on the Disabled Filters list.

Now, paste the above rules at the bottom of the Filters list.

IMPORTANT: CHANGE THE USERNAME noisyuser to the tumblr username of the person whose likes you want to hide, THEN click save.

Presto – a single refresh of your Activity page or Dash should hide all the likes you don’t want to see, while allowing reblogs and other notifications through.

Missing man pages on CentOS, or reason № INT_OVERFLOW why I hate CentOS/RHEL sofa king much.

I can’t remember all of find’s arcane incantations. Nobody can.

$ man find
No manual entry for find

wat. find is clearly installed, of course. man pages? nope.

Search search search. Searchity search. Horrible relevancy because what are you gonna get when you think you’re smart, do rpm -ql findutils and note that /usr/share/man/man1/find.1.gz doesn’t exist, and then start searching for how to find packages with missing files using Red Hat’s primitive yum and rpm commands.

It was only when I gave up and searched on “centos missing man pages” that I found the answer.

# yum install man-pages

Yes, seriously.

$ cat /etc/redhat-release
CentOS release 6.5 (Final)

Released 1 December 2013. So I guess I can’t ask what fucking year it is.

Linux users on Apple machines: how to find the system product name of your Mac

Here’s another nugget I’m dropping in the hopes it’ll get indexed, because I have a hell of a time remembering how to find my Apple Mac type in Linux (where by type I mean things like “Macbook4,1” or “iMac6,1” and the like). Finding the exact model of Mac you’re running is often useful when debugging the all-too-frequent rough edges of Linux running on a Mac.

Be advised, I’ve only tested this in Linux Mint. I expect it will probably work fine in Ubuntu and likely Debian.

In Terminal or on the command line, to find what model Mac you’re running Linux on, simply run

sudo dmidecode -s "system-product-name"

Organizing institutional knowledge is high-value work. Neglect it at your peril.

I’m quite the wiki enthusiast.  I was an early editor on Wikipedia; I created several articles on really common topics, I got Featured Picture on a few photos I plucked from free sources, and so forth.  I’ve run my own wikis since 2005.  The biggest, at its prime, got a couple hundred thousand hits a month and had periods with 25-30 concurrent users; it was used by students in a classroom environment.

So, at my software development jobs, tending the wiki – or creating it, if it doesn’t yet exist – is a natural fit for me.

And at each job, I’ve heard comments which suggest that maintaining the wiki is low-value work, akin to picking vegetables or something.  Allow me to exercise that analogy a bit: people who pick vegetables feed all of us, and there are racist undertones to presuming that picking vegetables is low value work.

Here are a few paraphrased comments: Continue reading

Technics SA-290: common problems

I’m just leaving this post here as search engine bait for people in the same boat as I was a few weeks ago, namely having purchased a partially-working Technics SA-290 stereo receiver / amplifier from Goodwill.

After a lot of digging around online, I found that there are a couple common problems with units that are being sold as junk or are kinda messed up.  In most cases, these systems age well and will stay in good condition except for a couple common issues.  A good, honest stereo repair shop (or geek) should be able to diagnose and fix these easily.

Problem: AM/FM LCD status display is wonky, partially working, dark, or unstable (works, doesn’t work, responds oddly to jiggling, etc)

Cause and solution: Cracked solder joints to LCD module, and/or burned-out lamps behind it – it’s a very primitive LCD display which relies on an incandescent lamp for backlighting.  Easy to fix.

Problem: The receiver will only output audio for a short time, or until it gets hot, or may stop giving a signal if touched by hands or unshielded cables, etc.  The shutoff of audio is accompanied by one or more clicks.  The unit may not resume working for a couple minutes after being turned off, or may resume right away when power cycled.

Cause and solution: Cracked or bad solder joints on the relay protection circuit.  This appears to be a very common issue with these Technics receivers as they age, and is easily fixable.

As of May 2013, Technics SA-290 units in good working order were going for $80-90, as best I could tell.  I got mine for $20 at Goodwill and spent $70 having it repaired at Audio Specialties Ltd in Portland, plus buying an FM antenna – I listen to KZME (shout outs, woo!), and I need an antenna in my Portland neighborhood to pick up their signal.  So I got a fair deal in the end.  My SA-290 had both problems – cracked relay solder joints, and a wonky LCD due to cracked solder joints.  The nice dude at Audio Specialties replaced the lamp while he was in there – it’s an incandescent, why take chances when it’s already 25 years old?

As for the quality of the Technics SA-290: it’s a really nice little receiver/amplifier!  If you can deal with 80s-style Back To The Future blinkenlighten, you’ll be happy with it.  I recommend picking up an equalizer, though, even an inexpensive (but half decent) one.  This is true in most cases, but a half-decent EQ can turn a good-sounding receiver into a great-sounding one, and enable you to fine tune the sound when you do something like move your couch and suddenly your stereo sounds weird.

I came across an EQ at a thrift store by dumb luck the day after repairs on my Technics SA-290 were done, did a quick search, and found that the EQ was worth just about the $20 they were asking for it, crazy 80s spectrum LED light show and all (it was a stylistic match, haha).  Totally worth the $20.  Just be aware that with the SA-290, an EQ will work only on external signals, not the radio – so you might want to leave the bass and treble controls flat on the Technics, and just push the loudness button when the radio’s on if you like that boomy DJ voice when you’re listening to AM/FM radio.

I’m very happy with the sound quality, even with cheap EQ.  As for loudness, at the rated 50 watts – well, this is a bedroom system, and the power output blinkenlighten are actually scaled as “watts into 8Ω,” and I can crank the harder music I listen to and you’ll barely ever see it flicker past 5 watts, even though the bass sounds “authoritative,” in my words.  The Technics with some good speakers will speak the bass, nice and simple, not boom it or muddy it up.  It’s a good amp.  Don’t be deceived by the wattage wars – as a coworker told me, an older (1980s and earlier) amplifier, made before marketers got their paws on the wattage definition, will lift the friggin’ roof off your bedroom if it’s rated at 50 watts and it’s any good.  I have not turned the volume on the Technics past about 3 of 10 yet.  30-35 watts would actually be more than sufficient for a large bedroom with good speakers, but, this is what was $20 at Goodwill (poppin’ tags!) and I’m happy with it.  :)

The free wifi at my business works for some customers and not others. Help!

I’m writing up a fix to a common tech problem I see at coffee shops, cafes, restaurants, bars and other places that offer free wifi.  Hopefully a few business owners might find this by searching and be able to fix their problems with patrons being unable to connect to their wifi.

A typical consumer wifi router

Many wireless routers look something like this. Some have antennas hidden inside. They either plug into your Internet box (cable modem or DSL modem) or straight into your cable or DSL.

Most businesses offering free wireless internet to customers – small businesses, at least, like a corner bistro, a coffeehouse, or a bookstore – often do so with a consumer router. In other words, the exact same type of device that you might plug into “the internet” (cable modem, DSL, usually) in your home in order to get wireless internet.

Cheap broadband routers are a great thing, but they’re designed for homes and small offices – in other words, places where people don’t come and go very much.  In your home, the same laptops, smartphones, and tablets tend to hang around for hours if not all the time.  Routers are often sold with a pre-made setup for this environment, and some of the settings don’t work well for places where people with many devices come and go a lot, such as a coffee shop or restaurant.

The problem

One of the biggest problems I’ve seen time and again with the free wifi offered by small businesses in my neighborhood is when the router runs out of “DHCP leases.” You can think of a DHCP lease as a ticket that the router hands to any computer, tablet, or smartphone that connects to it. The router says “Here’s this ticket; when you need to talk to a web site, show it to me – oh, and it’s only good for 24 hours. Then you need another ticket.”

The problem is that most consumer routers only have about 100 “tickets” to give out. If the tickets are good for 24 hours, some of the routers won’t hand out any new ones until the oldest ticket expires, meaning some customers can connect until the router runs out of “tickets” (DHCP leases) and then other customers can’t connect. It can be even harder to diagnose because regulars who come in every day will almost always be able to connect with the same device, since they’re still holding a ticket from the previous day!


If this is your problem, you’ll most often see that some customers can use the internet fine, and others can’t use it at all.  Many times customers having problems will be able to connect to your wireless, but then the connection will hang, or keep retrying, or give an error message, and they won’t be able to get onto the internet.  If many customers can get to the internet but it’s acting weird, that can be a couple of different problems that are common with consumer routers, and I’ll write about those in a later post.


The solution to many wifi connection problems in small businesses is to reduce the length of time the “ticket” lasts. Instead of 24 hours, try 10 minutes. This can cause a few problems of its own, but generally they’ll be much less noticeable than problems caused by long DHCP leases.

I can’t give instructions for every router on the market, but if you go into your router’s settings and find DHCP settings, you’ll see something like “DHCP lease timeout,” “DHCP lease length” etc. This may be measured in seconds or minutes, so here’s a handy-dandy translation table:

  • 1 day = 24 hours = 1440 minutes = 86400 seconds. This is too long a DHCP lease expiration for most neighborhood businesses offering free wifi.
  • 10 minutes = 600 seconds. This often works pretty well, especially where customers don’t stay long and the shop is busy.
  • 30 minutes = 1800 seconds. If customers stay longer, or the store, bar, bakery etc isn’t too large or busy, this will also work okay.

Questions and tips are welcome in the comments!

Raspbian Server Edition 2.3 torrent (1GB version)

A nice fellow named SirLagz has made “Raspbian Server Edition,” which is Raspbian for your Raspberry Pi, but with GUI and sound packages removed, and imaged to fit on an SD card as small as 1GB.

If you plan to use your Raspberry Pi as a network server and don’t need sound or a windowing system, Raspbian Server Edition is a great place to start.  The only difference from Raspbian is that some preloaded packages have been removed.  They are easy to reinstall if you need them.

It took me quite a while to download the images from SirLagz’s site, so I made a torrent of his latest version of Raspbian Server Edition. There should be enough seeds now that you’ll get a nice fast download over bittorrent if you want to use this distro on your Pi.

Here are some links to the torrent.  You can use the magnet link if the first two don’t work but it may take a while for your torrent client to “find” the torrent before it starts downloading.