Firefox Paper Size

It appears that no matter what the system papersize is set to, and no matter what cups says is the default paper size, firefox, in its infinite wisdom locks it to being letter - this would probably be fine if I was in the US, but I'm not, and I want it to be A4...

So, the stages to go through to get it to do the right thing appear to be:

  • Goto about:config

  • Filter on print_paper_size

  • Change any bold (i.e. set) entries that are wrong to A4

This seems like something that should be much easier set, apparently using Page Setup only affects the current tab/window you are in and doesn't change the default, which is just odd.

Posted: 2009-10-09 10:03 in Tech | permalink

Random Storage Idea...

So, I was reading some random mumblings on the interwebs, and the pigeon with USB stick being a quicker method of data transfer in SA than their intertubes... then there was a thread on a mailing list discussing this, and someone mentioned using stacks of microSD cards... so then my brain decided to launch itself orthogonally, as it often does. What we end up with is wondering just how much storage you could fit in to the space a 3.5" drive would normally take - not taking in to account any method of attaching it at this point. So, a 3.5" drive is approx 102mmx147mmx26mm, a microSD card is 11mmx15mmx1mm, so, assuming that we're just lying them side by side, and not optimising the way they're stored at all, you can fit (with space round the sides) 9*9*26 = 2106 microSD cards in the area of a 3.5" drive. Assuming that each of those is 16G that's just shy of 33.7TB of storage!

So, that set me thinking a bit further... I reckon that in that space you could do a 6*6 grid of cards with room for connectors, and just about get it to 10, that's 360 microSD cards, and probably enough room for some control gear (haven't worked out quite what we'd use for that), I then went in to wondering if we could then create a small embedded system to talk to those 360 microSD cards, if we did that then you could potentially do RAID0 across the "platters" with RAID6 on each platter. Now, to my poor head that meant that there should be 340*16G of available storage, which is 5.44TB... of course, that involves somehow interfacing the 360 microSD cards... I'm thinking that it might be possible with some form of embedded system...

Unfortunately, it appears that to actually build this with consumer components... and without including the interface gear which I haven't even begun to work out yet... we're talking around about £26 per microSD card, so, erm, £9360... but I still think it'd be a really neat project... now, if someone can arrange for me to win the lottery, have lots of spare time, and some more brain power... :)

Oh dear... my brain appears to have ticked further through, and I've realised that with spacing between each microSD card, you could, in theory, easily fit 400 of them upended in the space available. Erm. Of course, this still doesn't answer the "how the hell do you then get them all to talk in any sane manner" question... but I'm sure that will work out in my head sometime...

Posted: 2009-09-13 20:01 in Random, and Tech | permalink

LVM weirdness - solution found...

ARGH! So, now I know the issue, the disk was created with a standard dos partition table... this won't extend past the bit that I'm at... it needs to be GPT, so there's going to need to be some downtime to sort it out. SIGH.

Posted: 2009-09-09 18:25 in Tech, and Work | permalink

LVM weirdness

I'm having some issues with LVM, basically it appears that I can't assign over a certain amount of my pv, where that certain amount is somewhere around 1.5TB... output from all the relevant chunks are:

ensenada:~# lvdisplay
  --- Logical volume ---
  LV Name                /dev/main/root
  VG Name                main
  LV UUID                ZR33WS-glE2-bUn6-adCX-n50C-37eX-Fc7Pde
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                7.45 GB
  Current LE             1907
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:0

  --- Logical volume ---
  LV Name                /dev/main/voldemort
  VG Name                main
  LV UUID                DrT0co-THRw-6Zcy-Q3PT-OiQj-4KBz-xfV0Un
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                1.37 TB
  Current LE             358400
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:1

ensenada:~# vgdisplay
  --- Volume group ---
  VG Name               main
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  56
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               5.45 TB
  PE Size               4.00 MB
  Total PE              1428053
  Alloc PE / Size       360307 / 1.37 TB
  Free  PE / Size       1067746 / 4.07 TB
  VG UUID               ddVSIr-W9BU-XOWJ-gdSo-HZ4m-vw3M-S33Q3s

ensenada:~# pvdisplay
  --- Physical volume ---
  PV Name               /dev/sda3
  VG Name               main
  PV Size               5.45 TB / not usable 1.54 MB
  Allocatable           yes
  PE Size (KByte)       4096
  Total PE              1428053
  Free PE               1067746
  Allocated PE          360307
  PV UUID               sFxRYg-Ua60-zpMT-DMqo-tpD5-d24W-qfW31p

ensenada:~# lvcreate -n test -L 74G main
  Logical volume "test" created
ensenada:~# pvs
  PV         VG   Fmt  Attr PSize PFree
  /dev/sda3  main lvm2 a-   5.45T 4.00T
ensenada:~# lvs
  LV        VG   Attr   LSize  Origin Snap%  Move Log Copy%  Convert
  root      main -wi-ao  7.45G
  test      main -wi-a- 74.00G
  voldemort main -wi-ao  1.37T
ensenada:~# lvremove /dev/main/test
Do you really want to remove active logical volume "test"? [y/n]: y
  Logical volume "test" successfully removed
ensenada:~# lvcreate -n test -L 75G main
  device-mapper: reload ioctl failed: Invalid argument
  Aborting. Failed to activate new LV to wipe the start of it.
  LV main/test in use: not deactivating
  Unable to deactivate failed new LV. Manual intervention required.
ensenada:~# lvremove /dev/main/test
Do you really want to remove active logical volume "test"? [y/n]: y
  Logical volume "test" successfully removed
ensenada:~# lvcreate -n test -L 74G main
  Logical volume "test" created
ensenada:~# lvremove /dev/main/test
Do you really want to remove active logical volume "test"? [y/n]: y
  Logical volume "test" successfully removed

Please, someone, put me out of my misery - this is driving me nuts!

Extra info:

ensenada:~# uname -a
Linux ensenada 2.6.26-2-amd64 #1 SMP Fri Aug 14 07:12:04 UTC 2009 x86_64 GNU/Linux
ensenada:~# dpkg -l lvm2
| Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name                  Version               Description
ii  lvm2                  2.02.39-7             The Linux Logical Volume Manager
ensenada:~# cat /etc/debian_version

(Erm, just remembered that I haven't got comments enabled at the mo, so if you've got fixes, please mail me! - thanks!)

Posted: 2009-09-09 16:07 in Tech, and Work | permalink

XKB and xsessionrc

So, for a while now I've been using xmodmap to remap my caps lock key off to mod4 to make using awesome just that little easier... although my laptop has got a 'Windows' key, it's in an awkward place for general use, whereas caps lock is in a somewhat more convenient place. Also, not wanting to make it system wide (you never know, someone else might want to use the laptop at some point, at which point it'd be a different user), I wanted to keep with something close to the xmodmap method of just replacing bits as we needed 'em.

As I upgraded the laptop yesterday, various things broke (not least of all, my awesome config, as the theme format had changed to lua, and my theme, erm, broked it), I changed from it using my ~/.xsession for starting the things that I want to using the default Xsession foo, fortunately this sources a .xsessionrc file, which is handy.

So, using hints from madduck's post about extending xkb, I setup a very simple mapping that just adds in the Caps Lock -> Mod4 override, which is nice and handy.

I then just use:

[ -r $HOME/.xkb/keymaps/default ] && xkbcomp -I$HOME/.xkb $HOME/.xkb/keymaps/default $DISPLAY

in my .xsessionrc to setup the keyboard with the right settings, the default keymap in $HOME/.xkb/keymaps is simply the output of setxkbmap -print, edited to add +brettp(caps_mod4) to the symbols, the +brettp(caps_mod4) is a copy of madducks partial for that, i.e. there is a file $HOME/.xkb/symbols/brettp that contains:

// caps_mod4: make capslock generate the mod4 modifier
partial modifier_keys
xkb_symbols "caps_mod4" {
  replace key <CAPS> {
    [ VoidSymbol, VoidSymbol ]
  modifier_map Mod4 { <CAPS> };

Looks a little cleaner than using xmodmap, and might mean that firing off Xnest sessions might stop breaking things!

Posted: 2009-08-16 14:13 in Tech | permalink

Terminator: The Sarah Conner Chronicles - Season 1

So, I mostly missed Terminator: The Sarah Conner Chronicles when it was shown on TV, so I bought the first season on blu-ray to watch... I'm about half way through now, and I'm really quite enjoying it. Might have to see if I can find season 2... Appears that the series has had the usual Fox treatment though... "Oh, people like it, we'll ditch it!" sigh.

Posted: 2009-06-06 15:11 in Life | permalink

Of pro-life and pro-choice

So, this blog entry is purely about my life experience and my gut feelings... but, basically, here's the rub - pro-choice are all about being able to kill a child up to 24 weeks old, my nephew wasn't far past that, and he's a fucking fantastic child, he's now 8 - and absolutely fucking brilliant - so yeah - pro-choice - I'm not going to fuck up my life, but I'm going to mince a child that might or might not have feelings because I can... argh - for fuck sake - given that most abortions are through consensual sex - for fuck sake - either take the choice that you're going to be pregnant and live with that or don't have sex - it's not a hard choice - and that is what I see as pro-choice - you have the choice to have sex, or not. If it wasn't a consensual agreement, take the damn after morning pill, not a hell of a lot is going to survive that, and you're within a week, barely noticeable.

What pisses me off is the "pro-choice" vs "pro-life" battle - you're both wrong, anything after 2 weeks and I'm with the pro-lifers, any thing before that, yeah - the pro-choicers are fine...

Another thing that pisses me off is people deciding that they know best about how the government should go - what they haven't yet realised is that the entire government is there to tax us so that the pro-life and pro-choicers can have their bitter dispute, no matter who is in power. Shortly followed by screwing over either students or workers, depending on who's in power. It doesn't really matter - whoever is in power, some one is going to get screwed.

Posted: 2009-06-06 00:27 in Life | permalink

And summer bites again!

So, summer has arrived - how can I tell? The heat is killing the servers in our office again, the poor little AC unit can't keep up when the temperature outside is getting to summer weather. So the door to the magical cupboard is open for the moment, as the office temperature is slightly lower (but still, not great), and it's keeping the cupboard at somewhere around 26, which is still a little higher than I'd like, but better than the 32/33 that knocks the main firewall out.

I'll be replacing the main firewall over the weekend with a lower power (and thus less heat generating) soekris box (which should have enough grunt to shift the packets), and means that we'll go from OpenBSD 4.3 -> OpenBSD 4.5 at the same time.

Also, it's time to finally get the workstations on to lenny - as they're all NFS root, it becomes slightly tricky to get the setup just right for them... hopefully we can start rolling it out to the developers early next week, and then we should be in business...

Posted: 2009-06-05 12:50 in Work | permalink

Another day, another fab evening!

So, was supposed to end up in Hector's House playing pool with various people that I know, but all of 'em were out last night (erm, half of 'em with me) and didn't quite manage to make it... So after an hour of waiting for people to turn up I gave up and considered going back to my "local" (the hop poles) to have a swift beer or three... instead, it being a wednesday, and knowing that Band Aids was on at the Pav Tav, I wandered there... managed to get there before the first band played - they were Vier and were absolutely bloody fantastic. Stayed and watched/danced to the other 3 bands and all was well with the world.

Now it's time for the sleep and the getting everything else ready for the big move on Friday (yay for working Good Friday... or something!)

Posted: 2009-04-09 00:15 in Life, and Work | permalink

New Website Design...

It's been a long long time since I last posted anything at all, so this is a post to warn of impending doom. I've switched from a static html website (well, it was statically generated when I edited source files I then ran a bash script that fired off a perl script several times...) to a fully dynamic, django 1.0 backed website - this might mean that I manage to update things more often!

I've also taken the opportunity to convert the previous content in to ReST, so it's actually easier to edit too. There's still work to do - but it's now "good enough" to be used, and I'll split the code out in to better chunks later on.

So, anyways - that's what I've done with my day - so I expect all the aggregators to now break on the new feeds...

Posted: 2009-04-04 17:40 in Life, and Tech | permalink

More on

Just to confirm, yes, I do know of rss2email - it has the unfortunate side effect of needing an MTA configured to process the rss feeds and seperate them in to seperate maildirs, basically I wanted something that would write straight to the maildir for me because then I don't have to think about the config for the MTA on each machine that I want to use it on.

Thanks to Martin for the suggestion of pandoc, I'll take a look at that over the next few days to see if it'll make the "plain text" generation slightly neater than the current HTMLParser based code.

Posted: 2007-12-21 12:12 in Tech | permalink

I've been looking for a decent way to read rss feeds for a bit, I've finally given in to the fact that there's actually nothing about that I feel comfortable with... so, what I've started is writting a simple rss to maildir convertor (I know there's toursst, but that appears to want a galleon bookmarks file and appears to use deprecated bits of python). At the moment it is very very basic, there's still a way to go before I'll be fully happy with it, but it's much nicer being able to read rss using mutt than Yet Another Random Program, I'll be hacking up a mutt config to make it look different to e-mail later, but for now as it's still in testing phases, I'm just testing with a bog standard mutt config.

I've made the code available through a git repository that should (when DNS has finished updating) be available with a git clone git:// before that it should be available from git clone .

The HTML -> Text parser still needs some work, I'm mostly aiming for it to take HTML and generate almost OK ReST which is easier to read in a text mail client. It still needs paragraph wrapping etc, but I'll work on those over time.

If anyones interested, or wants to get involved, or has some nicer ideas for how to make it work, as always I can be contacted at :)

Posted: 2007-12-20 21:31 in Tech | permalink

Update to bpgallery

Just after having made the 1.1.0 release I discovered an annoying bug in that version that meant using caption files made it fail in new and interesting ways, I've now fixed the bug and released bpgallery 1.1.1 which fixes this.

Posted: 2007-05-14 08:32 in Tech | permalink

New bpgallery available, and xmms-scrobbler work...

I've taken over upstream development of xmms-scrobbler, it's now hosted at and has a public readonly git repository for the code. Since taking over development I've dropped a lot of the tag parsing code and replaced it with taglib, found some "interesting" locking issues and am now looking at making it so that we don't need to restart it when adding username/password. It'd also be good to get it to actually report a username/password breakage at least once rather than being totally silent about it!

In other news, I've just released a new version of bpgallery, this version adds in medium sized pages - i.e. you can have the index page, the index page links to pages that have a resized image on the page, and has next/previous links. If you also generate full sized pages then the link from the image on the medium sized page goes to the full sized page, otherwise it'll go straight to the origional image.

Also thinking about making a "client" for xmms so that I can keep all my music playing in the one place (lastfmproxy appears to have stopped working for me :/)

Posted: 2007-05-13 12:00 in Tech | permalink

Oh No! What the hell has happened to Selby?

Been watching the snooker - Selby was playing really quite well yesterday, and started the early session this morning looking promising, he seems to have lost it this evening though, which is a shame - and at 12 to 4 down starting tomorrow, he's got a hell of a lot to make up tomorrow.

Higgins isn't playing to his best, but he's being more consistent than Selby, it'll be a hell of a final if they both dig in tomorrow.

That is all.

Posted: 2007-05-06 23:14 in Life | permalink

Happy Birthday.

Happy birthday David, you old git you ;)

Posted: 2007-04-25 08:45 in Life | permalink

Stuff, potentially a bit random

So, found GlusterFS today, looks quite interesting, may have to play when I've got some spare tuits...

Also, I'm about to take over upstream development of xmms-scrobbler, so currently thinking of which revision control system to use... I'm very tempted to use tla because I know it and use it for everything else that I do, but I've been tempted by the evils that are git, hg and bzr... most likely going with tla because it makes the most sense to my often broken little mind, and I like the abrowse command rather too much :)

What else? Probably lots of stuff, oh, looking for a nice multiple project group type build daemon - we've got 4 main branches of a piece of software at work, and packages should be auto built for each of the branches on a commit (ish) - we're currently running 4 copies of cruise control to build the debian packages, that's a little bit on the heavy side, though - and all it'd need to make it actually work for me would be to have a project group config option, so you can assign a number of processes per project group... but it doesn't have that - I just discovered CruiseControl.rb, which is a bit lighter, but it's still not quite what I'm after. May end up writting a small python buildd to deal with it instead, and hook it in to the svn repository with some post commit hooks.

Also got a whole lot of Nagios configuration to finish off to monitor a bunch of servers.

So, that's a small brain dump... more when I remember what the hell it was that I was supposed to be doing - been a hectic day!

Posted: 2007-04-19 17:56 in Tech | permalink

Oh Noes! This means lots of work!

Debian GNU/Linux 4.0 has been released - congratulations to all those involved in the release process, you've all done a fantastic job (as always ;). Now I've just got to test the upgrade for the NFS root desktop machines at work (that's going to be sooo much fun!) and make sure that nothing obvious breaks - I'm not expecting many problems, it should go quite smoothly (probably!).

Might also use the "official" non-free packages for the sun j2sdk rather than using java-package, haven't decided yet (and actually, as we also use sun-j2sdk1.4, I'm going to have to use java-package for that anyways!).

Hmmm, I suppose I should update all of my various build chroots and set up all the scripts that I'm going to need also - feh - that can wait for a bit.

Ahh - and I'm going to need to compile an etch version of ion3 from unstable, can't be having my workstation running one of those dodgy window managers that makes it almost impossible to get anything done without using the mouse, afterall!

Right - anyways - I think I shall just go faint, that was far too quick between sarge and etch!

Posted: 2007-04-08 14:40 in Tech | permalink

Of remote controlled aircraft...

Holger, Don't be silly!, of course computers are 100% secure, and they'd (of course) use very stringent access methods to the system... you know, something like telnet with a banner saying "please don't hax0r us, we will trace you and sue you" or something ;)

Posted: 2007-03-08 16:00 in Random | permalink

Of CGI Scripts and Line Endings

MJ Ray said in Bad Tech: CGI Scripts and Line Endings:

Problem: CGI scripts uploaded with the MS Windows version of FileZilla over SFTP don't work until converted. Either there's some FileZilla settings wrong by default, or it just doesn't work.

The problem is that unlike with traditional FTP, which in ASCII mode would automagically translate line endings in to a sane format, SFTP (as far as I can tell) will always send them as binary, and thus if they were in DOS format before the transfer, they'll be in DOS format after the transfer. So, your choices are (other than the evil perl^M symlink)...

Teach users about line endings - get them to do the equivalent of a :set fileformat=unix in vim before saving ;) (I'm not sure which editors out there let you set what line endings to use - might be worth finding out what the users use and looking it up)

When they upload, rather than them uploading directly in to FTP space it hits an area that is checked every x minutes - that area is then copied to the right area with the transformation being done server side

Something else.

Posted: 2007-03-03 09:52 in Tech | permalink

Pages: Previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Next