Che uso emacs ormai lo sanno anche le pietre. Il bello di questo editor è che esiste almeno un modo, così si chiamano gli script e file di configurazione, praticamente per tutto. Il problema è che spesso ne esiste più di uno e che per ogniuno esistono molte strade per configurarli secondo le proprie esigenze, insomma la strada per la configurazione ideale è infinita e non si riesce mai a raggiungere una stabilità.
Io, quando ho iniziato a usare emacs, sono partito, per pigrizia e ignoranza, scopiazzando la configurazione che altri utenti hanno messo sul web, in particolare ho trovato interessante quella di Alex Ott, perché Alex separa le varie funzionalità, in vero problema è che ora mi trovo con mille file di configurazione in cui spesso sono ripetute parti di configurazione delle stesse applicazioni. Di questa confusione avevo il sospetto ma da quando oggi ho provato a eseguire dovecot dall’interno di gnus ho avuto la certezza. gnus è configurato in 3 file, ma perché? Nei prossimi giorni cercherò di capirlo e di arrivare a una configurazione sensata, per ora mi accontento di aver scoperto il problema.
Archivio della categoria: Software libero
CentOS 5 – BIND/named network unreachable resolving issue | hafizonline.net blog
Note to Self: Telling apt to download specific architecture information only
Ubuntu: unity finalmente usabile
Dovendo re-installare una distribuzione Linux sul portatile di un’amica ho avuto qualche esitazione su quale distribuzione usare, poi alla fine ho installato ubuntu 12.10 ma con un po’ di modifiche.
Per disattivare il menu globale (che proprio non mi piace e che da molto fastidio a persone che non muovono il mouse con facilità) ho provveduto a fare:
sudo apt-get autoremove appmenu-gtk appmenu-gtk3 appmenu-qt indicator-appmenu
e poi per evitare di mandare dati in giro ho disabilitato la ricerca online e ho fatto:
sudo apt-get remove unity-shopping-lens.
Ora unity è usabile.
Roma: il software del futuro che avanza
Recuperare al password di root se la partizione è cifrata
Qualche sera fa volevo aggiornare la mia openSUSE sul netbook, ma purtroppo avevo dimenticato la password di root, era tardi e allora ho deciso di rimandare l’operazione. Ieri pomeriggio, tra un test di integrazione e l’altro, ho preso il piccolo portatilino ho avviato con sysrecue da USB e ho provveduto a rimuovere la password di root, quindi ho riavviato e l’ho reimpostata.
Le operazioni che ho fatto sono state:
- [cc lang="bash" escaped="true" no_cc="true"]cfdisk /dev/sda[/cc] per controllare quale fosse la partizione cifrata
- [cc lang="bash" escaped="true" no_cc="true"]cryptsetup luksDump /dev/sda2[/cc] (per la partizione era la seconda)
- [cc lang="bash" escaped="true" no_cc="true"]cryptseup luksOpen /dev/sda2 crypt_sda2[/cc] ho quindi digitato la passphrase
- [cc lang="bash" escaped="true" no_cc="true"]ls -l /dev/mapper/[/cc] per controllare cosa era successo
- [cc lang="bash" escaped="true" no_cc="true"]lvdisplay[/cc] (per prendere il nome del vg, il mio è system e contiene un logical volume di nome root
- [cc lang="bash" escaped="true" no_cc="true"]vgchange -ay system[/cc]
- [cc lang="bash" escaped="true" no_cc="true"]mount /dev/system/root /mnt/[/cc]
- [cc lang="bash" escaped="true" no_cc="true"]mount -o bind /proc /mnt/proc[/cc]
- [cc lang="bash" escaped="true" no_cc="true"]mount -o bind /dev /mnt/dev[/cc]
- [cc lang="bash" escaped="true" no_cc="true"]mount -o bind /sys /mnt/sys[/cc]
- [cc lang="bash" escaped="true" no_cc="true"]chroot /mnt /bin/bash[/cc], specificare /bin/bash è fondamentale perché sysrecue di default usa zsh e openSUSE di default non l’ha
- [cc lang="bash" escaped="true" no_cc="true"]vi /etc/shadow[/cc] e ho sostituito la password di root con un punto esclamativo “!”
- [cc lang="bash" escaped="true" no_cc="true"]exit[/cc]
- [cc lang="bash" escaped="true" no_cc="true"]reboot[/cc]
A me ha funzionato a meraviglia, invece che rimuovere la password avrei potuto ridarla ma ho voluto fare un esperimento.
Duckduckgo the term under cursor — Gist
Recuperato un Aver Aspire One 110L
Il disco SSD del mio buon vecchio Acer Aspire One 110L si è rotto molto tempo fa e fino a l’altro ieri per continuare a usarlo avevo installato Debian su una memoria USB da 8GB. Non che la soluzione non mi dispiacesse perché aveva un sapore molto geek e mi permetteva comunque di portare il netbook con me durante le ferie e usarlo per visualizzare le foto appena scattate, per leggere le email e per quelle cosette che si fanno quando si è in giro. Il file system sulla chiavetta si corrompe di frequente e quindi non ero soddisfatto della soluzione. A questo punto qualche settimana fa mi sono deciso ad ordinare un disco PATA ZIF da 1,8 pollici e un cavetto, ho cercato un po’ su Internet, ho smontato il portatile, ho rotto alcuni pezzettini di plastica interni, con il mio collega Mirko abbiamo messo un po’ di nastro biadesivo e ora ho un fantastico netbook con 30GB di spazio sfruttabile. Oggi ho installato Debian su LVM cifrato, awesome, emacs, mancano ancora alcune cose come conkeror, calibre, pidgin, gthumb, nm-applet, e la mia configurazione di emacs e il gioco è fatto.
IP routing and VLAN on Linux
This article can be stored under the category note to self as I was not able to figure out the solution till late in the afternoon, I’m trying to write it in English in the hope to be useful to more people.
The problem
A gateway between two LANs, with the internal LAN split in VLANs using tagging from the host.
As ASCII art this is the network schema:
Office LAN | eth0
|---------------|
| |
| Linux gateway |
| |
|---------------|
| eth1 eth1.120 eth1.150
Laboratory LAN |
| bond0 bond0.120 bond0.150
|--------------|
| |
| Linux Server |
| |
|--------------|
To test our applications we set up different tagged VLANs in the laboratory network, until yesterday our applications running in the office LAN just connected to applications listening on physical interfaces and a simple forwarding iptables rule on the Linux gateway was enough. Yesterday we changed our testing configuration so we need services running on bond0.120 and bond0.150 to be reached from office LAN.
The solution
- Add eth1.120 and eth1.150 to the gateway
- Add addresses 192.168.120.18 to eth1.120 and 192.168.150.18 to eth1.150
- Add forwarding rule to the gateway for new networks
- Add 2 routing tables to the server
- Add policy rules to use the new tables
To add the 2 new tables I just issued, as root, the following commands:
[ccNB_bash]echo 2 120 >> /etc/iproute2/rt_tables
echo 3 150 >> /etc/iproute2/rt_tables[/ccNB_bash]
Then I added the 2 default routes to the relative tables using the following commands:
[ccNB_bash]ip route add default via 192.168.120.18 dev bond0.120 table 120
ip route add default via 192.168.150.18 dev bond0.150 table 150[/ccNB_bash]
[ccNB_bash]ip rule add from 128.171.158.6 table 120 priority 1000
ip rule add from 128.171.159.253 table 150 priority 1000[/ccNB_bash]
To make this tables and rules permanent I created the following 4 files in /etc/sysconfig/network-scripts
- route-bond0.120
- route-bond0.150
- rule-bond0.120
- rule-bond0.150
The content of each file follows even if can be easily guessed:
route-bond0.120:
[ccNB_bash]default via 192.168.120.18 dev bond0.120 table 120[/ccNB_bash]
route-bond0.150:
[ccNB_bash]default via 192.168.150.18 dev bond0.150 table 150[/ccNB_bash]
rule-bond0.120:
[ccNB_bash]from 128.171.158.6 table 120 priority 1000[/ccNB_bash]
rule-bond0.150:
[ccNB_bash]from 128.171.159.253 table 150 priority 1000[/ccNB_bash]
Offlineimap
Just upgraded my Debian GNU/Linux, this upgraded offlineimap so I needed to modify my configuration (i.e. .offlineimaprc) adding the cert_fingerprint in the remote repository stanza.
This now looks like:
[cc lang="apache"]
[general]
metadata = ~/.offlineimap
accounts = gmail
socktimeout = 60
fsync = false
[mbnames]
enabled = yes
filename = ~/Mutt/muttrc.mailboxes
header = “mailboxes ”
peritem = “=/%(foldername)s”
sep = ‘/’
footer = “\n”
[Account gmail]
localrepository = Local-Gmail
remoterepository = Remote-Gmail
autorefresh = 20
quick = 10
expunge = no
[Repository Local-Gmail]
type = Maildir
localfolders = ~/Mail
sep = /
nametrans = lambda folder: re.sub(‘spam’, ‘[Google Mail]/Spam’,
re.sub(‘drafts’, ‘[Google Mail]/Drafts’,
re.sub(‘sent’, ‘[Google Mail]/Sent Mail’,
re.sub(‘flagged’, ‘[Google Mail]/Starred’,
re.sub(‘trash’, ‘[Google Mail]/Trash’,
re.sub(‘important’, ‘[Google Mail]/Important’,
re.sub(‘archive’, ‘[Google Mail]/All Mail’, folder)))))))
folderfilter = lambda foldername: foldername not in [ '[Google Mail]/Posta inviata’, ‘[Google Mail]/Trash’, ‘[Google Mail]/Cestino’, ‘[Google Mail]/Important’, ‘[Google Mail]/Importanti’, ‘[Google Mail]/Bozze’, ‘[Google Mail]/Spam’, ‘[Google Mail]/Drafts’, ‘[Google Mail]/Sent Mail’, ‘[Google Mail]/Trash’]
[Repository Remote-Gmail]
cert_fingerprint = f3043dd689a2e7dddfbef82703a6c65ea9b634c1
maxconnections = 5
type = Gmail
remoteuser = my_user@gmail.com
remotepass = my_password
realdelete = no
ssl = yes
folderfilter = lambda foldername: foldername not in ['[Google Mail]/All Mail’, ‘[Google Mail]/Important’, ‘[Google Mail]/Spam’, ‘[Google Mail]/Drafts’, ‘[Google Mail]/Trash’, ‘[Google Mail]/Sent Mail’ ]
nametrans = lambda folder: re.sub(‘.*Spam$’, ‘spam’,
re.sub(‘.*Drafts$’, ‘drafts’,
re.sub(‘.*Sent Mail$’, ‘sent’,
re.sub(‘.*Starred$’, ‘flagged’,
re.sub(‘.*Trash$’, ‘trash’,
re.sub(‘.*Important$’, ‘important’,
re.sub(‘.*All Mail$’, ‘archive’, folder)))))))
[/cc]
Spam review: mass-tagging nominations « Kranz Korner
Firefox e 187.it
Carissima Telecom Italia,
come molti tuoi clienti ho deciso di ricevere la bolletta online, io personalmente odio la carta e quindi mi piace l’idea che sia possibile archiviare tanti bei PDF sui miei dischi fissi invece che tanti fogli in faldoni polverosi.
Però, carissima Telecom Italia, ti faccio una domanda secca e precisa: hai mai provato ad accedere al tuo sito usando Firefox? Lo sai che secondo quanto riportato qui: http://www.w3schools.com/browsers/browsers_stats.asp è il browser più usato al mondo? Lo sai che quando, noi utenti di Firefox, facciamo click sul uno dei link da cui tu sostieni si possa scaricare il PDF della nostra bolletta non ci viene presentato un dialogo di salvataggio di un PDF ma a una finestra bianca da cui poi ci viene proposto di salvare uno stream che ha come estensione .asp? Lo sai che usando Firefox su Windows non appare neanche la finestra bianca e non si riesce a scaricare la bolletta? Lo sai che in pratica la bolletta è scaricabile senza fare i salti mortali, solo usando il browser che usa il 20% circa delle persone che accedono a Internet ma non quello usato dal 37%? In verità il tuo sito internet dovrebbe essere usabile, comunque, anche dal quel 2.4% di persone che usa Opera.
Quindi carissima Telecom Italia, ti suggerisco di investire alcuni dei soldi che ti paghiamo per fare qualche test in più sul tuo sito web e permettere a tutti, ma davvero tutti, i tuoi clienti di scaricare la propria bolletta in PDF.
Un saluto dal tuo Stefano (come mi chiama sempre, amichevolmente, la tua assistente virtuale)
XFCE4 e Dropbox
In ufficio sono passato da gnome3 a xfce4, la scelta è stata dettata dall’instabilità del primo su OpenSUSE. Da utente Dropbox (si lo so esistono servizi equivalenti, basate su software completamente libero ecc ma la pogrizia) non potevo evitare di installarlo sul PC ma come già Luca Ferrari fa notare sul suo blog i signori di dropbox non hanno considerato tunar. A questo punto ho seguito le istruzioni di Luca ed ecco che il mio Dropbox è accessibile da XFCE.
apt-spy migrated to git.debian.org
Asking for a sponsor for apt-spy was for me the starting point for a big new job. Paul Wise did a great review an found out many errors and pointed out that github is not so free as it looks out at a first glance. Paul pointed me to Benjamin Mako Hill‘s great post titled: Free Software Needs Free Tools. So even if I decided to not switch apt-spy to native package with the help of Fabrizio Regalli I imported apt-spy package that is actually on Debian archives in the collab-maint git that was created a while ago.
I merged github repo (I’m going to leave or even delete) following the guide Git community book chapter about merging.
Free Software Needs Free Tools :: Benjamin Mako Hill
emacs, org-mode e mobileOrg Android
As many of you already knows I’m constantly trying to get organized and to remember everything but as I have a bad memory I have always a notebook and a pencil with me. Some times ago I discovered org-mode that is an emacs mode to organize your life starting from the point that the first program I run after logon is emacs I decided to give org-mode a try. I found it is good but I need something in my pocket to write my thoughts when they pop up in my mind and I cannot carry my laptop everywhere, so I started copying notes from the notebook to org-mode but lately I abandoned this habit and left the emacs part aside.
I know own and android based smartphone so I’m trying to use mobile-org.
The start-up was not the best as I the workflow used by this program is not so clear, or perhaps it’s not so clear to me. To use mobileOrg you need to setup a storage area where you are going to store files used to sync you todos and then:
- push from emacs
- pull from your android device
- modify your notes on the go
- push from your android device
- pull to emacs
- push again from emacs
- and pull again from the smartphone
From my point of view last push and pull operation is not so intuitive but before doing it my notes where not synced at all.
I did not try to create a note on the road on my smartphone but I’m going to do some more tests in the next days.
PS: sorry for my bad English but I hope this post is of help to people looking for info about org-mode and mobileOrg
PS [IT]: questo post è in iglese nella speranza di essere di aiuto a più persone
moreutils
UK: London hospital to deploy open source patient record system —
A me farebbe piacere leggere le stesse cose dette del nostro SSN. Ce la faremo mai?
According to Mr Aylward, open source might prove more suitable than commercial systems developed for the National Health Service (NHS), such as the care records programme. Instead of high costs – as ‘OpenEyes’ is free software and without licence fees – he believes that with improved efficiencies and the phasing out of paper notes, adopting the OS system could save several million pounds within three years.
One of the main goals Mr Aylward described is that of improved patient care. He explained that the patient information needed by a doctor can be stored in many different repositories, with some trusts being rumoured to have hundreds of different clinical systems in which data might be stored. He added that one of the key aims of ‘OpenEyes’ is to give the doctor access to all the data needed on one screen.
viaUK: London hospital to deploy open source patient record system —.
IT: Free software and open technologies spur innovation in South Tyrol —
Sto abusando dell’opzione “Pubblicalo” di WordPress, lo so ma cosa c’è da aggiungere alla seguente notizia?
IT: Free software and open technologies spur innovation in South Tyrol —.