How to prevent Linux from waking up due to USB devices

I’ll start this one off with a funny story. Whenever I spark something in the room (like, my hand on a doorknob), my linux box wakes up from sleep. I tracked the problem down to the wireless receiver for the Logitech M570 wireless mouse on my desk – the electrostatic discharge from the spark causes the USB receiver to send some signal to the computer.

The problem is, that every time this happens (4+ times per day), it wakes up my machine. I then have to wait for everything to wake up, enter my password to unlock it, then put it back to sleep. Not fun. So I determined what I needed to do was prevent the USB ports from waking up the machine (or replace my beloved mouse). I chose the former, but for the longest time, could not figure out how the hell to do it. I finally figured it out, and to save anyone else from my misery, here’s the short version.
Continue reading “How to prevent Linux from waking up due to USB devices”

Mute KDE from the Terminal

I’ll preface this by saying I like to listen to classical music. The problem is, that a certain streaming music service plays its classical music quietly, and it’s advertisements insanely loud. As a result, my comfortable classical music turns into this obnoxious loud cacophony of crap every time an ad comes on. Usually one of those you-appear-to-like-classical-why-not-listen-to-this-idiotic-rap-song adverts that make you listen to the first 15 seconds of some sheer garbage song.

I solved the problem by writing a shell script to just mute KDE, wait 30 seconds, then restore the volume. This gets triggered from a keyboard action.
Continue reading “Mute KDE from the Terminal”

How to paste your password into the sign-in form on Guru.com

Guru.com does something terribly vexing – it disables (purposely) the ability to paste, copy, drag, and drop into the password box on their login form.  They claim it’s a security measure, but it impedes my ability to use KeePass to manage my passwords.  I got fed up with this, and decided to write a user script (Greasemonkey/Tampermonkey) to correct this idiotic behavior.

Continue reading “How to paste your password into the sign-in form on Guru.com”

Decimal Hour Display in Task Coach

As a freelancer, it’s imperative that I keep track of my time spent per client. The problem, is that while Task Coach uses hour:minute:second to format effort totals, my invoicing/finance software, GnuCash, uses decimal hours. This makes transferring times from my Task Coach to my invoices a bit onerous.

I’ve looked around, and couldn’t find anything on how to make Task Coach use decimal hours, so I dug around in the source code and implemented it myself.  The patch is below.  This is a simple fix – there’s no settings for it, it simply switches the display of efforts to decimal hours.

Continue reading “Decimal Hour Display in Task Coach”

Saitek Eclipse II Left Control Key Anomaly

left control key

I’ve noticed another issue with the Eclipse II – the left control key takes harder pressing to activate.  I surmise this is deliberate – most FPS games require hammering and/or mashing the left control key to fire the primary weapon.  On Linux, where many of my terminal operations and application shortcuts make heavy use of the left control key (think emacs, or simply sending a process a SIGINT) it can be quite annoying.  While there’s no fix, as usual, I’ve got a handy workaround (for KDE users).

Continue reading “Saitek Eclipse II Left Control Key Anomaly”

Saitek Eclipse II Backlight Color Change Button on Linux

The Saitek Eclipse II has an annoying issue under linux: pressing the button to change the keyboard backlight color causes the mouse to act up until the keyboard is unplugged/replugged, resetting the color back to blue. It does this by simulating a key being held down, but not released. I’ve not found a solution to this, per se – but I have found a simple workaround.

To prevent the keyboard from screwing up the X11 session, just switch to a console first. Pretty easy. Let’s review.

  1. Press CTRL-ALT-F1 to switch to a text console.
  2. Press the color change button all you want.
  3. Press CTRL-ALT-F7 to go back to X11.

Logitech Solar App on Mountain Lion

If you use any of the Logitech solar keyboards on the Mac, you’ll sooner or later find out that Logitech provides this really cool application that lets you see how charged your keyboard is, but additionally, the amount of light (in lux, approximately of course) that the solar cells are getting. While the application is awesome, it does have a minor issue: it runs a service which does not terminate with the application, and writes several lines to your log every second until the keyboard hits a timeout. Not only is this wasteful of system resources, it also will fill up your disk with meaningless log entries. Fortunately, the fix is easy since your Mac provides all the tools you need:

Continue reading “Logitech Solar App on Mountain Lion”

Brother HL-2230 via LPR/LPD

I have a Brother HL-2230 that’s shared via LPR on my router. Up until today, it’s had this issue with printing multiple copies, or anything involving printing more than 1 physical page. It worked fine if plugged into a computer (my Linux machine, or my Mac) via USB, but something about sharing it via the network has always had this issue. I’d blamed it on the printer, blamed it on CUPS, blamed it on the individual application.

I’m posting this not to complain, but because I searched everywhere online for a solution and came up empty-handed. This is actually a very good printer, considering it only cost me about $60 online.

Turns out it was a pretty simple fix…
Continue reading “Brother HL-2230 via LPR/LPD”