Petter Reinholdtsen: How to find a browser plugin supporting a given MIME type
Some times I try to figure out which Iceweasel browser plugin to
install to get support for a given MIME type. Thanks to
specifications
done by Ubuntu and Mozilla, it is possible to do this in Debian.
Unfortunately, not very many packages provide the needed meta
information, Anyway, here is a small script to look up all browser
plugin packages announcing ther MIME support using this specification:
#!/usr/bin/python
import sys
import apt
def pkgs_handling_mimetype(mimetype):
cache = apt.Cache()
cache.open(None)
thepkgs = []
for pkg in cache:
version = pkg.candidate
if version is None:
version = pkg.installed
if version is None:
continue
record = version.record
if not record.has_key('Npp-MimeType'):
continue
mime_types = record['Npp-MimeType'].split(',')
for t in mime_types:
t = t.rstrip().strip()
if t == mimetype:
thepkgs.append(pkg.name)
return thepkgs
mimetype = "audio/ogg"
if 1 < len(sys.argv):
mimetype = sys.argv[1]
print "Browser plugin packages supporting %s:" % mimetype
for pkg in pkgs_handling_mimetype(mimetype):
print " %s" %pkg
It can be used like this to look up a given MIME type:
% ./apt-find-browserplug-for-mimetype Browser plugin packages supporting audio/ogg: gecko-mediaplayer % ./apt-find-browserplug-for-mimetype application/x-shockwave-flash Browser plugin packages supporting application/x-shockwave-flash: browser-plugin-gnash %In Ubuntu this mechanism is combined with support in the browser itself to query for plugins and propose to install the needed packages. It would be great if Debian supported such feature too. Is anyone working on adding it? Update 2013-01-18 14:20: The Debian BTS request for icweasel support for this feature is #484010 from 2008 (and #698426 from today). Lack of manpower and wish for a different design is the reason thus feature is not yet in iceweasel from Debian.
I've been lucky in life. I've known several people who've killed
themselves, but I've been friendly with them rather than friends with them.
Their deaths have saddened me, but haven't left giant gaping holes that
I have trouble imagining filling. I've also been lucky in that I'm not
especially predisposed towards depression, and even luckier that the one
serious episode I had ended well. That luck means I'm not qualified to
speak authoritatively on the topic, but this seems like a good
time to share.
Most of 2002 wasn't great for me. Many of my friends had graduated and
moved away. My PhD, which was what I'd spent the past few years of my life working towards,
was going horribly wrong. The girl I liked didn't like me. Lots of individual small
things that didn't fundamentally matter, but which build up into overall
feelings of isolation and failure at life. I was spending an increasing
number of days not leaving bed and not talking to people. It wasn't that
I couldn't have fun - socialising was still pleasurable, and I didn't
actively avoid people, but it was always tempered with the knowledge
that this was temporary and I'd be returning to the unhappiness
afterwards. I couldn't see any sequence of events that would turn my
life around and restore my happiness. This was how life was, and this
was how life was going to be. I'd irrevocably fucked up, and this was
my future.
Looking back, what strikes me is how reasonable this seemed. I could
point at specific things that were making me unhappy, and nobody could
argue that it was unreasonable to be unhappy about them. There wasn't any
point in speaking to people about it, because what would they be able to
do except agree that I was justifiably unhappy? I thought about suicide.
Not seriously, because overall life still seemed worthwhile, but I could
conceive of a level of further unhappiness that would make it seem like
the best choice. I don't think it would ever have occured to me to speak
to someone about it first. It seemed like it would be the same argument
- I'm justifiably unhappy, I already feel like I'm letting my friends
down, what could they do other than tell me that my feelings are wrong
or make me feel even more guilty? So, when I saw exhortions for people
to speak to someone if they felt suicidal, it seemed like they were
talking to people who hadn't thought this through as well as me. It felt
like I'd thought this all through carefully and rationally and come to a
completely logical decision. If changes in circumstances and further
consideration made it seem like suicide was the better choice, that
would be because it was the better choice. Maybe other people weren't
thinking about this as logically as I was. Maybe they'd have their minds
changed by speaking to a friend or a professional. I wouldn't. Of course, with hindsight I was rationalising the way I already felt rather than making entirely rational decisions. I could have rationalised myself to death even though there were (in my case) straightforward ways to make my life better.
In any case, I've no idea how close I ever got to that point. Things
were at their worst in August - by September I had a new job and new
house, and things just got better from there. In the end, the friends I
was convinced could do nothing for me ended up giving me the opportunity
to find gainful employment and made sure I had somewhere to live.
Without them, things might have been different. As it was, I spent less
than nine months depressed and it was still the most hellish experience
of my life. The thought of returning to that state is terrifying. I was
lucky. I might not be again.
There's no terribly good moral here. If I'd known more about depression
beforehand, I might have been able to identify what was happening to me
and seek professional help. Other than that, I didn't learn anything
about how to avoid or deal with depression. The experience didn't make
me a better person. I've no advice for people in the same situation. The
only thing I gained from it all was the realisation that if I'd
felt any worse and knew that this was what I faced for the rest of my
life, death might not have been the worst choice I had.
Depression is a huge social problem and we deal with it badly. We refuse
to talk about it, and when we do talk about it we mostly limit ourselves
to platitudes about how things will get better or placing the blame on
depressed people for not wanting to talk to those around them. Sometimes
it doesn't get better. Sometimes talking to those around you will make
things worse. People need to be aware of what the effects of depression
are and get better at identifying it in others, rather than assuming
that they'll be able to ask for help themselves. Society as a whole
needs to be better at ensuring that professional support is there for
people who need it. And, unless we can make massive improvements in our
understanding of the causes of depression and effective mechanisms for
countering it, we need to accept that it will cost us friends. Let's
redirect the anger we feel at their choice to avoid a lifetime of misery
into anger at the society that still hasn't done everything it can to
help them.
I've been frustrated by my inability to schedule appointments directly from the org-agenda view, for quite some time, but I think I've found a way.
If like me you're using org-mode to manage your appointments, you're probably using
The solution seems to be with the '
In order to move my blog to a
I was upset to learn about
The Debian package of the Linux kernel has some additional features
not present in mainline Linux 3.2. This continues from
the count of RC bugs is rather constant, & my impact on it during this
week was rather negligible again: