A Mind Lost

Anything and everything.

Category Archives: Software

Adblock Plus & Element Hiding Helper

There’s a lot of neat content on Tumblr, but sometimes an individual’s choice of theme leaves much to be desired.  In such cases, I switch to archive view, e.g. by going to blogname.tumblr.com/archive/.  From there one can view all the posts made to a tumblr by year and month.

I came across one blog that has an annoying hover element on it’s /post/ pages that makes it difficult to get to the content itself.  Viewing the source and opening the URL, or viewing the page info and saving from there didn’t take too long to become tedious, so I did a quick Google for a solution.

Enter Element Hiding Helper for Adblock Plus.  This extension presents a handy popup that allows one to select an element, refine it, then add it to Adblock Plus‘ filters.  Unfortunately, this had the effect of rendering the archive view unusable as the same tag (div class="hover") was used there.  Due to the way element filters work there’s no way to limit the scope to only specific parts of a site, it only works by domain name, so to get around this an exception must be added (exceptions can specify more than just the domain name to apply to).  What I ended up with, then, is a rule for blogname.tumblr.com##DIV.hover, with an exception as @@blogname.tumblr.com/archive/.   This is definitely much easier than searching through the page’s media for the correct image.

Entware-ng on TS-251+

I’ve had a bit more time to mess around with my NAS as I try to make it less just a storage device and more a private home server.  Most of the included server software works just fine, and is even fairly up to date (PHP’s only a few minor rev’s out of date, while Apache is the latest 2.2.*).

I’m still a bit annoyed about the SSH daemon restricting logins to the admin account only.  Like most *nix users, I’m not overly fond of the idea of working in the root account, where one typo can hose the system.  While it somewhat makes sense given the nature of the device, I’d still prefer the ability to log in as any user I like.  Assigned to the proper groups, and with the appropriate security considerations and judicious use of account elevation, there’s no reason not to allow it (although neither su or sudo seem to be available in the default firmware).

Enter Entware-ng.  I feel like I’m more than a little late to the party, but from what I understand there have been several methods of getting software onto QNAP hardware outside of the QNAP provided Applications installer – Qnapware, Optware, and now Entware-ng.

Entware-ng is a “software repository for embedded devices like routers or network attached storages” that uses the OpenWrt buildroot to bring many (about 1,800) software packages to numerous Linux devices and architectures.

Installing Entware-ng on my TS-251+ was as simple as downloading one package and installing it via the QTS App Centre.  The TS-251+ runs x86_64 Linux, but I grabbed the autodetect package and let it do it’s thing.

Entware-ng installs to the /opt directory, which ends up as a symlink to /share/CACHEDEV1_DATA/.qpkg/Entware-ng/ (CACHEDEV1_DATA is the root of the internal storage on the NAS).  Beneath it, we have all the usual subdirectories like bin, share, etc and so on.

Once installed we can shell into the NAS and manage packages via the opkg package manager (*sigh* another bloody package manager to become familiar with).  There’s a list of available packages one can peruse, and it seems to be quite exhaustive.  If you need a SSH client, and are on Windows, PuTTY is highly recommended.  I usually just use the SSH client available as part of MSYS2.  Cygwin also includes a SSH client, as does pretty much every Linux distribution.

At this point I’ve only installed a few packages to test things out, like Midnight Commander and sudo, in preparation for having an unrestricted SSHd.  I feel like I’m playing catch-up on the last few years of (embedded) Linux stuff.  I haven’t really used Linux outside of running a few VMs here and there (I’ve just setup an ArchLinux VM to try it out) for a number of years now, and beyond occasionally opening up an MSYS2 or Cygwin shell to use some *nixy command, my *nix-fu has become quite weak.  Plus, I find that as I get older it gets harder and harder to learn and retain this stuff, or even remember things that I remember knowing!

Next up I’ll have to figure out how to get the Entware-ng SSHd running in place of the stock QNAP version.  I’d also like to set the NAS up as a DNS server with dnsmasq servicing requests for my home network, and maybe even a web proxy with squid.  I’m also planning to check out the OpenWrt buildroot system, as I know just the very basics about cross-compilation.  For the time being, it’s back to the forums and wikis to wrap my head around this stuff.  If the process is complicated, I’ll follow up this post with another detailing what steps were necessary.  Then again, I might just be thick and making this out to be harder than it is.

Getting old sucks, btw.

QNAP TS-251+

A while back I picked up my first NAS, a QNAP TS-251+. I’ve been wanting to set up some sort of network storage for years now, but never really had the means (read: money) to do so.  I had considered repurposing an old computer to run something like FreeNAS, but ’round here they’re usually handed down to family members as I upgrade to newer hardware.  The other problem, of course, is that desktop-class hardware is overkill for such a job.

The TS-251+ is a slight upgrade over it’s predecessor, featuring a quad-core 2.0 GHz Intel Celeron processor capable of bursting up to 2.42GHz (the older TS-251 features a dual-core part clocked at 2.41GHz that can burst up to 2.58GHz), 2GB of RAM, and supporting up to two drives.  I upgraded the RAM to 8GB with a pair of Corsair Vengeance 4GB sticks, which is the maximum amount of memory the unit supports.

For storage, I bought a pair of 3TB Western Digital ‘Red’ NAS drives, configured to run in RAID 1 (mirroring).  As I’m primarily using the NAS as a backup solution, redundancy is particularly important.  While it would have been nice to load it up with the biggest drives it can handle, the 3TB drives were at the sweet spot between price and capacity.  I also have a 3TB Western Digital MyBook that, once I get everything organized, I’m planning to wipe and use to backup the NAS, just in case.

On the software side, the NAS runs a 64-bit Linux… sorry, GNU/Linux, underneath QNAP’s interface.  While it’s set up a little differently from what I’m used to (Slackware, primarily), it’s familiar enough that I’m not too lost.  There’s a decent selection of server software available, including Apache, ProFTPd, and SSH.

One annoyance, however, is that only the admin account can be used to connect via SSH.  There’s no easy way around it as, from what I’ve read, this behaviour is hard-coded into the server binary.  Digging through old forum posts and the QNAP wiki did yield some ways to bypass the restrictions of the SSH server, but no sooner would I look deeper into what was suggested before I’d come across information that would render the suggestions moot.  Turns out there’s been a handful of methods of getting 3rd party software onto QNAP’s devices (Optware?), but the ones I looked into had been deprecated in favour of something called Entware-ng.  I haven’t really had time to look into it further, but it seems like it should be possible to install a SSH daemon that’s not restricted.

Other than slowly starting to migrate my media collection to the NAS, I haven’t done a whole lot else with it yet.  All my music and a handful of videos are on it, and play fine over Samba, although occasionally my computer loses connection with the NAS.  I’m not sure what’s going on here, but I suspect it’s my router; I’ve got a shitty Bell Connection Hub that’s a combo modem/router.  The routery part of it is not that impressive.  Unfortunately, when I tried putting it into bridged mode to run my own router, I ended up getting lower throughput than running everything through the CH.  Why, I don’t know.  The modem has Gb ethernet ports, as does my ASUS router, so there’s no reason the speeds should be lower.

But I digress.  The NAS supports a bunch of neat features I’ve yet to experiment with like on-the-fly media transcoding and virtualization.  I did set up a wiki with DokuWiki to make it a little easier to share some stuff. I went with DokuWiki because it supports flat files for content storage.  Although the NAS includes an SQL server (MariaDB), flat files are ideal for my needs.

My family’s not all that used to things like SMB shares and network drives and all that, but a web page is something they can understand.  It’ll be tedious, creating pages for the stuff they want, but I’m sure there’s some bit of software out there that can make the process easier.  If not, it’ll be a great excuse to brush up on my shell scripting, or maybe learn Python, to hack together some sort of a tool that can be autorun from a cron job to automate pulling data out of info files to generate content accessible through DokuWiki.

First, though, I’ve gotta finish dumping several gigs of content onto it.

I wish I had something more informational to post, rather than just rambling on about some piece of hardware I bought, but I don’t.  I need to find something interesting to say, instead of leaving this blog to languish.


It’s been many a long year since I’ve had a physical printer connected to my computer; instead, I’ve been using PDFCreator as a virtual printer, the output of which I can then send off to the real printer connected to another household computer if necessary.

Unfortunately, the developers started included some pretty shitty “extra” software in 2009.  Over the years they’ve changed what crapware is installed, but never removed it entirely.  So, on to the point of this post – installing PDFCreator v1.6.2 (current as of March 2013) without any extra crap.





This is the point where one really needs to start paying attention.  I unselect Images2PDF and PDFArchitect, because I (initially) had no freaking clue what they are and was installing a virtual printer, not a kitchen sink.  Incidentally, Images2PDF supposedly lets you make a PDF out of images, and PDFArchitect looks like a PDF editor of sorts.  But with no description in the installer, the average user will have no idea.


I also unselect the COM samples option, and ensure only the English language translation and help file are installed.


After selecting what parts of PDFCreator will be installed, we come to the disingenuous part of the installer.  It’s deceptive that “Express” is marked as recommended, and the “Custom installation” option is grayed out (which implies it’s not selectable at all).  Adding “(advanced)” is the icing on the lame-cake; it’s a sure-fire way to scare off the general computer user.

Select the “Custom installation (advanced)” option, and uncheck each of the previous hidden boxes.

But wait, there’s more!  As if avoiding one round of crapware wasn’t enough, we’re presented with a second!  The wording “I accept” and “I do not accept” are again deceptive.  Just select “I do not accept” and move along.


Triple check the options listed, ensuring just the components desired are installed.


I don’t have a problem with software developers, even Open Source developers, trying to make a buck off their work.  Generosity and a desire to share doesn’t put food in your belly.  But being disingenuous and deceptive not the right way to try to earn a few dollars.

Unfortunately, I haven’t found an acceptable alternative that delivers the functionality of PDFCreator that I desire.  I’ve been meaning to dig out a copy of Visual Studio and see if I couldn’t roll a crapless installer based on the available source code, but just never seem to get around to it (and have completely forgotten what little I knew of VB anyway).

Uninstalling the Sentinel License Service (hasplms)

One of the (many) things I absolutely hate is when, during the installation of a program, a ton of other crap is silently installed beside it without any warning or indications.

I just noticed a new service, “hasplms.exe”, running.  I have no idea where it came from or what installed it.  I did give Lightworks a spin yesterday (not impressed), as well as my lengthy ordeal attempting to install Tomb Raider Anniversary which I complained about in my last post, maybe one of them install it… but I dunno.

With no idea where it came from, and no uninstaller to be found, I turned to the Internet.  It didn’t take long to find a YouTube video illustrating the uninstall process, and it was surprisingly pain-free.  From hasp.com/srm (which redirects to sentinelcustomer.safenet-inc.com/sentineldownloads/) download the command line run-time installer and run it as

haspdinst.exe -purge

And it looks like the service’s gone, without me having to rage and fume about yet another bit of computer BS.  Now I just have to see if anything breaks…

*Update 2013/10/18*

A few comments have prompted me to provide slightly more explicit instructions, with pictures.  Anywhere you see my name (Andrew), expect instead to see your name (or whatever the name of the account you are using is).

First, downloading the software:


Open the Downloads folder, or wherever you saved the file to, and right click on the downloaded file.  Click on “Extract All…”.


A window will open, asking where you want to extract the files from.  Remove the highlighted part.


This is the path we want the downloaded files extracted to.  Again, if your name’s not Andrew, that part of the path will be different.


Returning to the window that was showing us the Downloads folder, you’ll see the newly created folder.


Ensure that the “haspdinst” program was properly extracted, if you must.


Now you must open a “Command Prompt”.  You can do this in various ways, but for now just use the Start Menu.


Your command prompt window may not look exactly like this; I use it fairly frequently, and so have resized and customized it to suit my uses.  Also, be aware that I run Windows with UAC permanently disabled.  I don’t know if UAC will interfere with this process.  If it does, you’ll have to look in to running the command prompt with elevated privileges.


This next part may look like gibberish, but there’s only three commands that really need to be run (they are underlined in pink in the picture).  Obviously, <ENTER> is the enter/return key.

cd Downloads<ENTER>
cd Sentinel_LDK_Run-time_cmd_line<ENTER>
haspdinst.exe -purge<ENTER>

A small window should pop up, asking you to wait. This will uninstall the software.

Hopefully this clears things up a bit.

Steam(ing pile), part 2

I can hardly believe it’s been two years since I bitched about Valve’s Steam platform, but it’s that time again.

After playing Torchlight II for a bit this morning, I exited the game (and Steam) for a bit.  A while later I restarted the client and received an indication that there was an update of 110 MB. The updater ran to about 73 MB and stopped, and shortly thereafter my wireless network appeared to lose connectivity.

Now this is not an usual occurance around here.  Contrary to whatever claims they make, my ISP (Rogers) is complete garbage.  My connection frequently and inexplicably drops out – this has been an on-going problem for years now.  I actually had one of their phone reps tell me I needed to power cycle my modem every few days because “the logs get full”.  With geniuses like this, it’s no wonder their network is garbage.

Steam - FU

Queue the usual run-around – is it just me, is it my router, is it the modem, what?  Well, it turns out that it was only my machine that had no Internet connection, everyone else’s was just fine.  So I did the disconnect/connect dance and fired up Steam once more, and once more it tried doing the download.  Again, at 73 MB it died.

So, generic solution #2: REBOOT!

This garnered a few more inexplicable, hair-pulling results.  After the first reboot, instead of the Windows 7 login screen I got a oddly fuzzy white screen with a black strip running down the middle.  I should have taken a photo of it, as I’ve never seen that before.  Powering off and back on got me to the login screen, but I’d no sooner opened Windows Update than I got a blue screen.  Rebooting into safe-mode and running NirSoft BlueScreenView showed a problem with the nVidia display driver.

Generic solution #3: driver updates!  Never mind that my system has been running perfectly fine since I configured it in September of last year.  So, I did a round of updates, including my graphics card (which was only a single driver release out of date anyway), wireless network adapter, wired adapter, and even my Intel RST drivers (I run a software raid as my boot drive).

Reboot many times, finally start Steam.  Still stops at 73 MB.  This time, I do the reconnect dance before the updater can complain of requiring an Internet connection, and after a brief delay it continues the process.  I had to toggle my wifi one more time before it finished.

Finally, I get the Steam window up!  And everything freezes!  Yay!  10 seconds or so later, the Firefox window I’d clicked on finally raises itself, but once again I have no Internet connection.  If I had to guess, I’d say the Steam client is burning all four cores and leaving Windows no room to do anything, but that should really be impossible these days.

  • Yes, my drivers are up-to-date.
  • Yes, my Operating System is up-to-date (Windows 7 x64, Service Pack 1, completely updated).
  • No, I do not have any viruses or malware.
  • No, my computer is not running anything obscure or uncommon.
  • No, there is no problem with the hardware, either.
  • This problem just started with the latest Steam update!

This absolutely does not make sense.  How is a user-space program which is nothing more than a feature-limited web-browser and program launcher KILLING MY FREAKING NETWORK?!?!

So, while I continue the reconnect dance as Steam continues to try to download the 220 MB update to Half-Life (and I’m skipping ahead a bit, as I restarted the Steam client several times, and also uninstalled Steam completely, reinstalled and copied back my library (well, copied is wrong, as I use a symlink, but I digress), I decide to give the Steam forums a whirl.

Of course, this is going to require yet another freaking account, after the Steam account itself, and the account I made to use the Steam Support site.

So, make an account, link it to my Steam ID, browse a bit not find anyone complaining of my specific problem, hit New Thread and…

Steam vBulletin BS

So basically I can’t post until some wanker gets off his arse and “activates” my account.

I said it before, and I’ll say it again: This one’s for you Valve!


Seriously, almost a decade after its release and Steam still doesn’t work properly?  And then one has to jump through hoops trying to get some form of support, only to run into the Impassable Brick Wall of Freaking Stupidity in the end anyway.

In the end, the only “solution” I found was to disconnect/connect to my wireless network every time I lost connectivity.  gg Steam.  gg.

Because it makes me feel better, here’s the ticket I’ve put in:

The most recent “update” to the Steam client (that clocked in at 110mb, with an unskinned updater) has broken my ability to download content via Steam. In fact, the updater itself required several tries to get it to download the whole thing (via disconnect/reconnecting from my network before the updater complained about requiring a connection). Now, the client will download for a short while before completely screwing my network connection, killing *everything* and requiring that I disconnect from and reconnect to the network.

I shall be clear here: everything was working perfectly fine before this update! That’s said with a 285 GB SteamApps folder! Nothing has changed aside from the Steam client itself. I have completely updated both my system, and all drivers for my hardware. There is nothing uncommon or unusual in my setup.

On top of that, I tried to post to the forums, but apparently cannot until an admin gets off his butt and “approves” my account, never mind I’ve been a Steam user for years. Honestly, three logins related to Steam (Steam account, support account, forum account) is too much. This is ridiculous, and I’ve found the whole process of trying to resolve my problem with your jumped up web browser/program launcher to be entirely frustrating.

Update 2013/02/21: The problem was still there this morning, so I threw together the video now embedded at the top of this post. A short while later I tried again, and this time I managed to download the remaining gig of data without interruption.

I changed absolutely nothing, and everything has the appearance of working as it should be. The only thing I can think of at this point is that Steam really is a pile of garbage, like many on the ‘net claim, or (and I’m grasping here) that my ISP was sending something back down the line that was causing my network device to barf. That wouldn’t surprise me, as Rogers has admitted to tampering with what passes through the tubes. But at this point I have no freaking idea what’s going on.

Yasm Crashing

While messing about attempting to build a plethora of software with MinGW, I came across an oddity with Yasm.  When building software for personal use, I generally pass gcc the “-march=native” option, which instructs gcc to figure out which features are available on the host system, and to tweak instruction scheduling to match it.

When building Yasm (an assembler) with this option, the resultant binary would immediately crash.

Compiling with -march set to “corei7” produced a program that ran just fine, but using “corei7-avx” again resulted in a crash.

$ gdb yasm.exe
GNU gdb (GDB) 7.4
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "i686-pc-mingw32".
For bug reporting instructions, please see:
Reading symbols from <...>\yasm-1.2.0\build.corei7-avx\yasm.exe...done.
(gdb) run
Starting program: <...>\yasm-1.2.0\build.corei7-avx\yasm.exe
[New Thread 2292.0x7b8]

Program received signal SIGILL, Illegal instruction.
0x00409fe2 in BitVector_Boot ()

Since I have no idea what BitVector_Boot is or does, and I really doubt that an assembler will have much of a noticeable improvement with AVX, the simplest solution is to just use “-march=corei7”.

I really don’t know why it wouldn’t work anyway. I have a Corei5-2500K processor, which supports AVX. I found but a single reference to someone else encountering this, so it doesn’t appear to be a common problem.

Edit with GIMP Context Menu

I’ll keep this one short and to the point.

After installing GIMP 2.6.12 for Windows, I noticed the “Edit with GIMP” entry in the context menu for image files was missing (that’s the menu that pops up when right-clicking on a file).

One Google later and I was reading a blog post on “Thoughtful Code” that pointed me to the correct registry key.  A few minor changes to Mr. Reiter’s solution and I was good to go.

@=&Edit with GIMP

@="C:\Program Files (x86)\GIMP-2.0\bin\gimp-2.6.exe" "%1"

The “@” refers to the “(Default)” value in a key.  I opted to set GIMP as the default edit action rather than creating a separate menu item, and set the shortcut key to “E” (that’s what the ampersand in “&Edit with GIMP” does).  I also had to change the path, as I use a 32-bit GIMP on Windows 7 x64.

For the quick ‘n easy, copy and paste the following to a text file with the .reg extension (such as Edit_with_GIMP.reg), and run it.

Windows Registry Editor Version 5.00

@="&Edit with GIMP"


Media Playback Problems

One of the things I really dislike about reinstalling Windows, whether from need or just masochism, is that I run in to all sorts of problems that I’ve never seen before.  For example, my D-Link DWA-552’s poor performance.  That’s half the reason I bother with this blog.  I’ve a terrible memory, so keeping track of the issues and my attempts at fixing them just seems like a Good Idea.  And if I can point someone else in the right direction, even better.

After fixing my audio problems I had hoped that my media playback difficulties would be resolved as well, but this was not to be.

I run a dual display setup off of my single EVGA nVidia GeForce 460 GTX.  DVI-1 connects to a 24″ Samsung SyncMaster BX2431 LED display via a DVI-to-HDMI cable, while the HDMI connection is plugged in to a 40″ Samsung LN40D630 LCD television.  The TV’s audio is plugged in to my desktop’s 2.1 speaker setup via a 3.5mm TRS plug for those moments when I need a bit more boom.

Aside from the obvious hardware changes of a new processor, motherboard (and the differences in onboard hardware), and the recently upgraded wireless card, the only other big change is upgrading Windows 7 x64 to Service Pack 1.

My preferred media player, Media Player Classic – Home Cinema has suffered terribly from dropped video frames and the audio has refused to stay in sync, growing progressively worse as the video plays on.  VLC media player fares a little better, but while playing it averages 35-50% dropped frames according to its playback statistics.  Sometimes it’s not quite as noticeable, but being near sighted has made me annoyingly sensitive to things like frame skipping and tearing (and dead/stuck pixels in a display, to my everlasting irritation).

I’ve tried everything I can think of, upgrading/downgrading/upgrading my audio drivers for my motherboard’s built-in Realtek HDAudio hardware, using the latest beta nVidia driver, and disabling Aero in favour of the Windows Classic appearance.  I’ve twiddled services, changed audio output settings, all to no avail.

The last step I tried, and the one that seems to have finally prevailed, was to install Haali Media Splitter and a recent SVN build of ffdshow-tryouts by clsid.  I set the splitter to handle everything it could, and set ffdshow to only allow whitelisted programs due to incompatibilities with certain games that I happen to play (such as Fallout 3).

MPC-HC needed a bit more tweaking to make it use ffdshow and mkvsplitter.

I think I’ve got it right, although I’m pretty clueless when it comes to the gory details of media playback on Windows.  Either way, this appears to work and MPC-HC claims it’s using ffdshow, with the notification area icons backing it up.

So far so good.  I’ve watched two videos that were horrendous, exhibiting the sync and frame dropping issues as soon as playback began.  Using the external filters appears to have cleared up my issues completely.  I haven’t looked in to enabling DXVA in ffdshow for acceleration yet, I’m just happy I can watch videos flawlessly now.


Well, it looks like I spoke too soon, the sync problems are back with a vengeance.


This is bloody annoying.


Oh, and happy 36th birthday to me.

VirtualBox HostAudioNotResponding

Starting a VirtualBox virtual machine results in a warning popup:

This is because Windows/the audio driver has disconnected the devices due to nothing being plugged in to the relevant ports.  Modern audio hardware has a feature called jack sensing, and can disable the respective devices when there’s nothing to receive input from or send input to.

Plugging my headset/mic combo into the front-panel audio connectors results in the microphone recording source being enabled.

If you want these sources to be available to your VM, ensure they’re plugged in before starting it.