L'uso di questo sito
autorizza anche l'uso dei cookie
necessari al suo funzionamento.
(Altre informazioni)

Tuesday, March 15, 2011

Caro H.G. Wells

Le vere macchine del tempo siamo noi.

"Al lago ho un vicino, uno dei sempre più numerosi pirati dell’etere, che si è fatto installare una parabola. Da noi le parabole sono fuorilegge, perché consentono di captare gratis un centinaio di canali americani a pagamento. Ma lui con un decoder da trenta dollari li becca tutti. Da un certo punto di vista mi trovo in una situazione molto simile: anch’io, nel mio crepuscolo, passo lunghe notti a ricevere dal passato un guazzabuglio di immagini cifrate, ma a differenza del mio vicino non riesco a decodificarle."
da Mordecai Richler "La Versione di Barney"

Thursday, February 3, 2011

Virtualbox and USB on Fedora 14 (FC14)

Briefly: with the indicaetd setup, all the usb devices appear to be unavailable,
as seen in:

$ VboxManage list usbhost

(they are also greyed out in all the pesky dialog boxens).

[...time passes...] Having spent several hours in the fascinating process of pulling hair out of my head, i found that you have to:
  1. add yourself to the vboxusers group that VirtualBOx creates
  2. disregard notices abour mounting usbfs and whatnot (that's for old systems apparently)
  3. run
    $ sg vboxusers VirtualBox
    or
    $ newgrp vboxusers
    $ VirtualBox

It appears that VirtualBox sets everything for the vboxusers group to work, however, it does not bother to newgrp into it. How's that for great fun.

Monday, December 13, 2010

Evitare come il raffreddore

Me l'ero schivato al cinema, s'è vendicato in DVD.

Ogni tanto Martin Scorsese fa un film che ha l'unico significato di fare cassetta: "Shutter Island" è l'ultimo della serie. Oppure sono io che sbaglio se non riesco a prendere sul serio un film in cui c'è un medico tedesco emigrato negli Stati Uniti che viene introdotto mentre ascolta Wagner ricevendo uno dei protagonisti che - per nessun buon motivo - è stato uno dei primi G.I. ad entrare a Dachau alla fine della Seconda Guerra mondiale? Naturalmente sta a noi sapere che se un regista gira idiozie così monumentali facendo l'occhiolino è "un omaggio al genere". Se no, è un'idiozia e basta. "Shutter Island" fa tali e tanti omaggi di questo tipo al "noir" anni (19)50 che già a un quarto del film la differenza tra omaggio e idiozia sfuma e - almeno per quanto mi riguarda - la mancanza d'interesse ha prevalso.

La saggezza della rete dice che sono io a sbagliarmi (perdo 7 a 3 in Italia e negli USA) . Di tanto prevalgono quelli che hanno visto in Shutter Island un capolavoro.

Per consolarmi, mi puntello con le recensioni di salon.com ("Scorsese ha finito per fare un film che sembra un giallo degli Hardy Boys diretto da David Lynch") e del NYT ("Sta per succedere qualcosa di TERRIBILE. Purtroppo, si tratta del film che state vedendo."). Il prossimo fine settimana, se vi va una risata, vedetevi "Piovono polpette", o, se preferite i film con sopresa finale, K-Pax. Questo, lasciatelo al negozio - IMHO...

Friday, December 10, 2010

Bokuko!

Aricki Aricki Aricki Ho Ho Ho
Aricki Aricki Brr Ramaya

Aricki Brr Mutuana Gipelile Sha la la-la la-la
Aricki Brr Kewana Gipelile Sha la la-la la-la
Tumbala Tumbala Maringa Sha la la-la la-la
Aricki Brr Tatana Bitonga Sha la la-la la-la

Hey Jamboji Bara Bara
Hey jamboji Bara Bara
Mulangati Chilungati
Hey chira ba ba

Ramaya Bokuko Ramaya abantu Ramaya
Miranda tumbala Ho Ho Ho
Ramaya bokuko Ramaya abantu
Ramaya Mitumbala

Aricki Brr Mutuana Gipelile Sha la la-la la-la
Aricki Brr Kewana Gipelile Sha la la-la la-la
Tumbala Tumbala Maringa Sha la la-la la-la
Aricki Brr Tatana Bitonga Sha la la-la la-la

Hey Jamboji Bara Bara
Hey jamboji Bara Bara
Mulangati Chilungati
Hey chira ba ba

Ramaya Bokuko Ramaya abantu Ramaya
Miranda tumbala Ho Ho Ho
Ramaya bokuko Ramaya abantu
Ramaya Mitumbala

Aricki Aricki Aricki Ho Ho Ho
Aricki Aricki Brr Ramaya
Aricki Aricki Aricki Ho Ho Ho
Aricki Aricki Brr Ramaya
Aricki Aricki Aricki Ho Ho Ho
Aricki Aricki Brr Ramaya
Ramaya Mitumbala

Hey Jamboji Bara Bara
Hey jamboji Bara Bara
Mulangati Chilungati
Hey chira ba ba

Ramaya Bokuko Ramaya abantu Ramaya
Miranda tumbala Ho Ho Ho
Ramaya bokuko Ramaya abantu
Ramaya Mitumbala

Ramaya Bokuko Ramaya abantu Ramaya
Miranda tumbala bokuko, bokuko
Ramaya bokuko Ramaya abantu
Ramaya Mitumbala

(La la-la la la la la-la-la )
Aricki Aricki Aricki Ho Ho Ho
Aricki Aricki Brr Ramaya
Aricki Aricki Aricki Ho Ho Ho
Aricki Aricki Brr Ramaya
Aricki Aricki Aricki Ho Ho Ho
Aricki Aricki Brr Ramaya
Ramaya Mitumbala

Tuesday, December 7, 2010

NonSolo

Insegna del negozio:"NonSoloPizza" (a Magreta, per i pettegoli).

Io: "Avete del gnocco fritto?"
Lui: "No"
Io: "Tigelle?"
Lui: "No"
Io (che comincio a sospettare): "Ma allora, avete solo pizza?"
Lui: "Beh, anche lattine."

NonSolo.

Thursday, December 2, 2010

Sciocchezzaio di "Alza il volume" (Rai Radio 3)

  • "Questa musica assomiglia al percorso di un'astronave che magari si libra tra i grattacieli di Detroit(???)" - Valerio Corzani, Martedì 30/11/2010
  • "Nils Petter Molvaer licenziò questo disco" - Valerio Corzani, Giovedì 2/12/2010 (e infinite altre volte nel corso della settimana, il tale ha licenziato un libro,etc. etc.)
In teoria "Alza il volume" dovrebbe essere una trasmissione che mi piace - musica progressive moderna e no. Invece è quasi sempre un irritante grazie allo stile della conduzione - i conduttori cambiano lo stile no: ci dev'essere un posto dove lo insegnano.

Si tratta della versione aggiornata dello stile "radiolibbera popolare" tardi anni '70. Quello che usavano anche su "Pop-off" tizi come Dario Salvatori, Carlo Massarini e via discorrendo. All'epoca mi piacevano...pietà, ero molto giovane.

Oggi mi sembra chiaro che questi signori che dicono "contaminazione" un sacco, sono sempre in Finlandia a trovare qualche nuovo fantastico suggestivo musicista e via sciocchezzando sono portatori di un temibile tipo di idiozia, che trasforma in scemenza tutto ciò che tocca, incluso il bravo e incolpevole Nils Petter Molvaer. Un qualunque discorso serio sulla musica è impossibile: dietro le raffiche di espressioni ricercate (ma in realtà semplicemente bizzaro-adolescenziali) nascondono (quasi sempre) una cultura musicale piuttosto zoppicante. Basta vedere la roba che ogni tanto tacciano di essere "profumata di giasssss" (che neanche al microscopio a scansione) e via perleggiando.

Chi vuole esempi di altro stile di conduzione e altra cultura sulla stessa emittente si senta ad esempio "Il concerto del mattino".

Centos 5.5 or RHEL 5 on VIrtualbox 3.2.12?

Make yourself a favour and check "Enable I/O APIC" under Settings=>System=>Motherboard, lest the God of Virtual Machines gets angry at you and hangs your machine at installation.

Monday, November 22, 2010

Pidgin: soluzione per omega.contacts.msn.com "invalid certificate chain"

Problema: Pidgin è un client multiprotocollo di instant messaging. Da alcuni giorni (Novembe 2010), il plugin per MSN di pidgin va in errore lamentando una "invalid certificate chain" per omega.contatcts.msn.com.


Origine e soluzione:
Microsoft ha iniziato a firmare i propri certificati, ma (pare) che i loro webserver riferiscano ancora i certificati alle authority intermedie sbagliate. Bisogna scaricare i certificati di microsoft:

e poi installarli in /usr/share/purple/ca-certs (C:\Program Files\Pidgin\ca-certs\ sotto windows)

Wednesday, November 17, 2010

Setting up a PPTP link on a fedora system, without NetworkManager

NetworkManager is a Linux applet (Not really. It is a system daemon, and it is controlled via desktop applets, but still...) It allows you to setup and manage (activate, deactivate and such) network connections. It is mostly OK for desktop usage, and I'd say it is more than OK for wireless connections. I do have some major bones with it, though:


  • It is greedy - it tends to hog all the network connections, included the ones that should not be touched (your main ethernet connection,for instance), and you have pry them from its dead, cold fingers.

  • It screws up - sometimes. When it does, you're on your own without a lifeboat - unless you thought to bring one with you, and this is because....

  • Having been designed by GUI zealots, it has no Command Line Interface (well it does have one, but it sucks more than a tornado) and no visible configuration files - to the best of my knowledge it keeps all its config somewhere inside the user branch of the gconf DB (a configuration system that makes the windows registry seem OK - 'nuff
    said). So it is very hard to tell what is going wrong, where and why.

  • Not only this, but because it is in the user branche, connections are not shared between users, nor can they be system wide (AFAIK)

  • Not only this, but because it is so GUI oriented, there is no clear way to tailor the connection setup/tear down. For instance, on pptp/vpn links it would be nice to set up custom routes. No such luck, kiddo: with NM it's either default route or zilch (there is, truth be said, a check mark that purports to do something different, bu it does not. Or perhaps it would do something with some server side help - but this is the client side, sorry.)



So it is only fair to say that, for server oriented connection management, NetworkManger basically sucks - and I find slightly worrying the talks I read about system-config-network going away. However, what above explains why - setting up a systemwide VPN link for development work - I found it necessary to ascertain that I had a CLI way to set it up, tear it down and debug it. That is the lifeboat I was talking about a few paragraphs ago....

This was tested on FC13, kernel 2.6.34.7-61, ppp-2.4.5-9 , pptp-1.7.2-9, for a standard MSCHAP-V2 Microsoft like tunnel - your mileage will vary, and substantially if your system is much older then mine. Everything is still a little rough around the edges - smoothing it out would require integrating it with ifup-ppp, complete with all the options and stuff. The way it is, it pushes most configuration options to the ppp side (options.pptp and peers/CONNID). And yes, one would need a GUI plugin for system-config-network. You are welcome to write it. At the end, you will be able to control the connection via:


$ ifup CONNID
$ ifdown CONNID


It goes like this (by no design of mine: this is THE WAY networking scripts work in fedora/RH):



  • 'ifup CONNID' reads /etc/sysconfig/network-scripts/ifcfg-CONNID;


  • the variable DEVICETYPE=pptp (inside ifcfg-CONNID) directs ifup to invoke ifup-pptp (an undocumented innard of the RH sysconfig files);


  • ifup-pptp executes "pppd call CONNID", which uses /etc/ppp/peers/CONNID, (which in turn reads /etc/ppp/options.pptp).


  • PPPD starts the ppp process and kicks off ip-up, which (eventually) calls /etc/ppp/ip-up.local. pppd also saves its PID in /var/run/pppx.pid (x is 0,1...)


  • ip-up.local saves the interface name (pppx) inside /var/run/pptp-CONNID.pid (misnomer, but ehi)


  • ifup-pptp waits for the creation of /var/run/pptp-CONNID.pid and uses


  • its contents to try hard (too hard, perhaps: i have a feeling ifup-routes is being called twice, but no harm appear to have been done) to convince to /etc/sysconfig/network-scripts/ifup-routes to install the correct routes for the new interface.


  • ifup-routes reads the route informations /etc/sysconfig/network-scripts/route-CONNID, and uses "ip route add " to do its job.

To get to the goodies, you will need to edit/create the
following files (contents are listed below).


  1. FILE: /etc/ppp/options.pptp. Edit and accept some auth, compression. Most comments below removed: #ALF# means commented out by me)


  2. FILE: /etc/ppp/chap-secrets: edit. Add authentication information user and password, choose CONNID as you wish


  3. FILE: /etc/ppp/peers/CONNID: Create.


  4. FILE: /etc/ppp/ip-up.local: Create.


  5. FILE: /etc/ppp/ip-down.local: Create.


  6. FILE: /etc/sysconfig/network-scripts/ifcfg-CONNID: Create.


  7. FILE: /etc/sysconfig/network-scripts/ifup-pptp: Create, mode
    755 (rwx-rx-rx).


  8. FILE: /etc/sysconfig/network-scripts/ifdown-pptp: Create, mode
    755 (rwx-rx-rx).


  9. FILE: /etc/sysconfig/network-scripts/route-CONNID: Create



FILE: /etc/ppp/options.pptp. Edit and accept some auth, compression.


(Most comments below removed: #ALF# means commented out by me)

 
lock
noauth
refuse-pap
refuse-eap
#ALF#refuse-chap
#ALF#refuse-mschap
#ALF#nobsdcomp
#ALF#nodeflate
#ALF#For debug, comment later.
dump

FILE: /etc/ppp/chap-secrets: edit. Add authentication information (user and password), choose CONNID as you wish




# Secrets for authentication using CHAP
# client server secret IP addresses
####### system-config-network will overwrite this part!!! (begin) ##########
####### system-config-network will overwrite this part!!! (end) ############

username CONNID password *


FILE: /etc/ppp/peers/CONNID: Create.




#vpn.server.com is the server we connect to
pty "pptp vpn.server.com --nolaunchpppd"
lock
nodeflate
file /etc/ppp/options.pptp
require-mppe-128
#As entered in chap-secrets above
name username
remotename CONNID
ipparam CONNID


FILE: /etc/ppp/ip-up.local: Create.



#!/bin/bash
set -x
TRACEFILE=/tmp/ip-up.log
cat /dev/null > ${TRACEFILE}
exec 1>> ${TRACEFILE} 2>> ${TRACEFILE}

LOGGER="/usr/bin/logger -s -t ip-up.local -p "

IFACE=$1
REALDEVICE=$2
SPEED=$3
LOCALIP=$4
REMOTEIP=$5
LOGDEVICE=$6

PIDFILE="/var/run/pptp-$LOGDEVICE.pid"
$LOGGER daemon.info "Creating pidfile: $PIDFILE"
echo $IFACE > $PIDFILE
exit 0

FILE: /etc/ppp/ip-down.local: Create.



#!/bin/bash
set -x
TRACEFILE=/tmp/ip-down.log
cat /dev/null > ${TRACEFILE}
exec 1>> ${TRACEFILE} 2>> ${TRACEFILE}

LOGGER="/usr/bin/logger -s -t ip-down.local -p "


FILE: /etc/sysconfig/network-scripts/ifcfg-CONNID: Create.



NAME="Connessione PPTP a CONNID"
DEVICE=CONNID
DEFROUTE=no
BOOTPROTO=none
DEVICETYPE=pptp
ONBOOT=no
USERCTL=yes
PEERDNS=no
IPV6INIT=no
NM_CONTROLLED=no


FILE: /etc/sysconfig/network-scripts/ifup-pptp: Create, mode 755 (rwx-rx-rx).




#! /bin/bash
LOGGER="/usr/bin/logger -s -t ifup-pptp -p "

. /etc/init.d/functions

cd /etc/sysconfig/network-scripts
. ./network-functions


CONFIG=$1
[ -f "${CONFIG}" ] || CONFIG=ifcfg-${1}
source_config

[ -x /usr/sbin/pppd ] || {
echo $"pppd does not exist or is not executable"
echo $"ifup-ppp for ${DEVICE} exiting"
$LOGGER daemon.info \
$"pppd does not exist or is not executable for ${DEVICE}"
exit 1
}

PEERCONF=/etc/ppp/peers/${DEVNAME}

if [ ! -f ${PEERCONF} ]; then
$LOGGER daemon.info \
$"no configuration file ${PEERCONF} for ${DEVICE}"
exit 1
fi

$LOGGER daemon.notice \
$"calling pppd on ${PEERCONF} config file: pppd call $DEVNAME" \

pppd call $DEVNAME || { $LOGGER daemon.crit "pppd call $DEVNAME failed" ; exit 2 ; }


for nap in 1 2 2 5 10; do
if [[ ! -f /var/run/pptp-${DEVNAME}.pid ]]; then
$LOGGER daemon.info "Waiting for /var/run/pptp-${DEVNAME}.pid"
sleep $nap
else
break
fi
done

if [ -f /var/run/pptp-${DEVNAME}.pid ] ; then
REALDEVICE=$(tail -1 /var/run/pptp-${DEVNAME}.pid)
$LOGGER daemon.info \
$"setting up routes from /var/run/pptp-${DEVNAME}.pid on $REALDEVICE"
/etc/sysconfig/network-scripts/ifup-routes ${REALDEVICE} ${DEVNAME}
else
$LOGGER daemon.info \
$"no file /var/run/pptp-${DEVNAME}.pid cannot setup routes"
fi

exit 0


FILE: /etc/sysconfig/network-scripts/ifdown-pptp: Create, mode 755 (rwx-rx-rx).




#! /bin/bash

cd /etc/sysconfig/network-scripts
. ./network-functions

LOGGER="/usr/bin/logger -s -t ifdown-pptp -p "

CONFIG=$1
source_config


CONFIG=${CONFIG##ifcfg-}
ifile=/var/run/pptp-${DEVICE}.pid

$LOGGER daemon.info "Tearing down pptp link: will look for $ifile"
if [ ! -f $ifile ]; then
$LOGGER daemon.err $"No intfile $ifile, ppp isn't running, or we didn't start it"
exit 1
fi

IFACE=$(cat $ifile)
[ -n "${IFACE}" ] || { $LOGGER daemon.err $"No interface in $ifile"; exit 2 ; }

pfile=/var/run/$IFACE.pid
$LOGGER daemon.info "Tearing down pptp link: will look for $pfile (interface is $IFACE)
"
PID=$(cat $pfile)
[ -n "${PID}" ] || { $LOGGER daemon.err $"No pid in $pfile"; exit 2 ; }

if [ ! -f $ifile ]; then
$LOGGER daemon.err $"No PPP pidfile $pfile, is ppp running?"
exit 3
fi

kill -TERM ${PID} > /dev/null 2>&1
$LOGGER daemon.info $"Waiting for PPPD termination"
[ ! -d /proc/${PID} ] && { $LOGGER daemon.info $"PPTP link torn down"; exit 0; }

$LOGGER daemon.info $"Waiting for PPPD termination"
sleep 2
[ ! -d /proc/${PID} ] && { $LOGGER daemon.info $"PPTP link torn down"; exit 0; }

$LOGGER daemon.info $"Waiting for PPPD termination"
sleep 5
[ ! -d /proc/${PID} ] && { $LOGGER daemon.info $"PPTP link torn down"; exit 0; }

$LOGGER daemon.info $"Waiting for PPPD termination"
sleep 10
[ ! -d /proc/${PID} ] && { $LOGGER daemon.info $"PPTP link torn down"; exit 0; }

# killing ppp-watch twice in a row causes it to send a SIGKILL to pppd pgrp
kill -TERM ${PID} > /dev/null 2>&1
[ ! -d /proc/${PID} ] && { $LOGGER daemon.info $"PPTP link torn down"; exit 0; }

$LOGGER daemon.err $"Problems in terminating PPP."
exit 1


FILE: /etc/sysconfig/network-scripts/route-CONNID: Create




ADDRESS0=192.168.63.0
NETMASK0=255.255.255.0
#this is the P-t-P (remote) address at the end of the PPTP tunnel.
GATEWAY0=10.52.63.1