Saturday, 24 September 2016

Thankyou Adny! But your ebook is in another castle.

Some time ago I picked up a cheap Nook and began to enjoy the world of ebooks.  Of course, I created a nook account and I even bought a book on it...  which it's become very apparent isn't exactly true.

See, Barnes & Noble decided that their nook store wasn't worth running any more, so they closed it - and my book with it.  But fear not! Most of customers' ebook libraries would continue to work as long as we signed up for a Sainsbury's Entertainment On Demand account and migrated our libraries to that.  B&N pestered us quite thoroughly to do so... and, grudgingly, I did eventually do that in order to safeguard my access to that one ebook I bought.

Well... guess what.  Yep, Sainsbury has decided that their Entertainment On Demand store isn't worth running any more, so they're closing it - and my book with it.  But fear not!  Yeah, it's off to Kobo this time...

Fuck that for a game of soldiers - I'm done.  I'll stick to actually buying books, instead of renting the possibility of reading them from stores that can throw in the towel with a shrug and a "most of your library will probably be fine, just jump through hoops and open an account you didn't want".

I'm so glad that I only ever 'bought' that one ebook from a 'regular' store, and got all the rest in Humble Bundles and the like, DRM-free.


Wednesday, 28 September 2011

Well, THAT was unpleasant.

About a weekend or two ago, I picked up a good ol' cold virus and took it home to live with me for a while.  Didn't mean to, but you know what public transport is like for these things. Anyway, that went about as can be expected and I was starting to feel a little more perky again by the end of the week, albeit with a bit of the Green Snot Of Death looking likely to hang around longer. And then I seemed to come down with another cold.

Colds aren't really a big problem for me, not pleasant of course, but it's just a cold.  What is a problem, though, is that Green Snot Of Death. See, it has a nasty habit of lingering and making life unpleasant for months at a time, or until I actually get dragged to a doctor to be prescribed antibiotics.

So there I was, thoroughly miserable, nose dripping and yet somehow also blocked up solid with viscous gunk...  feeling very much like I'd been smacked in the face repeatedly with a cricket bat. For extra pain, every time I coughed it felt like I was punching myself in the face from the inside. Painkillers were helping a little, but not enough that I could, say, sleep or anything.  Appetite was another issue...  it was gone. Completely. That's generally a sign that I'm actually ill, as opposed to just a bit sick, or whatever.

So...  time to make an appointment with the doctor, which I did. As luck would have it, I could see $RANDOM_DOCTOR early today and for once I was fine with that (my problems with doctors are fodder for another time...). Better still, I was actually pretty exhausted and thought I might even manage to crash out and sleep.

The previous time I'd fallen asleep, I'd awoken a mere two hours later with that "Sleep? Oh, not for you, sunshine." pain so this time I made sure to have painkillers and a drink handy. I was also starting to feel a little on the over-sweaty side, so I threw on my trusty towelling bathrobe (when I get the sickly sweating, I sweat a LOT and nobody needs to have to hang a mattress out on the line to dry) and settled into bed. I did, indeed, crash out at about half-past ten, and fell asleep... And that's when it all went pear-shaped.

First of all, I'd forgotten to cancel the alarm on my phone that usually reminds me to take my melatonin on a night (my relationship with normal daylight hours is, again, fodder for another time) and that's set for half-eleven. So off it went, waking me up in a state of great confusion, not helped by the pain and a bit of good old fashioned feverishness.

Once I'd worked out what exactly was making the peculiar noises, located and silenced it, well, I was feeling a good deal worse than when I went to bed, but still pretty exhausted, so I flopped back down with the not unreasonable expectation that sleep was still an option. In a quite uncharacteristic turn of events, sleep actually was an option, as I discovered when I found myself experiencing one of those messed up, semi-lucid dreams I seem prone to when a bit under the weather. But never mind, sleep is sleep, so let's call it a win ---

--- and suddenly it's 1am and I'm awake again, in considerably more pain and a sopping wet bathrobe. "Ah, I see." I said to myself, "This is how we're playing this one then. OK."  I mean, it's just a cold or two with a bit of bacterial unpleasantness, and I'll be at the doctor's in under nine hours'; all is as OK as it can reasonably be. So a little bed-drenching sweating is an inconvenience, but realistically it's not likely to go on for too long, especially once I get those sweet, sweet antibiotics pitching in with the bacterial thing so the ol' immune system can get back to any remaining viruses. Divide and conquer, and all that.

Best of all, I'd thought ahead! Beside the bed, next to the now thoroughly disgraced and silent phone, was a glass of Pepsi Max and some own-brand Lemsip cold+flu caps. Paracetamol and decongestant, just when I need them and a drink to wet the old whistle, then wash them down with. I was feeling relatively smug at this, which is not all that smug, to be honest.  I mean, smug is quite hard to pull off when you're feeling like the victim of repeated cricket bat assaults to the face who has, for some reason, been wrapped in a brine-soaked towel. But, anyway, perhaps that's why it all went pearer-shaped.

I'd taken literally a sip of the delicious Max, then washed the two cold+flu capsules down with a small mouthful of drink when my stomach decided that it was feeling overlooked in the distress department. For a moment I entertained the hope that I might simply need to shamble as quickly as possible to the khazi to, ahem, catch up with some expedited digestion. But no. Oh, no. Apparently that tiny amount of liquid and the painkillers were going to bounce. Furthermore, leisurely shambling was no longer an option. This was going to have to be a frantic lunge.

"Really?" I asked of my gut, as I tried with only moderate success to compensate for the extra weight of my sweat-soaked bathrobe, "We're doing this now?!". "Yes." came the emphatic reply, and the little bastard wasn't kidding either, so off to the bathroom via the intervening door-frames like a squelching, demented pinball it was, where I proceeded to hurl a disgustingly unimpressive amount of pepsi/cold+flu capsules. Over the next fifteen or twenty minutes' worth of blasphemy enriched effort, sweat literally poured off me as my gut expressed its immense displeasure with my 'couple of sips of Max and some pills' antics.

How the hell a stomach can make such a long ordeal out of throwing up basically nothing, I have no idea.  It even managed to require two 'goes' at it... I actually kinda passed out against the bathroom wall a little bit between them, but ol' passive aggressive gusty wasn't having that... so up I came for round 2. And up came damn near nothing to show for it.

By the time that was all done with, I was a wreck. Made worryingly pathetic small talk with Olga -- while appetite going may be a warning sign that all is not well with the Adny, when my natural snark has vanished, well... that's bad. It takes a lot to knock the snark out of an Adny. And of course there's precious little anybody can do for somebody else in that condition, so she just propped me up in a corner of the sofa where I drifted into merciful unconsciousness again.

Today is looking much better. Temperature is down to just over a hundred, Green Snot Of Death has been served its first Amoxycillin eviction notice, and I even managed to be interested enough in the concept of a slice of toast to cook, but forget to eat, one. The appetite might be AWOL, but at least the snark is back, much to Olga's relief.

I'm still not quite on speaking terms with ol' gutsy.  I mean, when painkillers are what you absolutely need, right there and then, that sort of reaction is just not going to make you popular, now, is it. Perhaps I'll make it a peace offering of a garlic risotto tonight. That'll show it.

Sunday, 6 March 2011

Missing icons in Firefox's menus...

At some point recently, the various icons in Firefox's various menus disappeared for me.  Oh, bookmarks, etc. still had their favicons, to be sure, but just about every other menu was sadly devoid of the icons I find so useful in quickly finding what I'm looking for.  Disaster.

A bit of googling turned up a possible cause: there's a gconf key that specifies whether menu entries should have icons or not, and these days it defaults to off it seems.  Hoorah! A easy fix...  that didn't make any difference.

Maybe it's because I use KDE and not GNOME (my other boxes with GNOME haven't exhibited this issue at all...), but I've never really known Firefox to do anything other than assume that you must be using GNOME so I'm skeptical that KDE is to blame.  Then again, KDE 4 is so delightfully GNOME like these days (Options? Nope.  Retarded UI? Hell yes!) so who knows, maybe it did persuade Firefox to take my icons away with no redress because to allow me to choose whether they were would imply that the UI isn't perfect. (Seriously: GNOME folks think like that, and KDE is starting to feel that way.  NOT what I got into Linux for at all.)  Ah, but I digress...

Anyway, persuading Firefox that it should be showing those menu icons turns out to be as simple as adding a gentle, but firm, hint to userChrome.css:
.menu-iconic-left {
    visibility: visible !important;
}
Tada! My icons are back and I'm happy again.

Thursday, 25 November 2010

netbooting Ubuntu, a cautionary tale of NFS3 and tcp_wrappers...

One of the things I like to have available on my LAN is a decent live Linux system that I can network boot into.  It's incredibly handy for those occasions when you need to do something to, or with, an installed system that requires it not to be running.

This little tale starts a few days ago when I wanted to upgrade my Fedora 13 box to Fedora 14.  No big deal, but I keep a copy of the old root filesystem on a separate partition in case of problems, said copy typically being made (e.g. with dd, and filesystem UUIDs, etc. adjusted as necessary) from a live Ubuntu.  Why Ubuntu?  Because it's really easy to network boot it, competent/complete enough for every issue I've needed it to fix so far... and sometimes it's just nice to see how 'the other side' does things.

So, anyway: my backup in preparation for my Fedora 14 upgrade.  I told my box to boot from the network, selected Ubuntu 10.04.1 from the menu and watched the kernel/initrd load as normal, but then something I'd not seen before happened.  Immediately after mounting the root filesystem, and instead of the normal live Ubuntu startup messages, there was just a string of short read: 24 < 28 messages dumped to the console, one per second.  After a while it just gave up and complained that it could find no usable root filesystem.  Same story for all the other live Ubuntus I had handy.

Uh-oh.  Thing is, this used to work just fine.  And, of course, I hadn't changed anything.  Now, nobody has ever changed anything, right?  Of course I had changed something, but I'm getting ahead of myself.

A quick google turned up something interesting about the order of the kernel arguments mattering (it shouldn't) and leading to that peculiar short read: 24 < 28 message.  "Funny," I thought, "It never mattered before...  And I don't remember changing them in the PXE menu config. wotnot either."  Nonetheless, I fiddled with them and got precisely nowhere.  Something was causing that NFS mount to bork, and I had no idea what.

So it was time for a different approach, and perhaps to get some more idea of what's going wrong...  in the pursuit of which I tried mounting the NFS export on my box, which failed.  Specifically it failed with an error message that left me even more puzzled: mount.nfs: Argument list too long.  "WTF?!" I said, nonplussed.  Naturally, I tried googling that and got pretty much nowhere.  It's not exactly a 'normal' error to get from a simple mount command and, come to think of it, it's not an error I've seen in a long time -- typically it's caused by insanely successful wildcard matches in shell commands, etc., not by mount 192.168.3.154:/export/netboot/ubuntu-10.04.1-i386 /mnt/tmp.


By that point I was scratching my head and thinking "This used to work.  Clearly something has changed.  Something unexpected, perhaps.  Now...  What have I changed since I last definitely had this working?"

And then it hit me:  My network had changed since I last knew for sure that it was working.  Specifically, I added an extra router to provide wifi for guests, etc.  There's more to the why than that, but that's a long, miserable, story in its own right, starring a Netgear D843G router as the villain eventually exposed by an plucky young Android phone and a single remote wget command.  Anyway, the relevant part is that I now have an extra router/AP that thinks my LAN is the internet.  It has a LAN of its own, of course, and that's actually a good thing since it means I can very effectively keep 'guest' wifi use under control.  There's a difference between "Sure, use my wifi." and "Sure, use my wifi... and maybe rummage around on my fileserver as well." after all.

With that in mind, I'd added some rules to my hosts.allow and hosts.deny to explicitly allow NFS 3 access from my regular LAN but not from the 'guest' LAN.  Shouldn't be relevant, right?  Oh, but it was...  and not just because I'd botched it.

Here's the thing:  there's a few ways you can specify a range of IP addresses.  192.168.3.0/24 means the same as 192.168.3.0/255.255.255.0 means the same as 192.168.3. and I'd gone with the /24 version in my config.  Error number one, right there:  tcp_wrappers is old.  Old and unloved.  It does understand that form of netmask, but only for IPv6 addresses... and only just.

"Hooray!" I cried, having found the problem.  But would you care to guess what happened when I corrected my netmasks by changing them to the 255.255.255.0 format?  That's right: nothing changed.  Still that short read: 24 < 28.

That's just not fair, really, is it.  I mean, sure that config cockup shouldn't have caused those problems, but it was what had changed since the thing last worked properly...  and, well, "Bother," said Pooh.

For the sake of testing, I threw an ALL : ALL rule into my hosts.allow and...  suddenly...  everything was working as it should.  Live Ubuntu, mounting from a normal box:  no problems at all.  Aaaaargh.  So it was tcp_wrappers that was causing the problem!  But... WTF?  That's when I decided to try the 'trailing dot' method of specifying the network...  and...  that worked.

So, to recap:
192.168.3.0/24 -- bad.  That style of netmask is only for IPv6.  Oops, my mistake there.
192.168.3.0/255.255.255.0 -- bad.  No idea what tcp_wrapper's problem is with that.  Smells of bug to me.
192.168.3. -- good.

Oh, for completeness' sake, tcp_wrappers also allows the use of asterisks as wildcards in some circumstances and I could potentially have tried 192.168.3.* but since it was now working and I had things to do, I didn't get around to trying that.

So, long-story-short version:  for some reason a perfectly normal and valid netmask in hosts.allow was causing NFS to throw wobblies leading to that peculiar short read: 24 < 28 message and the equally confusing mount.nfs: Argument list too long.  Who'dathunkit.

But do you want to know what the real kicker was in all of this?  Sure you do, if you've read this far.  And it's a real facepalm worthy one too...

The kicker is that the whole thing was an exercise in Forgetting Something Important:  That extra router/AP is doing NAT, so everything 'behind' it appears to come from it... and it's part of my regular LAN.  In other words: there's no bloody point in trying to restrict access to the 'guest' IP addresses, what I actually need is to restrict access from the 'guest' router's IP address.

Wait, it gets worse.

All this tcp_wrappers malarky is only relevant to NFS3... and the only things I export via NFS3 are my local package repositories and the necessary stuff to network boot things - all read only, and none of it even vaguely in need of protecting from accidental guest access.  All the 'real' stuff is exported via Samba and NFS4.  For what it's worth, Samba is easy enough to lock down sufficiently, and I've already done so.  NFS4 is slightly more fun, and doesn't use tcp_wrappers at all, but a couple of simple firewall rules suffice.

Anyway, given the dearth of relevant google hits when searching for the two specific error messages I was seeing, I figured it might be worth sharing the story.

Tuesday, 20 May 2008

For the love of eye-candy

Compiz-fusion is lovely, it really is... spinny cube, sproingy windows, neat effects - and even some stuff that's genuinely useful when it comes to organising today's clutter of windows. In short, I like it and find it just useful enough that I'd really hate to have to do without it.

Of course, since this is a Really Cool Thing that I really like, there are some problems. And, of course, these are problems that nobody else in the whole wide world seems to have suffered from, at least as far as google can see (and I've searched and searched and searched...).

I'm actually fairly used to not finding stuff with google - generally when I have a funky problem all I can find is forum posts by other people with the same problem, and maybe something in a language I don't understand that looks like it might be relevant, but isn't.

What makes my compiz woes so much more interesting is that for once I can't even find other people with the same problems. Sure, I can find a few people with problems that look a bit similar at first glance but turn out to be quite different, and I've read plenty of those pages just in case their problems actually turned out not to be that different after all. No joy.

It's not even one thing, either. There are three major problems I had with compiz, of which one is solved, one is mostly worked around, and one continues to baffle and frustrate me. Since I had such a bad time of searching for help on these problems, I figured it was probably worth writing them up a bit. Maybe I'm not so alone after all and somebody will descend from heaven to tell me how to fix them properly. Or maybe what I've discovered will help somebody else in the same position that I was.

Just to add to the fun, I'm unable to reproduce these problems on other boxen locally, even with cloned configuration. And, speaking of configuration, the problems exist for a completely 'clean' user also, so it's not some hairy old piece of config lying around in my setup. But, of course, only on my box.

Anyway... First of all, some background info: I'm using x86 Fedora 8, which has compiz-fusion 0.6. My boxen are all AMD/Nvidia based. The specific box that has the trouble is an Athlon64 X2 5200 with 2GB of RAM and an 8600GTS card (I'm using the x86 architecture to keep things homogeneous here). My desktop environment of choice is KDE (3.5.8), but again that seems to be irrelevant - the 'clean' user has the Fedora default of GNOME.

"Problem 1, if you were an ice-cream, what flavour would you be?"
"Choc-chip, so I could get smeared all over you and leave big splotchy marks."
Problem number 1 is the solved one - a simple change to my xorg.conf file sorted this one out, but I'm getting ahead of myself.

Shortly before I started using compiz in earnest, I discovered VirtualBox and was happily using it to host various OSes for testing/compatibility/whatever. With compiz on the scene, it all started going a bit wrong... whenever the VB window resized there was heavy screen corruption around it. Occasionally the whole X server would crash. Not good, in other words. Smacks of driver/X bug, or similar. It's also worth noting that this problem isn't actually a compiz problem - the exact same thing happens with KDE's compositing manager - it's just that compiz is probably the most common compositing manager out there, and the one I had the problem with.

As it happens, as part of troubleshooting problem 2, I'd made some changes to my xorg.conf file as recommended in one of those 'not quite the same problem' forum topics. The specific change that lead to the problem seems to have been enabling backing store, thus:
Option "BackingStore" "True"
(Incidentally, that didn't make any difference to the problem). Removing that line from the xorg.conf file sorted out the corruption, and now VirtualBox is running just fine again. Yay.


"Problem 2, what would you be doing while you waited for me to get ready to go out?"
"I'd be looking at pictures of old flames."
Problem 2 is my "mostly worked around" one, for those keeping score at home.

I use the 'Animations' plugin in order to have the beam effect for minimised/restored windows, and the burn effect for closed ones. Oh, and some zooming for newly opened windows. All in all, it makes for a visually cool desktop that somehow feels a little more 'tactile' than one where windows just appear/disappear 'whole'. It gives the windows some sort of 'life', elevating them above being mere rectangular regions of a rectangular screen. And, naturally, I'm not willing to do without it. If my windows don't burn when I close them, they might as well not do anything.
So, what's the problem? Well, if I leave my box idle for any significant length of time, for instance overnight (or overday, I suppose - I tend to being nocturnal) then the next animation to be displayed gets jammed for several seconds. The length of the 'jam' seems to be proportional to the period of inactivity, and until it sorts itself out the entire X session is wedged. The effect is noticeable after even an hour or two of inactivity, but really comes into its own after a night/day or so.

What happens is that the effect begins to play, then freezes. So, if I close a window then the fire effect will render its first frame and then everything comes to a complete standstill. The same happens with the other effects provided by the Animations plugin, but not for ones provided by other plugins. My wobby windows are fine, my cube rotates, etc., etc. But that first 'animation' effect gets stuck, with 100% CPU load.

The box is still running fine while this is happening - I can ssh in to it just fine, for instance. I can't switch to a VC though - X handles that, and X is frozen until the effect finally deigns to finish playing several seconds later.

So, what's my workaround? Well, since the Animations plugin is the only one affected, and since I'm hardly likely to miss it when the machine is sitting there with the monitor off, I knocked up a little script that watches for the monitor being turned off by DPMS and disables the Animations plugin. When the monitor is turned back on, the script (re-)enables the plugin. Overall effect: problem solved as long as DPMS corresponds to idle time, which it pretty much does.

The script (and a little more info) can be found here.


"Problem 3, sometimes I feel like my clique is out of control. What alternative could you provide?"
"None. And I'd be sure to get you out of those shift dresses, too."
Ah yes, problem 3. My current Nemesis. The Unsolved One. The great Dunno. Etc.

I make heavy use of VNC: my 'media player' box runs Amarok in a VNC session, my IRC client is also running on that box and accessed via VNC. VNC is great - it's screen for X servers, and what's not awesome about that? Nothing, that's what. Sadly, VNC becomes a good deal less useful if you can't actually use it properly, say if certain mouse-clicks or key presses didn't work. And that's what's happening to me.

Specifically, I can't use the Control, Shift or Alt keys in combination with the mouse buttons. They just get ignored completely and the click happens as though I wasn't pressing any keys at all. Naturally, this makes it rather hard to do various things that require shift/ctrl/alt-clicking/dragging something - and there's actually quite a lot of things like that, as becomes abundantly clear when your ability to do them goes away.

My VNC client of choice is the standard RealVNC vncviewer as installed from the Fedora repos. Before compiz all was well, but now no modifiers. Naturally, I've tried some other VNC clients with mixed results. TightVNC has the same problem, but a really old tightVNC client I have lying around for some reason doesn't. Vinagre doesn't have the problem, either, but it's not really useful for how I use VNC.

So currently I'm stuck using an old tightVNC whenever I think I'm going to want to shift/ctrl/alt-click /drag anything, which sucks.

Try as I might, I can't get the other F8 box here to behave like this - it just works there.

Gah.

Friday, 9 May 2008

Best. Straw Man. Evar.

Last night I watched a fascinating video on YouTube: 10 answers that every intelligent Christian must have. This video is a response to some other guy's video (10 questions that every intelligent Christian must answer) and far surpasses it in sheer pseudo-logical douchebaggery. But still I watched, and watched with a smile on my face, because I deeply enjoy well crafted irony.

This guy is awesome... he starts out by claiming that the 10Qs video is nothing but a set of straw man arguments, something which I suspect either makes perfect sense or not depending on whether you actually believe in God or not. But that's not what amused me. What amused me was the example of a straw man argument that he crafts in order to explain what one is. Brace yourself, it's a killer: If I can grab a box of crackers, you have no parents. Really. That, by the way, is a specific 'straw man' attack on the proposition that you have parents.

Best. Staw man. Evar.

How better to start an argument than by creating a straw man of a straw man, then tearing it down to show just how egregious straw men are! That loud clang was a huge lump of irony hitting the floor :-)

The rest of his arguments are every bit as bad, by the way. To be fair, he does at least attempt to answer the 10 questions, albeit with such impeccably douchelike logic that "attempt" is probably the best way to describe it.

On the bright side, I do now have a new phrase: crackerbox-grabbing insane.

Tuesday, 22 April 2008

Today I learnt...

Been caught out in a deception? Or maybe you've had your woeful ignorance of some topic brought to light... Well, never fear, with just four simple words you can in all honesty contradict your accuser even if they're actually right!

Repeat after me: "I would say that..."

That magic little caveat can be used to prefix whatever you like, and best of all it makes the whole statement not only true but self evidently true.

Here's a fine example: A Conversation with Expelled's Associate Producer Mark Mathis

It seems to me that the words "I would say that" have an unspoken implication - a parenthetical "because otherwise I'd have to admit to being wrong, a pillock, or both"

But then, I would say that, wouldn't I?