In case you'd like working in Maemo, we're looking (also) for an IT specialist:
Sunday, 8 November 2009
Wednesday, 14 October 2009
Debian packaging: Changing permissions and ownership of dirs
Regarding creating users and permissions our beloved Debian Policy [chap. 10.9] tells us:
...you must arrange for your package to create the user or group if necessary using adduser in the preinst or postinst script (again, the latter is to be preferred if it is possible).
I wanted to stick to the postinst since it's preferrable so I couldn't change the permissions in the rules file.
Now the thing is I need to give this user permissions for the dirs it will need to own/write and so on. I already have the dirs listed in debian/dirs and I don't want to hardcode anything else in the rules or in the postinst. Of course not being a so experienced debian devel I started to google but didn't find anything... asked around but nothing yet... so I hacked it in this way in the end:
debian/rules:
...
MYDIRS := $(shell cat $(CURDIR)/debian/dirs)
SUBME := $(foreach dir, $(MYDIRS), chown -R \$$the_user $(dir);)
SUBFRIENDLY := $(shell echo "$(SUBME)" | sed -e 's/\//\\\//g')
...
binary-indep: build install
...
dh_installdeb
sed -i -e 's/PLACEHOLDER/$(SUBFRIENDLY)/' $(DESTDIR)/DEBIAN/postinst
...
...
debian/postinst:
...
configure)
the_user="xyz"
#Creating the user if it does not exist
if ! getent passwd $the_user > /dev/null; then
adduser $the_user
fi
#Changing the permissions for the given dirs
PLACEHOLDER
...
(user=xyz can be easily changed to numeric ID)
I don't know if this is the 'standard' way to do it (nor if there is a standard way) but it's at least a way that worked... If anybody there can give me an hint on how to do it better, it would be really appreciated.
Friday, 2 October 2009
N900 and TV-out: I just love it

After I read the post of Urho about Wiimote+DrNokSnes+TVout I couldn't help trying it out right away (except the Wiimote thing that I don't have). That was a funny jump back in time to when I was young and passed the evenings at a friend's apartment trying to finish the (amazing at that time) Super Mario bros on the NES (I didn't have a NES myself).
Besides that I tried out for the first time in these months the TV-out. I never realized it was so amazing... after having that strange cable packed on my desk for a whole 2 months I got to really use it. And, even if at first it was just to play Mario, I realized that the N900 it's a full blown audio/video player that supports a lot of formats. So I just started to watch a TV show on the bus, arrived home and plugged it into the TV and finished watching the show there.
I mean it's amazing! 180 grams plus a cable and you have a multimedia station with 32G storage on board. I've been thinking to get some kind of media box lately... well I think I found it... it was in my pocket the whole time.
Sunday, 27 September 2009
Friday, 25 September 2009
A questa non c'avevo proprio pensato...
Oggi mi sveglio, una giornata come tante altre e scopro che il nostro mitico Silvio presidentone nazionale (il migliore degli ultimi 150 anni) si candida (o si vorrebbe candidare, o lo vorrebbero candidare, ancora non ho capito) al premio Nobel per la pace.
Si avete capito bene premio Nobel per la pace.
Come se io mi candidassi al premio Nobel per la letteratura.
Non contento della messa in scena pare che abbia assoldato Biancaneve e i sette nani (al coro), un sosia di Bocelli e lo zio di Mogol per interpretare e scrivere il testo di questa canzone
O forse il testo l'ha scritto lui in un momento in cui si sentiva ispirato al cesso ("Silvio Silvio grande e'" chiara eco ai cori da stadio).
Sempre in vena di scherzoni ha fatto mettere su un sito che raccoglie una tale valanga di minchiate che manco Alvaro Vitali e Thomas Millian ubriachi e dopo essersi magnati 10 chili di coda alla vaccinara nel famoso ristorante La Parolaccia di Roma sarebbero stati in grado di mettere una dietro l'altra.
Ma andiamo con ordine:
in home page non si poteva fare a meno dell'inno italiano (che fa sempre scena, malgrado al governo con Silvio ci sia chi con l'inno ci si pulisce il deretano). Sempre in home page una accozzaglia di frasi che dovrebbero spingerti a credere veramente in quello che il sito sponsorizza:
Il Premio Nobel per la Pace non è mai stato assegnato ad un italiano dal 1907 ad oggi.
E' finalmente venuta l'ora di sfatare un tabù che dura da più di cento anni, ovvero da quanto nel 1907, ad aggiudicarselo fu Ernesto Teodoro Moneta.
Alla corsa per l'ambito riconoscimento si sono succeduti, in questi anni numerosi politici e capi di Stato, tra i quali potremmo citare, Yasser Arafat, il presidente della Corea del Sud, Kim Dae-Jung, l'ex presidente americano, Jimmy Carter, ed Al Gore.
Oggi crediamo che, anche, l'Italia meriti di ricevere tale riconoscimento, e di essere degnamente rappresentata da Silvio Berlusconi, per il suo indiscusso impegno umanitario in campo nazionale ed internazionale.
(vi consiglio di visitare questo link per un'adeguata parafrasi di quello che e' scritto qui sopra)
E andiamo subito alle chicche: testimonial d'ecce_zz_ione (nel senso di eccezziunaleveramente) e' Loriana Lana ... vi chiederete "ecchiccazze'?". Ecco se lo stanno chiedendo un po' tutti.
I GadgetS: Una maglietta con su scritto (davanti) "Silvio per il nobel", probabilmente dietro ci sara' scritto Kaka'.
Dulcis in fundo: chi ha aderito all'appello: un gruppo di sodali, portaborse e amichetti del premier (tutta gente molto importante e in vista per carita').
Ecco ora potete scoprire chi ha creato quest'iniziativa (cosi' potete mandarli a quel paese di persona) e qui ci metto il link ma cmq la faccia di questo vi dice gia' tutto:
Friday, 11 September 2009
Tuesday, 1 September 2009
Translation Party
Well this is a really nice way to waste your time: Translation Party.
You write a phrase in english and it will translate it back and forth from english to Japanese until the phrases will match in 2 consecutive translations.
I entered this:
Whatever you say it's wrong and I will disagree with that until you prove it right
and the equilibrium was at this point:
And, right or wrong, I have evidence to the contrary
try it!



