Second Circuit Judge Pierre Leval once said that the best way to know you have a mind is to change it, and I have tried to live by that wisdom… There are positions I have taken in the past I no longer hold, and some that I continue to hold. I have tried to be honest with myself: if you are not genuinely honest with yourself, you can’t learn, and if you worry about what others think of you, you will be living their version of your life and not yours.
I didn’t know of Bill Patry before he started blogging, but once he did, I started seeing his name everywhere. Mainly on huge multi-volume collections of hardback legal tomes, titled “PATRY ON COPYRIGHT”. He’s given up blogging because people would insist on quoting his blogging opinions as though they were an official pronouncement of his new employers, Google. Also, the current state of copyright law (and he actually contributed to drafting a chunk of it when he worked for Congress in the Nineties) depressed him too much.
Fortunately, I am never depressed by copyright, and I am confident you will never confuse my pronouncements here with any of my employers, because I have a little box down there that says so. So we are stuck with each other.
Today is column day, which means I have to save my most potentious stuff for one of said employers instead of you. It also means that I have been procrastinating all over the Net. Patry’s mum told him you must learn something new every day: today I learnt that the best way to poo-poo a fusion project is to say “Feh, you’ll never fix the Bremsstrahlung” (and the best way to help is to start a fusor in your home town). I read the best defence ever of a children’s book that has gay marriage in it, and added another Hari Seldon-style modern psychohistory attempt to my list. I also learnt that other far more esteemed columnists look exactly as bad as me on column day.
But if you wanted to know that stuff, you would have Googled for it. What you want to know is this: if I’m using GNOME, and I’m futzing about with my preferences, how can I easily note them down so that I can recreate what I’ve done when I accidentally delete my home directory (again)?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 |
#!/usr/bin/env python ### # Print out changes to the environment ### import gtk, gconf def key_to_tool(entry): v = entry.value try: return 'gconftool --set %s "%s" -t %s' % (entry.key, v.to_string(), v.type.value_nick) except: return "# Couldn't understand setting %s" % entry.key def key_changed_callback(client, cnxn_id, entry, other): print key_to_tool(entry) client = gconf.client_get_default() client.add_dir('/', gconf.CLIENT_PRELOAD_NONE) client.notify_add('/', key_changed_callback, 1) gtk.main() |
That’s what you were Googling for, my friend. Run this code in the background as you merrily click on Gnome options in most programs, and it’ll spit out a set of commands that if you run will recreate your clicking. Useful for finding where the hell Gnome is hiding certain preferences, or what exactly certain programs are changing behind your back. You’ll need to install python-gtk
in Ubuntu and Debian. And probably a bunch of gotchas that I have pigheadedly ignored and which you will find in the comments below from smarter, friendlier people than me.
August 5th, 2008 at 12:58 am
Those two Dork Talk videos are my new favorite things on the internet. Immediate, cheap access to Stephen Fry fiddling with gadgetry is the glorious promise that first drew me to the web.