Search Results: "cklin"

1 July 2008

Decklin Foster: Did you see what he was wearing? Oh. My. God.

Debian shall soon have a Conkeror package, thanks to Axel Beckert who takes a minute to break down the current keymap. Naturally, you have to poke fun at vi users here. But wait! I am a vi user! What can I say, except maybe
  1. Emacs (the rudiments, anyway) is like riding a bicycle
  2. When I say vi, i mean vile, not vim. vim gives me hives. vile is teh awesome.
I am working on a set of vile-ish bindings, and I can't say I feel any pressing need to stick hjkl in. You could start from there, but that's missing the point, I think. (You know what's also awesome? My email is still down, so I won't even have to delete flames from people who take their choice of editor/browser Very Seriously until sometime tomorrow.)

Axel Beckert: Conkeror in the Debian NEW queue

I already mentioned a few times in the blog that I’m working on a Debian package of the Conkeror web browser. And now, after a lot of fine-tuning (and I still further new ideas how to improve the package ;-) Conkeror is finally in the NEW queue and hopefully will hit unstable in a few days. (Update Thursday, 03-Jul-2008, 18:13 CEST: The package has been accepted by Jörg and should be included on most architectures in tonight’s updates.) Those who could hardly await it can fetch Conkeror .debs from http://noone.org/debian/. The conkeror package itself is a non-architecture specific package (but needs xulrunner-1.9 to be available), and its small C-written helper program spawn-process-helper is available as package conkeror-spawn-process-helper for i386, amd64, sparc, alpha, powerpc, kfreebsd-i386 and kfreebsd-amd64. There are no backported packages for Etch available, though, since I don’t know of anyone yet, who has successfully backported xulrunner-1.9 to Etch. Interestingly the interest in Conkeror seems to have risen in the Debian community independently of its Debian packaging. Luca Capello, who sponsored the upload of my Conkeror package, pointed me to two blog post on Planet Debian, written by people being fed up with Firefox 3 already and are looking for a more lean, but still Gecko based web browser: Decklin Foster is fed up with Firefox’ -eh- Iceweasel’s arrogance and MJ Ray is fed up with Firefox 3 and its SSL problems. Since my previously favourited Gecko based web browser Kazehakase never became really stable but instead became slow and leaking memory (and therefore not much better than Firefox 2), I can imagine that it’s no more an candidate for people seaking for a lean and fast web browser. Conkeror has some “strange” concepts of which the primary one is that it looks and feels like Emacs: Footnotes *) I just noticed that there is now also muttator, making Thunderbird look and behave like vim (and probably also mutt), too. Wonder into which e-mail client the Emacs community will convert Thunderbird. GNUS? RMAIL? VM? Wanderslust? What will it be called? Wunderbird? Thunderslust? (SCNRE ;-)

30 June 2008

Decklin Foster: Consolation Prize

I spent some time banging my head against SSL certificate stuff this weekend in the hopes of implementing a Really Awesome Solution to this awful Firefox security theater thing everyone was complaining about, but I didn't get anywhere. However, I noticed something interesting: Mozilla does not trust the CAcert root certificate. A number of useful sites, like Freedesktop.org's bug tracker, use a CAcert-signed certificate rather than a self-signed one. I really know nothing about this organization, but they seem to have their stuff together, and if you run a largish free software project, you could potentially save a lot of people the trouble of checking yet another self-signing CA. Around the lab, or in one of my tiny projects, I don't think I'd bother, but it is free. Anyway, we ship their root CA thing in Debian, and OpenSSL stuff picks it up fine. Mozilla's process is somewhat more mysterious. There's an apparently hardcoded list of the usual thugs from the Verisign/Thawte/etc protection racket, and then there's a database in each user profile for whack-a-mole stuff. There is not, shockingly enough, somewhere for an operating system to set system certificate policy. (I guess there is not much room for an operating system in the Mozilla world-view at all). So you have to shove it in there once for every user times every single profile. Here is the command to do it.
  1. apt-get install libnss3-tools
  2. certutil -d $HOME/.mozilla/firefox/$HLAGHLLAGHGAAHLGALHHGHLAGH.default -A -n 'CA Cert Signing Authority - Root CA' -t CT,C,C -i /etc/ssl/certs/root.pem
It's only slight pain relief, but it's something. You can also not install certutil, and click through ten million dialog boxes to import it, but screw that. UPDATE: A commenter points me to StartSSL, another service that may deserve a look here, and is on Mozilla's good side. It appears to be an unholy mix of things that sound awesome (client-side certs for OpenID, web-of-trust identification) and things that seriously skeeve me out (trademark symbols everywhere, Aladdin dongles). They, uh, also have a Linux distribution. No, really. UPDATE 2: James Andrewartha points out that we should eventually see Mozilla move this stuff out of libnssckbi.so and into SQLite, which sounds like a big win for us. Hopefully before that time I will figure out how to get sqlite(1) to work on my cookies.

Decklin Foster: You keep using that word. I do not think it means what you think it means.

I always feel like tar ought to say:
tar: data.tar.gz: inconceivable time stamp 1969-12-31 19:00:00
But it never does.

26 June 2008

Decklin Foster: The data are

So I always knew that my ThinkPad's display sucked. But now I have scientific proof! (Long-winded post about my job follows.) I was running some timing tests at work on the code for a psychology experiment. This involves quickly presenting a stimulus to the subject, then measuring reaction time and synchronizing with EEG readings. Nothing very complicated, but accurate timing is essential; you don't want another variable confounding your results. So I have this photocell device that sends a signal to a Mac through the EEG hardware when there is really actually physical light coming off of the screen, not just when I told the computer to display something. Now CRTs, of course, are actually scanning (with an electron gun) the display at 75 or 85 Hz or something, not constantly pumping out light to the whole screen. This means 12 or 13 (or whatever) ms between refreshes. So if you want something to appear for 100 ms, you have to fudge a little, and make it so that you get maybe 8 or 9 scans. You can synchronize your presentation to the refresh so this is feasible. But how long the subject really perceives it ultimately depends on how "flickery" the monitor is at a given refresh rate. LCDs, on the other hand, do not have this problem. They actually do produce light constantly -- their refresh rate is pretty much always only 60 Hz or less, but you get the same(ish) output over the entire cycle, instead of in blips that give the illusion of a constant image (in fact, as Matthew points out, they can continue to hold the same image for even longer periods between refreshes. Can't wait to try out that patch). And luckily for us, 6 cycles are in theory exactly 100 ms (in practice, it's close enough). Or so I thought. I could not, no matter how many times I banged my head against it, get consistent results between our laptop (also a ThinkPad) and any external display. For reasons I do not entirely understand (probably scheduling issues), on CRTs I was getting one extra cycle, so I had to reduce the time by one to compensate. This was done for published studies years before I arrived at the lab, so (for the sake of not introducing additional variables) there is an extremely large disincentive to go back and fix it the Right Way, whatever that is. Our laptop's internal display was producing results that were skewed like those of a CRT. I thought for a minute I was going nuts from testing all day, but it kept happening. Curious, I swapped out the lab's T60 for my faster T61 and (to rule anything else out) killed all my other processes and wrote a fresh PyEPL script that did nothing but repeatedly blink some text for 100 ms. Here is, on the external VGA port, a cheap old 15" Dell LCD I pulled from the server room: http://www.rupamsunyata.org/~decklin/blogfiles/20080626/vga-lcd.png (These images are from the Mac, which is still using System 9.something. I had to remember Command-Shift-3 to take a screenshot and use StuffIt to get them off of it. Srsly. I can't remember the last time I used StuffIt.) And here is a CRT, showing the refreshes: (The DIN3 line is the actual signal, and the others are integrated over some number of milliseconds to compensate for scanning and attempt to get a usable number. Of course, this is done in hardware, not synchronized to anything else.) http://www.rupamsunyata.org/~decklin/blogfiles/20080626/vga-crt.png Now, this is the one that blew my mind. The ThinkPad's internal LCD: http://www.rupamsunyata.org/~decklin/blogfiles/20080626/lvds-lcd.png You can see that 60 Hz is spaced much farther apart, and that there are 6 cycles as intended, but. It's acting like a CRT! On the refresh, it puts out enough light to trigger the photocell, but inbetween, nothing. I ought to be noticing flicker and/or getting headaches all the time, if this is truly the case. (I guess I did get glasses for and because of staring at computer displays all the time. Should update my hackergotchi.) I have to admit I do not understand what is going on here at all. But it seems like making any assumptions about a display is (as the voice in my head was telling me all along) a very bad idea. Perhaps someone can email me some clue. But at least I have some hard data to validate my subjective opinion of the ThinkPad's internal LCD. Anyway: I still recommend the ThinkPad, even if the display is awful. I have a nice external monitor connected through DVI to the dock at home, and I mainly use a laptop so I can get out of the house and go hack outside or in a coffeeshop (not ideal lighting). The build quality, keyboard/trackpoint, performance, and the fact that Debian (testing or unstable, anyway) Just Works are all higher up on the list for me. I do wish I could afford the new lighter one, though.

25 June 2008

Decklin Foster: Arrogance

Today, like any other day, I started Firefo^WIceweasel. I mapped it at the bottom of my window stack. It promptly raised itself. I closed everything and tried opening a new homepage. Nope, that's fine. I tried again with two tabs saved. It raised itself again. I have been watching variations of this bug regress for eight years now and I am tired of it. So I installed Conkeror. After a good three-year run of being able to sit down at someone else's random PC and say, "hey, a web browser that nearly works as well as mine" (since it is, you know, the same one), I look forward to being utterly fed up with how primitive the rest of the world is again. And what are we in this for, if not that?

17 June 2008

Decklin Foster: Dealing with it

I had this crazy idea a few months ago which Joey's post about muscle memory reminded me of. For those not in the US, our keyboards have and ~ on the key to the left of 1. I prefer this key to be Esc. Long ago I simply swapped the two keys, but the original "Esc" key is always in some weird and inconsistent place and reaching for ~ became as annoying as reaching for Esc. (I suppose I might not care if I didn't use a unix shell or regular expressions or bit masks or...) So, noting that I mostly only wanted that key for ~, and not , I came up with the following (in xmodmap form):
keycode 49 = Escape asciitilde grave Escape
This means: if you just hit the key, it does the Right Thing (Esc, as if I were on a real unixy keyboard). If you hold Shift and press the key, it also does the Right Thing (~, as if I were on a PC). But what to do about , or Shift-Esc, which are no longer possible? We make them the alternate graphs (just old down AltGr. I think the xkb option to put this on right Alt is "grp:switch"). I honestly use those two infrequently enough that I don't care about having to remember the extra bucky. (I tend to type $(cmd) in the shell, and not cmd , because I use the former in scripts and I always found the latter harder to read. I suppose I would care more if I used Lisp or Haskell or...) What I like most about this solution is that it lets me use the same muscle memory on all my hardware. Never mind weird Esc positions; laptop vendors still can't agree on the correct order of Fn and Control. But you don't have to care if you put Control on Caps Lock. Same idea. It does feel a bit like cheating, but it has made my wrists far more comfortable. Oh, and to wean myself off the key way out in the corner:
keycode 9 = NoSymbol
Now the question, of course (getting back to Joey), is what would happen if my "new" Escape key broke. I guess I'd have to keep the laptop at home and plug in my Happy Hacking Keyboard :-)

10 June 2008

Adeodato Sim : Five films (#2)

It’s time for recommending five films again. I’ve also decided that I may reserve the last of the five for films I watched prior to starting these series. So here we go:

9 June 2008

David Welton: Startups: government help and hindrance

Aaron Swartz writes about what government might do to encourage entrepreneurship: http://www.aaronsw.com/weblog/prostartup As an American who has lived in Europe for a while, I've seen both sides of the coin (or pond, as it were), and feel qualified to add a few things to the conversation, even if many of these points merit a discussion of their own. And here are some thoughts of my own: I think it's best to focus on the startup "curve", and costs associated with various points on it: when people are just getting started, keep state-imposed costs low. If someone makes a lot of money, worry about taxing it then. This is quite different than what has previously been the norm in many places in Europe, which have policies akin to slaughtering the goose before it lays any eggs, let alone golden ones. Italy is a particularly bad example, but it's the place I know best, and not too far off what happens elsewhere in terms of policy: fixed, sunk, startup costs are in the order of 10,000 Euro, which for most people is a lot of money. This creates a bias towards people who already have a lot of money, and away from random people who happen to have good ideas and a strong desire to execute on them. This is something that the US more or less gets right: it cost me $55 in state fees to start DedaSys LLC as a limited liability company (even throwing in money for lawyers and the like, you're still far under the thousands it costs in many European countries). Incidentally, it looks like Germany may be on the right track, if you look at the "Mini-GmbH" mentioned in the article. It's progress, if nothing else. Beyond that, there is a lot more red tape in Europe, and that, I think, rather than a bit higher taxes for companies that are profitable, is the thing that, outside of culture, probably weighs most heavily on European startups. Culture, however, is also a very key factor, and not something that will change soon or easily. In Italy, there's a lot of pressure to land a permanent job, from which you can basically never be fired. The idea of striking out on your own is probably simply not on most people's radar screens. I think culture is what means that Europe produces tons of great open source software, for example, but relatively fewer startups (if you're just counting open source startups though, Europe does ok). Perhaps this is slowly changing, but it will take a while, and without some policy changes, the incentives won't even materialize. Returning to things that government can do, something critical that many people don't get is that government funded startups are usually big failures (see the French "Google competitor") and a big waste of money that would probably simply be better to spend in lowering taxes, improving education, or other "level playing field" initiatives, rather than having government employees attempting to "pick winners". This is a common problem in Europe, but also in many areas of the US that want to replicate Silicon Valley's success. Going back to the US, which was Aaron's original point of focus, beyond health care, what could the US improve? At the moment, immigration seems to be the big problem: people from all over the world want to go to the US to work and start companies, but look at what kinds of hoops someone (who is coming to spend money and create jobs!) has to jump through to do so: http://www.techcrunch.com/2008/05/02/coming-to-america-getting-visas-to-do-business-in-silicon-valley/ Embarrassing and shameful. In conclusion, I think the common theme is that the government can't really do much to actively promote startups, but can certainly hinder them by setting too high a bar in terms of bureaucracy and fixed costs. Lowering those fixed costs for new companies, be it through at least basic health care for everyone, or lower taxes and less paperwork should be what governments aim for. Given the right conditions and incentives, bright, hard workers will do the rest.

7 June 2008

Jeff Bailey: Oil, Technology, Inevitability

So apparently we hit $138/barrel on oil futures on Friday. Reading a CBC Post on the subject I think there are a couple interesting quotes:
Matt Simmons, chairman of an energy financing company in Houston, believes oil prices are still too low. He told CBC News there are "very strong signs" that the global supply of crude oil has leveled out and is probably now in a gentle decline.
Simmons said he finds it interesting that so many people blame speculators and a weak U.S. dollar for rising prices. "These same lame excuses have been going on for the last nine years, since [the price of oil] has gone up 13-fold," he said
I commented earlier that I'm looking forward to $10/litre (The CBC article shows petrol in Montr al at $1.40). A number of commenters brought up economic accessibility - which is a real concern. So, dear lazyweb: I remember seeing once that there were orgs doing carbon offsets by going into low-income areas and doing volunteer work on houses to fix up insulation, replace aging furnaces and major appliances. I haven't been able to find a reference to it again, though. Given that $10/litre seems inevitable (Heya Brits! Any of you still driving cars at ~ 1.15 according to the Daily Mail), what do we do to prepare for it? We got Angie's bike up and running yesterday, and she went to her day's visits that way. I'm finally cleared to ride a bike, but am not yet up to tackling Rengstorff. I'm practicing by biking around the campus at work and getting used to the changes in my body. The biggest disappointment in going back to Vancouver is just the apathy about smog and fuel consumption there. We saw a total of 2 Prius' (Prii?) on the road across the entire 12 days versus a half-dozen Hummers. I remember in the early 90's being downtown and everyone being shocked when there was a bit of brown haze in the air around the Sears Tower (Sorry, I can never remember WTH it's called now). Now the city is not only permanently like that, but people just expect it to get worse without any real feeling that they could do anything about it. I find myself starting to think again about hacking and what differences I can make. It's unexpected but logical that efficiency results in greater consumption: You can afford to do more, and have time to do more. Is the trick, then, to develop something efficient that takes up time? (Should I work on a text adventure?) Or perhaps the answer is to get away from computers for entertainment. Jim Morrison (Phython) and I have been talking about taking up bagpipes as a fun pre-work activity in the field by the office. But now he's moved to the San Francisco office. Anyone else at in Mountain View interested? =)

30 May 2008

Steve McIntyre: The Model M is not dead!

It seems that the good folks at Unicomp are still making proper buckling-spring keyboards, now even with a USB connector. Phew! I was worried that I'd be forced to move away from my nice clicky Model M at some point soon, as PCs are slowly losing PS/2 ports.

27 May 2008

John Goerzen: Jacob Update

It's ben a little while since I wrote about Jacob. He's about 20 months old now.

For awhile, he was on a whole hugging spree. He wanted to hug anything happy. It could be me, a stuffed animal, a rock, or even a book. To hug something, Jacob holds it up to his cheek, leans his head over onto it, and says "Awwww". Very cute!

Then he started saying "hi" to things. He'd greet people, toys, rocks... Seeing a pattern here?

Lately he likes to say "bye". He gets a big smile when he says bye to someone and they wave and say bye back to him. As I leave for work in the morning (on the days when I don't take him to daycare), I'll say bye to Jacob. He will keep saying bye to me, smiling all the while, as long as he can.

Last weekend, we had some heavy rains here. I had the idea that Jacob would love to play in the water puddles left on our driveway. Terah wasn't so sure, but we got Jacob dressed in old clothes and took him outside. He loved to run through the puddles, splashing water as high as he could, cackling the whole time. Then I showed him how he could throw a rock into a puddle and make it splash. So, he would run through a puddle, then carefully select a rock, run to the next puddle, throw the rock in, splash through, and repeat. He'd always want the rock first.

I knew when he was done playing because he said "bye" to the water puddles.

16 May 2008

Kapil Paranjape: Computers and I

This post is to some extent a fall-out of the recent discovery of a serious flaw in Debian's openssl and openssh packages. However, as Raghavan will confirm, a weaker version of what is said below was part of our discussion two weeks ago. Moreover, there are earlier posts on this topic in this blog.There are times when I wonder why I am so involved with computers ... this is clearly one of those times.
कर्मण्यैवाधिकरस्ते मा फलेशु कदाचनkarmaNyaivaadhikaraste maa faleshu kadaachana
This is a phrase from the भगवद गीत (bhagavad giit) which has been stuck in my head for the last 30 odd years. It roughly paraphrases into
Do something because you think it is worth doing not because of what you hope to achieve by doing it.1
The above maxim is a good one but is sometimes a cop-out. Moreover, it provides no basis for actually making ethical choices.Ethics comes from one's interactions with the communities one is a part of. There are (roughly) two communities that I am a part of in the context of computers:I take these in turn below.

Debian and FOSS communitiesBy its own standards, the Debian community has suffered a massive failure ... and by these same standards it has reacted extremely well to this failure.I feel shame and blame. Why have I been ignoring RFH#332498 all these days when it shows up in the output of wnpp-alert? Here I am, a mathematician with some understanding of the issues, not helping out! Three years ago I even gave a short course of lectures on implementations of crypto; the source of openssl and openssh were used as examples. Excuses like, "I don't know anything about library packaging" and "I need more time!" (who doesn't) seem too weak now.At the same time, I feel a sense of solidarity with the Debian (and more widely FOSS) community as it tries to pull out of the resulting mess. The resilience that allows us to laugh wryly at ourselves is IMHO admirable.As Steve Kemp wrote: "[When we look back we will see that] we did good".

IMSc computer communityThe IMSc computer setup was built by volunteers and was genuinely a community when I joined this institute in 1996. It has since then broken into users, system administrators and the computer committee. As Indira Gandhi would have said: "This is a world-wide phenomenon", and as was the case when she said it, my response is: "That doesn't make it a good thing!"
When I speak about this fractured IMSc community below it is in generalities. There are certainly individuals who rise above the shards.
I have been promoting the use of FOSS and more specifically Debian at IMSc ever since I got here. While explaining the pragmatic aspects like cost and security, I have also tried to emphasize the freedom and community aspects of FOSS use. When the latter are not understood or accepted, the former are easily blown away.This year I made an attempt to get the Computer Committee to invite users to choose2 their own computers and the software that ran on it, but it turned out that no one really wanted this. Users just wanted to buy "fancy toys", the administrators just wanted to make their life simple and CC members just wanted the power to dictate what people bought.3I also made an attempt to get our users to educate each other on the use of computers for their work --- first through the establishment of a wiki and then through the "No-Excuse" mailing list.4Unfortunately, the fractured IMSc computer community sees computers and software as expensive commodities --- with some combination of fear, greed and irritation. In any case, there is no feeling of being part of a larger community that is trying to solve (certain types of) problems.

A wise man once said:

With great freedom comes even greater responsibility.
This may explain why we prefer being dictated to by proprietary vendors and computer committees that "buy stuff for us". We are afraid of the responsibility that comes with freedom.Another much quoted quote is:
If you are not part of the solution then you are part of the problem.
The FOSS community (actively) invites people to join-in in solving problems. This participation (which can be at a level of one's own choosing) is the source of one's freedom in free software. The IMSc community just wants मा-बाप सर्कार (maa-baap sarkaar) to fix their toys.

A decisionThe IMSc computer community was tied to Debian and FOSS after the break-ins into our system in the early 2000's. At that point, I was instrumental in installing a security infrastructure based mainly on Debian. This led to my greater involvement with FOSS and Debian and also to the greater "infiltration" of Debian and FOSS into IMSc computers.From the "commodity" point of view at IMSc we have come a full circle since most users will have to "do a lot" so that the IMSc computer LAN emerges unscathed from the crisis created by the Debian openssl flaw.From the "community" point of view at Debian we have spiralled out and even this major whirlpool will not drag us back in.It is no longer possible (for me) to straddle the circle and the spiral in an attempt to widen the former; I'm taking the "outward radial vector"!

  1. To this sentiment I have often added "do it because it's fun". ↩
  2. ... and be willing to justify their choices of course.[WGFCEGR] ↩
  3. OK! I'm exaggerating a bit! ↩
  4. No-Excuse is an acronym for Novice and Expert Computer Users. The blurb says:
    Now that this list exists there is "no-excuse" for novices to remain in-experienced or for experienced users to claim that something is "too hard to explain to a novice"!
    ↩

15 May 2008

Kapil Paranjape: Converting keys between SSH and SSL

How does one convert between SSH keys and SSL keys?
Let us first divide the problem into two parts.

Private Key availableThe simpler case is when you have the private key. In this case, SSH private key is in fact the same as an SSL key. If the key was generated using ssh-keygen -t rsa then it is a 2048-bit RSA private key for SSL.It follows that it rather trivial to extract an SSH public key from an SSL private key. You just run
ssh-keygen -f private_key_file -y > ssh.pub
This will prompt you for a password if your key is kept encrypted as it should be. The ssh.pub file contains the SSH public key.It is similarly easy to extract the SSL public key from an SSH private key.
openssl rsa -in private_key_file -pubout -out ssl.pub
will create ssl.pub containing the SSL public key.

Private Key un-availableThe more difficult case is when you only have the SSH public key or an SSL certificate. In this case one should be able to extract the SSL public key from the SSL certificate and interchange between the SSL and SSH public keys.The extraction of the public key from the SSL certificate is achieved by the command1
openssl x509 -in cert_file -pubkey -noout > ssl.pub
which extracts the public key from the SSL certificate.

The MessThe second part, i. e. converting between SSH and SSL public keys, has a rather tortuous route given that the data contained in the public keys is the same!First of all one needs some somewhat un-common utilities (which are currently only in sid on Debian)
apt-get install lsh-utils 
This pulls in the nettle-bin package which also contains some useful programs. So one can run
ssh-conv < ssh.pub   sexp-conv 
To get a look at the "real stuff" inside the SSH public key.If ssl.pub and ssh.pub refer to the same key then you will see that the output of
ssh-conv < ssh.pub   sexp-conv -s hex
and
openssl rsa -in ssl.pub -pubin -noout -text
are entirely similar and clearly inter-convertible. The same applies to DSA keys with the openssl rsa replaced by openssl dsa in the command above.One could easily write a script that would massage one of these text formats into the other. Luckily, someone did it for us. So we run
sed -e'1d' -e'$d' < /tmp/test.pub   \
 pkcs1-conv --public-key-info --base-64   \
 sexp-conv   \
 sed -e'1s/(rsa/(rsa-pkcs1-sha1/'   \
 sexp-conv -s transport
The output of this is identical to the output of
ssh-conv < ssh.pub   sexp-conv -s transport
Hence, we have reached the point of convertibility! The full pipeline is
sed -e'1d' -e'$d' \< ssl.pub   \
 pkcs1-conv --public-key-info --base-64   \
 sexp-conv   \
 sed -e'1s/(rsa/(rsa-pkcs1-sha1/'   \
 sexp-conv -s transport   \
     lsh-export-key --openssh > newssh.pub

ConclusionHaving got this far the reader may be wondering what the purpose of this (lack of) exercise is --- other than writing complex pipelines instead of real code.
Answer:
Since you can now convert certificates into SSH public keys you can check these certificates against the SSH public keys that became bad as a consequence of the recent fiasco.Moreover, to do this you do not need to have access to the private keys of the certificates.
So help out a friend by checking whether their SSL certificate is based on a weak key. However, note that the above procedure doesn't work for DSA keys. In addition, the publicly available tests for bad keys do not work with 1024-bit RSA keys. If your friend has been using the letter type of keys on a Debian "etch" system then you should advise them to change keys anyway (and switch to 2048-bit RSA in the process).

  1. Locating this command took a bit of effort since the -pubkey option to x509 is not documented on its man-page. Rather it is documented on the rsautl man-page. (See: Debian Bug #291095). ↩

12 May 2008

Kapil Paranjape: Recovering from a corrupted flash on Debian SLUG

My slug was temporarily bricked for a few days due to a mistake on my part. Fortunately, numerous write-ups by Martin Michlmayr and others helped me. Here I am adding one more source of the same information!The following assumes that you have a backup.img which contains bootable Debian firmware for the slug but has the wrong kernel and initrd. One can probably use the Debian firmware that is the Debian Installer image otherwise --- but I have not tested this!Moreover, I also assume that you have the full system installed on a USB disk which you have mounted on your regular desktop at /mnt.

Copy the kernel and initrdWe just create an new "recovery" directory and copy boot/ over from the mounted USB disk.
mkdir recover; cd recover
cp -a /mnt/boot .
At this point you can un-mount the USB disk and keep it ready to connect it to the slug.

Extract the files from the slug imageNext we extract the files from the slug backup image into another directory.
mkdir files; cd files
slugimage -u -i ../../backup.img
(Here you must use the actual path to the backup image file)

Replace initrd and vmlinuz by new onesWe first pad the initrd
dd if=../boot/initrd.img of=new-ramdisk ibs=4M conv=sync
(here you must you the actual file name of the initrd.img that you want to use to boot the slug) ... and then swap bytes
devio '<< new-ramdisk; xp $ 4' > ramdisk.gz 
rm new-ramdisk 
Next we swap bytes for the kernel as well
devio '<< ../boot/vmlinuz; xp $4' > vmlinuz 
(again you must use the actual file name of the kernel image in place of ../boot/vmlinuz above).

Actually build the imageThis is just a single command
slugimage -L apex.bin -r ramdisk.gz -k vmlinuz -p -o ../../new.img

Put the slug in "firmware upload mode"
  1. Put the slug off and disconnect everything from it.
  2. Connect an ethernet cable 1 between your desktop and the slug. Connect the power plug for the slug but do not switch it on yet.
  3. Push a pin into the hole marked RESET at the back of the slub. Keep the pin pressed, while pressing and releasing the power button on the slug. Wait with the pin pressed until the top light on the slug turns red and the instantly release the pin.
You slug is now reset and waiting for a firmware upload.

Upload the firmwareOn your desktop run the command
sudo upslug2 -i ../../new.img -d eth0
(Here ../../new.img should be replaced by the path for the image created above and eth0 should be the name of the ethernet interface on the desktop to which you connected the other end of your lan cable.)This step takes a short while but shows you some progress information.

All systems "Go!"If all went well you have rejuvenated your slug. You can now reconnect your USB disk to your slug and the system should boot as usual.

  1. You may need a cross-over cable if your desktop lan card is really old. ↩

8 May 2008

Kapil Paranjape: A spot of "enabling"

Helping a user run GNU/Linux programs on a proprietary system when one knows that the user has no intention of switching to the use of a free system is generally a bad idea. It is sometimes called "enabling" and is generally considered a waste of one's time.All the same, there are situations when one is faced with a Mac1 with strict instructions not to reboot or otherwise "disturb" the existing system.The news in brief is:
Debian Etch runs with Xorg (vesa driver) under Parallels.
It installs using "mini.iso" for network based install.
Using this one can run all the GNU/Linux programs one needs. It "disturbs" the existing system less than things like "fink" or "MacPorts".Another alternative is "VirtualBox" from Sun which is free for educational use (and has an "Open Source Edition" too!).QEMU offers yet another alternative. Since it emulates all the hardware it is significantly slower. However, on current hardware, the speed will be more than adequate if you just want to use standard desktop tools from GNU/Linux.
Pros
1. Applications run in the environment they were designed for.
2. Speed is "native" for running computational code as there
   is no emulation going on for this part.
3. X applications work in full screen mode.
4. Full networking support.
Cons
1. Can only run in 32-bit mode.
2. Currently runs X in "vesa" modes so you don't have
   accelerated graphics.
3. Some keys like F10 and Ctrl+Alt Alt+Enter are trapped by
   MacOS so you may have to remap these keys if your application
   uses them. (For example, Ctrl+T instead of F10 for aptitude).
4. Possible delay in disk access since parallels provides an
   "emulated disk".
Not yet tried
1. Sharing files (Samba/NFS/SSHfs?)

  1. Also known as Macintrash. ↩

18 April 2008

MJ Ray: Explaining web site improvements: what's important to you?

[Photo of Some Traffic]
Is this traffic or congestion? This is one of those Friday Afternoon Projects - it's been put off all through a busy week because it's unpaid, I'm not completely sure how to approach it and now my arms hurt like hell from travel jabs which are making it hard to concentrate! So I'm going to float it on here... I've been asked to brief a meeting next week about that group's current web site and its problems. I'm not linking it yet to avoid insulting/embarrassing them. The site looks OK, but doesn't rank well on search engines and doesn't allow much member participation. I need to explain why that's a bad thing and how the site's technical choices have led to that. I'm not directly pitching for TTLLP to get any work (because I'm a member of that group, it might be a conflict of interest and we're pretty busy anyway - even our own site needs work on some of the points I'm going to mention), but I don't want to be unhappy if we're asked to implement my recommendations. I've got a usual outline that I follow, but my presentation's time is limited, so I'd like to ask you: what about this is important and what isn't? If you give me useful feedback, I'll put you in the Acknowledgements with a backlink and I hope the briefing will be shared pretty widely over the next few months. The current plan is to start with a basic explanation of how search engines rank pages, as far as we can tell, referring to PageRank Explained Correctly with Examples, by Ian Rogers as well as the shorter official summaries from the dominant search sites at Yahoo, Microsoft and Google. Then I go through a quick evaluation of the site against the basics of validation, accessibility and robot-friendliness, followed by a couple of SEO-style checks of its current rankings and inbound links. Next is a bit different because I have access to some of their web access stats: I summarise what we know and suggest some other stats they've probably not considered and why they're useful, along the lines of Dave Briggs's measures of blog success. Finally, I suggest ways to improve the site. The top tip will be to take control of the site hosting and stop using the cheap and cheerful donated server that makes all links except the front page point to another domain. I'll probably suggest a mix of free and open source software tools to power it. If they don't want to move it all yet, I'll suggest running a second site for member participation, using tools like Wordpress, NoseRub and so on. What do you think? Plan for success, am I missing some tricks, or am I setting myself up for a lynching? Let me know with a comment or email, please.

9 April 2008

Christian Perrier: News from the lenny l10n NMU campaign

The lenny l10n NMU campaign is now running for about two months now. The objectives of this campaign are tackling pending po-debconf l10n bugs. The process is the following: Of course, when the maintainer wants to upload him herself, I immediately stop any action....but I still watch what happens and I nag her him in case nothing happens. In short, you can escape from my trap once I got you! Status as of now: A few utterly outdated and obsolete packages have also been removed fro mthe archive. All this helped the statistics for many languages to raise up. However, thanks to the effort of many maintainers who invest a lot of energy in emptying down the bottle we're filling up, the top languages statistics don't really move (new debconf templates, modified ones, etc.) With the lenny release becoming closer, I expect package maintainers to calm down now and leave us the opportunity to completee our l10n work without moving the target away when we reach it. The closer the release, the more aggressive l10n NMUs will be. Even for recent bug reports. Those translation issues are the easiest ones to fix, so please fix them. Please also note that I'll very happily sponsor any non DD upload which just fixes l10n issues.

28 March 2008

Matthew Garrett

Ext JS is some sort of Javascript framework stuff. I know nothing whatsoever about Javascript, but what interested me was the slightly odd license. If you're a non-profit you can have it under the LGPL 3.0, but if you want to use it in a library then you have to buy a commercial license for them. This seems at odds with my understanding of the LGPL, but anyway. I'm a non-profit, so I've downloaded it under the LGPL. Under my LGPL rights, I've put it up for download here. If you want to use it in a library, feel free to do so as long as you abide by version 3.0 of the LGPL.

Thanks to Decklin for pointing this out.

Decklin Foster: Section Twelve

Doing. It. Wrong.

Next.

Previous.