1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
2 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3 <html xmlns=
"http://www.w3.org/1999/xhtml" dir=
"ltr">
5 <meta http-equiv=
"Content-Type" content=
"text/html;charset=utf-8" />
6 <title>Petter Reinholdtsen
</title>
7 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"http://people.skolelinux.org/pere/blog/style.css" />
8 <link rel=
"stylesheet" type=
"text/css" media=
"screen" href=
"http://people.skolelinux.org/pere/blog/vim.css" />
9 <link rel=
"alternate" title=
"RSS Feed" href=
"http://people.skolelinux.org/pere/blog/index.rss" type=
"application/rss+xml" />
14 <a href=
"http://people.skolelinux.org/pere/blog/">Petter Reinholdtsen
</a>
23 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Lets_make_hardware_dongles_easier_to_use_in_Debian.html">Lets make hardware dongles easier to use in Debian
</a></div>
24 <div class=
"date"> 9th January
2013</div>
25 <div class=
"body"><p>One thing that annoys me with Debian and Linux distributions in
26 general, is that there is a great package management system with the
27 ability to automatically install software packages by downloading them
28 from the distribution mirrors, but no way to get it to automatically
29 install the packages I need to use the hardware I plug into my
30 machine. Even if the package to use it is easily available from the
31 Linux distribution. When I plug in a LEGO Mindstorms NXT, it could
32 suggest to automatically install the python-nxt, nbc and t2n packages
33 I need to talk to it. When I plug in a Yubikey, it could propose the
34 yubikey-personalization package. The information required to do this
35 is available, but no-one have pulled all the pieces together.
</p>
37 <p>Many years ago, I proposed to
38 <a href=
"http://lists.debian.org/debian-devel/2010/05/msg01206.html">use
39 the discover subsystem to implement this
</a>. The idea is fairly
44 <li>Add a desktop entry in /usr/share/autostart/ pointing to a program
45 starting when a user log in.
</li>
47 <li>Set this program up to listen for kernel events emitted when new
48 hardware is inserted into the computer.
</li>
50 <li>When new hardware is inserted, look up the hardware ID in a
51 database mapping to packages, and take note of any non-installed
54 <li>Show a message to the user proposing to install the discovered
55 package, and make it easy to install it.
</li>
59 <p>I am not sure what the best way to implement this is, but my
60 initial idea was to use dbus events to discover new hardware, the
61 discover database to find packages and
62 <a href=
"http://www.packagekit.org/">PackageKit
</a> to install
65 <p>Yesterday, I found time to try to implement this idea, and the
66 draft package is now checked into
67 <a href=
"http://anonscm.debian.org/viewvc/debian-edu/trunk/src/hw-support-handler/">the
68 Debian Edu subversion repository
</a>. In the process, I updated the
69 <a href=
"http://packages.qa.debian.org/d/discover-data.html">discover-data
</a>
70 package to map the USB ids of LEGO Mindstorms and Yubikey devices to
71 the relevant packages in Debian, and uploaded a new version
72 2.2013.01.09 to unstable. I also discovered that the current
73 <a href=
"http://packages.qa.debian.org/d/discover-data.html">discover
</a>
74 package in Debian no longer discovered any USB devices, because
75 /proc/bus/usb/devices is no longer present. I ported it to use
76 libusb as a fall back option to get it working. The fixed package
77 version
2.1.2-
6 is now in experimental (didn't upload it to unstable
78 because of the freeze).
</p>
80 <p>With this prototype in place, I can insert my Yubikey, and get this
81 desktop notification to show up (only once, the first time it is
84 <p align=
"center"><img src=
"http://people.skolelinux.org/pere/blog/images/2013-01-09-hw-autoinstall.png"></p>
86 <p>For this prototype to be really useful, some way to automatically
87 install the proposed packages by pressing the "Please install
88 program(s)" button should to be implemented.
</p>
90 <p>If this idea seem useful to you, and you want to help make it
91 happen, please help me update the discover-data database with mappings
92 from hardware to Debian packages. Check if 'discover-pkginstall -l'
93 list the package you would like to have installed when a given
94 hardware device is inserted into your computer, and report bugs using
95 reportbug if it isn't. Or, if you know of a better way to provide
96 such mapping, please let me know.
</p>
98 <p>This prototype need more work, and there are several questions that
99 should be considered before it is ready for production use. Is dbus
100 the correct way to detect new hardware? At the moment I look for HAL
101 dbus events on the system bus, because that is the events I could see
102 on my Debian Squeeze KDE desktop. Are there better events to use?
103 How should the user be notified? Is the desktop notification
104 mechanism the best option, or should the background daemon raise a
105 popup instead? How should packages be installed? When should they
106 not be installed?
</p>
108 <p>If you want to help getting such feature implemented in Debian,
109 please send me an email. :)
</p>
114 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
119 <div class=
"padding"></div>
122 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/New_IRC_channel_for_LEGO_designers_using_Debian.html">New IRC channel for LEGO designers using Debian
</a></div>
123 <div class=
"date"> 2nd January
2013</div>
124 <div class=
"body"><p>During Christmas, I have worked a bit on the Debian support for
125 <a href=
"http://mindstorms.lego.com/en-us/Default.aspx">LEGO Mindstorm
126 NXT
</a>. My son and I have played a bit with my NXT set, and I
127 discovered I had to build all the tools myself because none were
128 already in Debian Squeeze. If Debian support for LEGO is something
129 you care about, please join me on the IRC channel
130 <a href=
"irc://irc.debian.org/%23debian-lego">#debian-lego
</a> (server
131 irc.debian.org). There is a lot that could be done to improve the
132 Debian support for LEGO designers. For example both CAD software
133 and Mindstorm compilers are missing. :)
</p>
135 <p>Update
2012-
01-
03: A
136 <a href=
"http://wiki.debian.org/LegoDesigners">project page
</a>
137 including links to Lego related packages is now available.
</p>
142 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/robot">robot
</a>.
147 <div class=
"padding"></div>
150 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Lenker_for_2013_01_01.html">Lenker for
2013-
01-
01</a></div>
151 <div class=
"date"> 1st January
2013</div>
152 <div class=
"body"><p>Her er noen lenker til tekster jeg har satt pris på å lese den
158 <a href=
"http://www.idg.no/computerworld/article262047.ece">Myter og
159 FUD om fri programvare
</a> av min venn Christer Gundersen som
160 kommenterer noen av de påstandene som er spredt via Computerworld
161 Norge de siste månedene.
</li>
163 <li>BankID er et opplegg der utsteder (dvs. banken eller dens
164 leverandør) sitter på alt som trengs for å bruke BankID, men har
165 lovet å ikke bruke den unntatt på oppdrag fra deg. Det er greit nok
166 for banktjenester, der banken allerede har full kontroll over
167 resultatet, men problematisk når det gjelder tilgang til
168 helseopplysninger og avtaleinngåelse med andre enn banken. Jeg
169 håper protestene brer om seg.
173 <li>2012-
12-
11 <a href=
"http://www.aftenposten.no/meninger/debatt/BankID-blottlegger-helseopplysninger-7067148.html">BankID
174 blottlegger helseopplysninger
</a></li>
176 <li>2012-
12-
07 <a href=
"http://www.nrk.no/nyheter/norge/1.9695027">-
177 Helseopplysningene ikke sikre med Bank-ID
</a></li>
180 <a href=
"https://www.bankid.no/Presse-og-nyheter/Nyhetsarkiv/2012/Papeker-alvorlige-men-kjente-utfordringer/">Påpeker
181 alvorlige, men kjente utfordringer
</a> er den offisielle
182 holdningen til de som lager BankID.
</li>
185 <a href=
"http://www.tnp.no/norway/panorama/3419-ntnu-researcher-warns-against-security-of-bank-id-password">NTNU
186 Researcher Warns against Security of Bank ID Password
</a>
190 <li>2012-
12-
11 <a href=
"http://www.aftenposten.no/nyheter/iriks/Norske-elever-er-darligst-i-Europa-pa-algebra-7066752.html">Norske elever er dårligst i Europa på algebra
</a>
193 <a href=
"http://www.aftenposten.no/meninger/debatt/Realfagsdodaren-7067173.html">Realfagsdødaren
</a>
196 <a href=
"http://www.bt.no/nyheter/innenriks/112/--Forventningene-er-for-hoye-2816450.html">-
197 Noen må bli skuffet
</a> - Politiet i Bergen forteller hvor lavt de
198 prioriterer hverdagskriminalitet.
</li>
201 <a href=
"http://e24.no/jobb/kripos-ansatt-doemt-for-snoking-for-venn/20208585">
202 Kripos-ansatt dømt for snoking for venn
</A> - viser hvor svak
203 reaksjonen blir når politiet misbruker innsamlet informasjon. En
204 forvarsel på konsekvensene av nasjonal brev- og besøkskontroll -
205 ofte kalt Datalagringsdirektivet.
</li>
208 <a href=
"http://www.dagbladet.no/2012/12/14/kultur/debatt/kronikk/jul/ensomhet/24838541/">Å
209 smøre en forskjell
</a> - om ensomhet og jul.
</li>
212 <a href=
"http://www.aftenposten.no/meninger/kronikker/n-krise-av-gangen_-takk-7072452.html">Én
213 krise av gangen, takk!
</a>
217 <a href=
"http://www.aftenposten.no/meninger/NAV-Et-mangehodet-monster--7072165.html">NAV:
218 Et mangehodet monster
</a></li>
221 <a href=
"http://www.dagbladet.no/2011/01/12/kultur/debatt/kronikk/personvern/15027203/">Pasienter
222 uten vern
</a> - forteller litt om hvordan Norsk Pasientregister og
223 andre helseregister raderer bort pasienters privatsfære.
</li>
227 <a href=
"http://www.aftenposten.no/meninger/debatt/Hvorfor-er-barnefamilier-fattige-7073951.html">Hvorfor
228 er barnefamilier fattige?
</a></li>
231 <a href=
"http://www.aftenposten.no/meninger/spaltister/Den-skjulte-minoriteten--konservative-kristne-i-Norge-7075518.html">Den
232 skjulte minoriteten – konservative kristne i Norge
</a> - kronikk av
233 Bjørn Stærk fra aftenposten
</li>
236 <a href=
"http://deltemeninger.no/-/bulletin/show/303429_folkebiblioteket-2-0?ref=checkpoint">Folkebiblioteket
237 2.0</a> - Min venn Sturle om opphavsrett og Internett, i debatt med
242 <p>Og et godt nytt år til dere alle!
</p>
247 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bankid">bankid
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/lenker">lenker
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/norsk">norsk
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/personvern">personvern
</a>.
252 <div class=
"padding"></div>
255 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/A_Christmas_present_for_Skolelinux___Debian_Edu.html">A Christmas present for Skolelinux / Debian Edu
</a></div>
256 <div class=
"date">28th December
2012</div>
257 <div class=
"body"><p>I was happy to discover a few days ago that the
258 <a href=
"http://www.skolelinux.org/">Skolelinux / Debian Edu
</a>
259 project also this year received a Christmas present from Another
260 Agency in Trondheim. NOK
1000,- showed up on our donation account
261 December
24th. I want to express our thanks for this very welcome
262 present. As the Debian Edu / Skolelinux project is very short on
263 funding these days, and thus lack the money to do regular developer
264 gatherings, this donation was most welcome. One developer gathering
265 cost around NOK
15 000,-, so we need quite a lot more to keep the
266 development pace we want. Thus, I hope their example this year is
267 followed by many others. :)
</p>
269 <p>The public list of donors can be found on
270 <a href=
"http://www.linuxiskolen.no/slxdebianlabs/donations.html">the
271 donation page
</a> for the project, which also contain instructions if
272 you want to donate to the project.
</p>
277 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
282 <div class=
"padding"></div>
285 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/How_to_backport_bitcoin_qt_version_0_7_2_2_to_Debian_Squeeze.html">How to backport bitcoin-qt version
0.7.2-
2 to Debian Squeeze
</a></div>
286 <div class=
"date">25th December
2012</div>
287 <div class=
"body"><p>Let me start by wishing you all marry Christmas and a happy new
288 year! I hope next year will prove to be a good year.
</p>
290 <p><a href=
"http://www.bitcoin.org/">Bitcoin
</a>, the digital
291 decentralised "currency" that allow people to transfer bitcoins
292 between each other with minimal overhead, is a very interesting
293 experiment. And as I wrote a few days ago, the bitcoin situation in
294 <a href=
"http://www.debian.org/">Debian
</a> is about to improve a bit.
295 The
<a href=
"http://packages.qa.debian.org/bitcoin">new debian source
296 package
</a> (version
0.7.2-
2) was uploaded yesterday, and is waiting
297 in
<a href=
"http://ftp-master.debian.org/new.html">the NEW queue
</A>
298 for one of the ftpmasters to approve the new bitcoin-qt package
301 <p>And thanks to the great work of Jonas and the rest of the bitcoin
302 team in Debian, you can easily test the package in Debian Squeeze
303 using the following steps to get a set of working packages:
</p>
306 git clone git://git.debian.org/git/collab-maint/bitcoin
308 DEB_MAINTAINER_MODE=
1 DEB_BUILD_OPTIONS=noupnp fakeroot debian/rules clean
309 DEB_BUILD_OPTIONS=noupnp git-buildpackage --git-ignore-new
312 <p>You might have to install some build dependencies as well. The
313 list of commands should give you two packages, bitcoind and
314 bitcoin-qt, ready for use in a Squeeze environment. Note that the
315 client will download the complete set of bitcoin "blocks", which need
316 around
5.6 GiB of data on my machine at the moment. Make sure your
317 ~/.bitcoin/ directory have lots of spare room if you want to download
318 all the blocks. The client will warn if the disk is getting full, so
319 there is not really a problem if you got too little room, but you will
320 not be able to get all the features out of the client.
</p>
322 <p>As usual, if you use bitcoin and want to show your support of my
323 activities, please send Bitcoin donations to my address
324 <b><a href=
"bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&label=PetterReinholdtsenBlog">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a></b>.
</p>
329 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
334 <div class=
"padding"></div>
337 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/A_word_on_bitcoin_support_in_Debian.html">A word on bitcoin support in Debian
</a></div>
338 <div class=
"date">21st December
2012</div>
339 <div class=
"body"><p>It has been a while since I wrote about
340 <a href=
"http://www.bitcoin.org/">bitcoin
</a>, the decentralised
341 peer-to-peer based crypto-currency, and the reason is simply that I
342 have been busy elsewhere. But two days ago, I started looking at the
343 state of
<a href=
"http://packages.qa.debian.org/bitcoin">bitcoin in
344 Debian
</a> again to try to recover my old bitcoin wallet. The package
345 is now maintained by a
346 <a href=
"https://alioth.debian.org/projects/pkg-bitcoin/">team of
347 people
</a>, and the grunt work had already been done by this team. We
348 owe a huge thank you to all these team members. :)
349 But I was sad to discover that the bitcoin client is missing in
350 Wheezy. It is only available in Sid (and an outdated client from
351 backports). The client had several RC bugs registered in BTS blocking
352 it from entering testing. To try to help the team and improve the
353 situation, I spent some time providing patches and triaging the bug
354 reports. I also had a look at the bitcoin package available from Matt
356 <a href=
"https://launchpad.net/~bitcoin/+archive/bitcoin">PPA for
357 Ubuntu
</a>, and moved the useful pieces from that version into the
360 <p>After checking with the main package maintainer Jonas Smedegaard on
361 IRC, I pushed several patches into the collab-maint git repository to
362 improve the package. It now contains fixes for the RC issues (not from
363 me, but fixed by Scott Howard), build rules for a Qt GUI client
364 package, konqueror support for the bitcoin: URI and bash completion
365 setup. As I work on Debian Squeeze, I also created
366 <a href=
"http://lists.alioth.debian.org/pipermail/pkg-bitcoin-devel/Week-of-Mon-20121217/000041.html">a
367 patch to backport
</a> the latest version. Jonas is going to look at
368 it and try to integrate it into the git repository before uploading a
369 new version to unstable.
371 <p>I would very much like bitcoin to succeed, to get rid of the
372 centralized control currently exercised in the monetary system. I
373 find it completely unacceptable that the USA government is collecting
374 transaction data for almost all international money transfers (most are done in USD and transaction logs shipped to the spooks), and
375 that the major credit card companies can block legal money
376 transactions to Wikileaks. But for bitcoin to succeed, more people
377 need to use bitcoins, and more people need to accept bitcoins when
378 they sell products and services. Improving the bitcoin support in
379 Debian is a small step in the right direction, but not enough.
380 Unfortunately the user experience when browsing the web and wanting to
381 pay with bitcoin is still not very good. The bitcoin: URI is a step
382 in the right direction, but need to work in most or every browser in
383 use. Also the bitcoin-qt client is too heavy to fire up to do a
384 quick transaction. I believe there are other clients available, but
385 have not tested them.
</p>
388 <a href=
"http://people.skolelinux.org/pere/blog/Now_accepting_bitcoins___anonymous_and_distributed_p2p_crypto_money.html">experiment
389 with bitcoins
</a> showed that at least some of my readers use bitcoin.
390 I received
20.15 BTC so far on the address I provided in my blog two
392 <a href=
"http://blockexplorer.com/address/15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b">seen
393 on the blockexplorer service
</a>. Thank you everyone for your
394 donation. The blockexplorer service demonstrates quite well that
395 bitcoin is not quite anonymous and untracked. :) I wonder if the
396 number of users have gone up since then. If you use bitcoin and want
397 to show your support of my activity, please send Bitcoin donations to
398 the same address as last time,
399 <b><a href=
"bitcoin:15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b&label=PetterReinholdtsenBlog">15oWEoG9dUPovwmUL9KWAnYRtNJEkP1u1b
</a></b>.
</p>
404 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>.
409 <div class=
"padding"></div>
412 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Piratpartiet_p__opphavs_retrett_.html">Piratpartiet på opphavs-retrett?
</a></div>
413 <div class=
"date">19th December
2012</div>
414 <div class=
"body"><p>Jeg ble overrasket over å se at Piratpartiet i
415 <a href=
"http://www.aftenposten.no/kultur/Piratpartiet-stiller-til-Stortingsvalget-7073298.html">Aftenposten
</a>
416 er referert på følgende:
</p>
419 Når det gjelder retten til opphavsrett for kulturproduktene, mener
420 Piratpartiet av levetid +
14 år er tilfredsstillende.
423 <p>Det betyr en vernetid langt ut over det kommersielle livet til de
424 aller fleste opphavsrettsbeskyttede verker, og er i strid med slik i
425 hvert fall jeg har tolket punkt
5 i
426 <a href=
"http://people.opera.com/howcome/2012/piratpartiet/kjerneprogram.html">kjerneprogrammet
427 til Piratpartiet
</a>:
</p>
430 <p><strong>5: Åndsverk og patenter: tilbake til start
</strong></p>
433 <tr><th>forslag:
</th><td>14 års opphavsrett og ingen
434 programvarepatenter
</td></tr>
436 <tr><th>grunn:
</th><td>Den første loven om opphavsrett spesifiserte
14
437 års vernetid. Senere har mediabransjens lobbyister stadig presset
438 loven mot lengre vern, nå er det
70 år etter forfatters død. Dette
439 gjør at mange verk glemmes og går tapt, noe som er skadelig for norsk
440 språk og kultur. Vi til tilbake til start:
14 års
441 vernetid. Patentloven sier klart at dataprogrammer ikke kan
442 patenteres. Likevel klarer patentadvokater å lure gjennom
443 programvarepatenter. Slike patenter gjør dingsene våre dyrere og kan i
444 enkelte tilfelle stoppe dem helt.
</th></tr>
448 <p>Den opprinnelige opphavsretten var på
14 år totalt, ikke
14 år
449 etter opphavspersonens død. Jeg tenkte først dette kanskje var
450 feilsitering fra Aftenposten, men jeg finner samme påstand i en
<a
451 href=
"http://piratpartietnorge.org/om-gramo-og-piratpolitikken/">bloggpost
452 fra Geir Aaslid
</a> på Piratpartietes offisielle nettsider. Der
453 skriver han følgende:
</p>
456 Hva vi gjør med opphavsretten er mer komplisert fordi den omfavner så
457 mange bransjer, med ulike behov. Enhver reform er en forbedring men
458 det er nærliggende å anta at en opphavsrett på levetid +
14 år er
459 fullt ut tilfredstillende for musikk, film, litteratur og spill.
462 <p>Det virker dermed på meg som om Piratpartiet allerede har gjort
463 retrett fra sin beundringsverdige holdning om at det holdt med
14 års
464 total vernetid, til sin nye som tar utgangspunkt i levetiden til
465 opphavspersonen. Jeg håper det baserer seg på en misforståelse hos
466 piratlederen som blir korrigert tilbake til
14 års total vernetid før
467 partiet stiller til valg.
</p>
469 <p>Hvis du lurer på hvilke problemer lang vernetid bringer med seg,
470 anbefaler jeg å lese boken
<a href=
"http://free-culture.cc/">Free
471 Culture
</a> av Lawrence Lessig. Jeg og en liten gruppe andre er igang
473 <a href=
"https://github.com/petterreinholdtsen/free-culture-lessig">oversette
474 boken til bokmål
</a> og tar gjerne imot hjelp med oversettelse og
477 <p><strong>Oppdatering
2012-
12-
20</strong>: Oppdaget at
478 <a href=
"http://piratpartietnorge.org/om-gramo-og-piratpolitikken/">bloggposten
479 til Geir Aaslid
</a> er endret siden i går, og nå inneholder følgende
480 avsnitt i stedet for det jeg siterte over:
</p>
483 Hva vi gjør med opphavsretten er mer komplisert fordi den omfavner så
484 mange bransjer, med ulike behov. Enhver reform er en forbedring men
485 det er nærliggende å anta at en opphavsrett lik levetiden, evt +
14 år
486 er fullt ut tilfredstillende for mange skapere av musikk, film,
487 litteratur og spill. Det er for det meste de store forlagene som er
491 <p>I tillegg har det dukket opp en setning nederst "Dette dokumentet
492 er et utkast til svar på et angrep på Piratpartiet fra Gramo. Det
493 endrer seg derfor over tid og den endelige versjonen er det som blir
494 publisert på Hardware.no", som tyder på at originalformuleringen ikke
495 var veloverveid og sitatet i Aftenposten kanskje var basert på en
501 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/norsk">norsk
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett
</a>.
506 <div class=
"padding"></div>
509 <div class=
"title"><a href=
"http://people.skolelinux.org/pere/blog/Ledger___double_entry_accounting_using_text_based_storage_format.html">Ledger - double-entry accounting using text based storage format
</a></div>
510 <div class=
"date">18th December
2012</div>
511 <div class=
"body"><p>A few days ago I came across
512 <a href=
"http://joeyh.name/blog/entry/hledger/">a blog post from Joey
513 Hess
</a> describing
<a href=
"http://ledger-cli.org/">ledger
</a> and
514 hledger, a text based system for double-entry accounting. I found it
515 interesting, as I am involved with several organizations where
516 accounting is an issue, and I have not really become too friendly with
517 the different web based systems we use. I find it hard to find what I
518 look for in the menus and even harder try to get sensible data out of
519 the systems. Ledger seem different. The accounting data is kept in
520 text files that can be stored in a version control system, and there
522 are at least
<a href=
"https://github.com/ledger/ledger/wiki/Ports">five
523 different implementations
</a> able to read the format. An example
524 entry look like this, and is simple enough that it will be trivial to
525 generate entries based on CVS files fetched from the bank:
</p>
528 2004-
05-
27 Book Store
529 Expenses:Books $
20.00
533 <p>The concept seemed interesting enough for me to check it out and
534 look for others using it. I found blog posts from
535 <a href=
"http://blog.spang.cc/posts/hledger_rocks_my_world/">Christine
537 <a href=
"http://bugsplat.info/2010-05-23-keeping-finances-with-ledger.html">Pete
539 <a href=
"http://blog.andrewcantino.com/blog/2010/11/06/command-line-accounting-with-ledger-and-reckon/">Andrew
541 <a href=
"http://blog.iphoting.com/blog/2012/11/29/command-line-double-entry-accounting/">Ronald
542 Ip
</a> describing how they use it, as well as a post from
543 <a href=
"https://groups.google.com/forum/?fromgroups=#!topic/ledger-cli/r0oWjwbQ9Bo">Bradley
544 M. Kuhn
</a> at the Software Freedom Conservancy. All seemed like good
545 recommendations fitting my need.
</p>
547 <p>The
<a href=
"http://packages.qa.debian.org/l/ledger.html">ledger
</a>
548 package is available in Debian Squeeze, while the
549 <a href=
"http://packages.qa.debian.org/h/haskell-hledger.html">hledger
</a>
550 package only is available in Debian Sid. As I use Squeeze, ledger
551 seemed the best choice to get started.
</p>
553 <p>To get some real data to test on, I wrote a
554 <a href=
"http://www.nuug.no/tools/lodo2ledger">web scraper
</a> for
555 <a href=
"http://www.lodo.no/">LODO
</a>, the accounting system used by
556 the
<a href=
"http://www.nuug.no/">NUUG
</a> association, and started to
557 play with the data set. I'm not really deeply into accounting, but I
558 am able to get a simple balance and accounting status for example
559 using the "
<tt>ledger balance
</tt>" command. But I will have to
560 gather more experience before I know if the ledger way is a good fit
561 for the organisations I am involved in.</p>
566 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/debian edu
">debian edu</a>, <a href="http://people.skolelinux.org/pere/blog/tags/english
">english</a>, <a href="http://people.skolelinux.org/pere/blog/tags/nuug
">nuug</a>.
571 <div class="padding
"></div>
574 <div class="title
"><a href="http://people.skolelinux.org/pere/blog/
61_kommuner_lenker_n__til_FiksGataMi_fra_sine_nettsider.html
">61 kommuner lenker nå til FiksGataMi fra sine nettsider</a></div>
575 <div class="date
">11th December 2012</div>
576 <div class="body
"><p>For noen dager siden omfavnet nok en kommune NUUGs
577 <a href="http://www.fiksgatami.no/
">FiksGataMi</a>. Med 61 kommuner
578 som lenker til FiksGataMi fra sine hjemmesider er «markedsandelen» 14%
579 (av 429 kommuner). Siden
580 <a href="http://people.skolelinux.org/pere/blog/
59_kommuner_omfavner_n__FiksGataMi.html
">siste
581 oppdatering i november</a> har kommunene Re og Vågsøy kommet til og
582 slår følge med kommunene Askim, Askøy, Audnedal, Aure, Balestrand,
583 Bærum, Eide, Farsund, Flekkefjord, Folldal, Gran, Grue, Hadsel,
584 Halden, Halsa, Hamar, Hobøl, Holtålen, Hægebostad, Høyanger,
585 Kongsberg, Kristiansund, Kvinesdal, Kviteseid, Levanger, Lindesnes,
586 Luster, Lyngdal, Løten, Mandal, Marnardal, Moss, Namsos, Nissedal,
587 Nordreisa, Randaberg, Rindal, Sel, Sirdal, Skiptvet, Sortland,
588 Spydeberg, Stange, Stjørdal, Stord, Søgne, Sør-Odal, Tolga, Trysil,
589 Tynset, Tysvær, Ullensvang Herad, Utsira, Vennesla, Verdal, Vågan,
590 Vågå, Våler og Åseral. Oppdatert liste er tilgjengelig fra
591 <a href="http://wiki.nuug.no/grupper/fiksgatami/positivemottakere
">NUUGs
592 wiki</a>. Kartet er dog ikke oppdatert med de siste kommunene.</p>
594 <p>Kanskje du bør høre med din kommune om de vil bli mer aktive
595 brukere av FiksGataMi? Se
596 <a href="http://people.skolelinux.org/pere/blog/
40_kommuner_lenker_n__til_FiksGataMi_fra_sine_nettsider___gj_r_din_.html
">en
597 tidligere bloggpost</a> med tips om hvordan det kan gjøres.</p>
599 <p>I snitt rapporteres det nå via FiksGataMi ca. 60 meldinger fra
600 innbyggerne i uka om feil på offentlig infrastruktur.</p>
605 Tags: <a href="http://people.skolelinux.org/pere/blog/tags/fiksgatami
">fiksgatami</a>, <a href="http://people.skolelinux.org/pere/blog/tags/norsk
">norsk</a>.
610 <div class="padding
"></div>
613 <div class="title
"><a href="http://people.skolelinux.org/pere/blog/Scripting_the_Cerebrum_bofhd_user_administration_system_using_XML_RPC.html
">Scripting the Cerebrum/bofhd user administration system using XML-RPC</a></div>
614 <div class="date
"> 6th December 2012</div>
615 <div class="body
"><p>Where I work at the <a href="http://www.uio.no/
">University of
617 <a href="http://sourceforge.net/projects/cerebrum/
">Cerebrum user
618 administration system</a> to maintain users, groups, DNS, DHCP, etc.
619 I've known since the system was written that the server is providing
620 an <a href="http://en.wikipedia.org/wiki/XML-RPC
">XML-RPC</a> API, but
621 I have never spent time to try to figure out how to use it, as we
622 always use the bofh command line client at work. Until today. I want
623 to script the updating of DNS and DHCP to make it easier to set up
624 virtual machines. Here are a few notes on how to use it with
627 <p>I started by looking at the source of the Java
628 <a href="http://cerebrum.svn.sourceforge.net/viewvc/cerebrum/trunk/cerebrum/clients/jbofh/
">bofh
629 client</a>, to figure out how it connected to the API server. I also
630 googled for python examples on how to use XML-RPC, and found
631 <a href="http://tldp.org/HOWTO/XML-RPC-HOWTO/xmlrpc-howto-python.html
">a
632 simple example in</a> the XML-RPC howto.</p>
634 <p>This simple example code show how to connect, get the list of
635 commands (as a JSON dump), and how to get the information about the
636 user currently logged in:</p>
639 #!/usr/bin/env python
642 server_url = 'https://cerebrum-uio.uio.no:8000';
643 username = getpass.getuser()
644 password = getpass.getpass()
645 server = xmlrpclib.Server(server_url);
646 #print server.get_commands(sessionid)
647 sessionid = server.login(username, password)
648 print server.run_command(sessionid, "user_info", username)
649 result = server.logout(sessionid)
653 <p>Armed with this knowledge I can now move forward and script the DNS
654 and DHCP updates I wanted to do.
</p>
659 Tags:
<a href=
"http://people.skolelinux.org/pere/blog/tags/english">english
</a>,
<a href=
"http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin
</a>.
664 <div class=
"padding"></div>
666 <p style=
"text-align: right;"><a href=
"index.rss"><img src=
"http://people.skolelinux.org/pere/blog/xml.gif" alt=
"RSS feed" width=
"36" height=
"14" /></a></p>
677 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2013/01/">January (
3)
</a></li>
684 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/01/">January (
7)
</a></li>
686 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/02/">February (
10)
</a></li>
688 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/03/">March (
17)
</a></li>
690 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/04/">April (
12)
</a></li>
692 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/05/">May (
12)
</a></li>
694 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/06/">June (
20)
</a></li>
696 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/07/">July (
17)
</a></li>
698 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/08/">August (
6)
</a></li>
700 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/09/">September (
9)
</a></li>
702 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/10/">October (
17)
</a></li>
704 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/11/">November (
10)
</a></li>
706 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2012/12/">December (
7)
</a></li>
713 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/01/">January (
16)
</a></li>
715 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/02/">February (
6)
</a></li>
717 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/03/">March (
6)
</a></li>
719 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/04/">April (
7)
</a></li>
721 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/05/">May (
3)
</a></li>
723 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/06/">June (
2)
</a></li>
725 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/07/">July (
7)
</a></li>
727 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/08/">August (
6)
</a></li>
729 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/09/">September (
4)
</a></li>
731 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/10/">October (
2)
</a></li>
733 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/11/">November (
3)
</a></li>
735 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2011/12/">December (
1)
</a></li>
742 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/01/">January (
2)
</a></li>
744 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/02/">February (
1)
</a></li>
746 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/03/">March (
3)
</a></li>
748 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/04/">April (
3)
</a></li>
750 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/05/">May (
9)
</a></li>
752 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/06/">June (
14)
</a></li>
754 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/07/">July (
12)
</a></li>
756 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/08/">August (
13)
</a></li>
758 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/09/">September (
7)
</a></li>
760 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/10/">October (
9)
</a></li>
762 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/11/">November (
13)
</a></li>
764 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2010/12/">December (
12)
</a></li>
771 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/01/">January (
8)
</a></li>
773 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/02/">February (
8)
</a></li>
775 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/03/">March (
12)
</a></li>
777 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/04/">April (
10)
</a></li>
779 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/05/">May (
9)
</a></li>
781 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/06/">June (
3)
</a></li>
783 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/07/">July (
4)
</a></li>
785 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/08/">August (
3)
</a></li>
787 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/09/">September (
1)
</a></li>
789 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/10/">October (
2)
</a></li>
791 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/11/">November (
3)
</a></li>
793 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2009/12/">December (
3)
</a></li>
800 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2008/11/">November (
5)
</a></li>
802 <li><a href=
"http://people.skolelinux.org/pere/blog/archive/2008/12/">December (
7)
</a></li>
813 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/3d-printer">3d-printer (
13)
</a></li>
815 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/amiga">amiga (
1)
</a></li>
817 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/aros">aros (
1)
</a></li>
819 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bankid">bankid (
4)
</a></li>
821 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bitcoin">bitcoin (
5)
</a></li>
823 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bootsystem">bootsystem (
12)
</a></li>
825 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/bsa">bsa (
2)
</a></li>
827 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/debian">debian (
60)
</a></li>
829 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/debian edu">debian edu (
118)
</a></li>
831 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/digistan">digistan (
9)
</a></li>
833 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/docbook">docbook (
7)
</a></li>
835 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/drivstoffpriser">drivstoffpriser (
4)
</a></li>
837 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/english">english (
167)
</a></li>
839 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/fiksgatami">fiksgatami (
21)
</a></li>
841 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/fildeling">fildeling (
12)
</a></li>
843 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/freeculture">freeculture (
10)
</a></li>
845 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/frikanalen">frikanalen (
9)
</a></li>
847 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/intervju">intervju (
32)
</a></li>
849 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/kart">kart (
17)
</a></li>
851 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ldap">ldap (
8)
</a></li>
853 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/lenker">lenker (
6)
</a></li>
855 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ltsp">ltsp (
1)
</a></li>
857 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/multimedia">multimedia (
25)
</a></li>
859 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/norsk">norsk (
219)
</a></li>
861 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/nuug">nuug (
148)
</a></li>
863 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/offentlig innsyn">offentlig innsyn (
6)
</a></li>
865 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/open311">open311 (
2)
</a></li>
867 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/opphavsrett">opphavsrett (
41)
</a></li>
869 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/personvern">personvern (
61)
</a></li>
871 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/raid">raid (
1)
</a></li>
873 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/reprap">reprap (
11)
</a></li>
875 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/rfid">rfid (
2)
</a></li>
877 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/robot">robot (
5)
</a></li>
879 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/rss">rss (
1)
</a></li>
881 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/ruter">ruter (
4)
</a></li>
883 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/scraperwiki">scraperwiki (
2)
</a></li>
885 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sikkerhet">sikkerhet (
28)
</a></li>
887 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sitesummary">sitesummary (
4)
</a></li>
889 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/skepsis">skepsis (
4)
</a></li>
891 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/standard">standard (
39)
</a></li>
893 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/stavekontroll">stavekontroll (
3)
</a></li>
895 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/stortinget">stortinget (
5)
</a></li>
897 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/surveillance">surveillance (
12)
</a></li>
899 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/sysadmin">sysadmin (
1)
</a></li>
901 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/valg">valg (
7)
</a></li>
903 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/video">video (
35)
</a></li>
905 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/vitenskap">vitenskap (
4)
</a></li>
907 <li><a href=
"http://people.skolelinux.org/pere/blog/tags/web">web (
26)
</a></li>
913 <p style=
"text-align: right">
914 Created by
<a href=
"http://steve.org.uk/Software/chronicle">Chronicle v4.4
</a>