When you enter Ctrl-S in a shell, it pauses the program.
To resume use Ctrl-Q
Monday, March 30, 2009
Saturday, March 21, 2009
emacs+etags
from http://tulrich.com/geekstuff/emacs.html:
from your base dir:
Then, from within emacs, go over your function:
from your base dir:
$ etags [your cpp hpp files](creates a TAGS file)
Then, from within emacs, go over your function:
M-. goes to the symbol definitionM-0 M-. goes to the next matching definitionM-* return to your starting point
Sunday, March 15, 2009
emacs readonly
The command
`view-file' will open a file read-only; you could bind it to some convenient key in your .emacs.C-x C-r open a file in read-only modeC-x C-q toggle-read-only
Saturday, March 14, 2009
automounting with HAL
Following the instructions at this page:
http://en.gentoo-wiki.com/wiki/HAL
Note that because I previously tried "ivman", I had to remove it,
otherwise it would conflict with HAL, and I couldn't right-click and "safely remove".
http://en.gentoo-wiki.com/wiki/HAL
> rc-update show
> rc-update add hald default
> lshal
Note that because I previously tried "ivman", I had to remove it,
> emerge -a --depclean ivman
otherwise it would conflict with HAL, and I couldn't right-click and "safely remove".
Gesu' lava piu' bianco
Bruno Ballardini -- "Gesu' lava piu' bianco"
Questo libro e' un saggio in cui l'autore sostiene la tesi per cui la Chiesa e' stata un precursore(ice) delle piu' moderne strategie di marketing. Le prove a sostegno di questa tesi sono portate non secondo un ordine cronologico che segua lo sviluppo dell'organizzazione clericale (e dei fedeli che partecipano alla vita religiosa della Chiesa), ma piuttosto evolvendo dai piu' semplici concetti di marketing verso le strategie piu' avanzate. In questo modo anche una persona che non sappia nulla di marketing, come me, viene gradualmente a conoscenza dei termini e dei concetti usati in questo campo, e li vede applicati in casi specifici. I libro e' suddiviso in 6 capitoli: [1] La Genesi (del marketing) [2] La politica di prezzo come un fattore strategico [3] Merchandising e fidelizzazione del cliente [4] P come propaganda [5] Benchmarking e tecniche avanzate [6] Lo zen e l'arte del riposizionamento.
Riporto qua alcuni dei passaggi che mi hanno colpito di piu'.
Il mercato della colpa. E per conseguire il successo, [...], occorre innanzitutto preparare accuratamente il terreno. Ad esempio, creando disagio psicologico nel target. Per ottenere questo [...] non c'e' niente di meglio del senso di debito e del senso di colpa ad esso correlato. [...] esso e' infatti strettamente funzionale alla coesione sociale attorno all'autorita'. (pg.15)
In questo senso anche i miracoli, ovvero i ``fatti'' addotti come prova d'efficacia, potrebbero essere visti come una sorta di allucinazione testuale, un'ubriacatura da eccesso di parola. E' come se venisse esaudita l'aspettativa dei fedeli che fondano le loro rappresentazioni soltanto su quanto hanno esperito attraverso il testo scritto. Un meccanismo che origine in una fase precedente alla religione, quella della magia. Hubert e Mauss erano arrivati a comprendere che ``la maggior parte della magia e' costituita dai desideri.'' [...] Ecco il punto: il ricordo diviene scrittura, e quindi realta'. E' questo il vero miracolo. (pg.51)
Ecco una grande intuizione della Chiesa che il marketing moderno non ha mai attuato: e' piu' efficace istituire sul punto vendita una forma di animazione stabile che si ripeta regolarmente secondo gli stessi dettami, rispetto alla variazione continua. (pg.75)
Il punto di vendita piu' importante della catena deve avere sontuosita' e spettacolarita' tali da suscitare sensazioni forti. [...] D'altra parte, come potrebbero trasmettere i valori del bello coloro che hanno rinunciato alla vita mondana in favore della ragione aziendale? (pg.91)
[Referendum fecondazione eterologa] il Vaticano consiglio' l'astensione dal voto. E' qui la sottigliezza. Non votare ad un referendum abrogativo produce alla fine lo stesso risultato del votare ``no'' ma in piu' c'e' il vantaggio di evitare ai fedeli il problema di dover risolvere da soli una complicata questione etica che normalmente e' gestita dalla Chiesa. (pg. 178)
Allo stesso modo, occorre comprendere che i valori che le grandi multinazionali tentano di venderci ci appartengono gia'. Ci appartengono le cose della nostra vita, come pure i valori e le parole che li descrivono. Non esiste un amore cristiano, esiste l'amore. Si puo' avere un grande rigore morale anche senza essere religiosi. La fede non puo' essere condivisa e quindi divenire oggetto di massificazione da parte del marketing, ne' essere esportata, diventare merce di scambio, motivo di persuasione degli altri. Deve restare una questione rigorosamente privata e personale. Solo cosi' aumentera' l'autocoscienza e diminuiranno i conflitti. (pg. 200)
Riporto qua alcuni dei passaggi che mi hanno colpito di piu'.
Il mercato della colpa. E per conseguire il successo, [...], occorre innanzitutto preparare accuratamente il terreno. Ad esempio, creando disagio psicologico nel target. Per ottenere questo [...] non c'e' niente di meglio del senso di debito e del senso di colpa ad esso correlato. [...] esso e' infatti strettamente funzionale alla coesione sociale attorno all'autorita'. (pg.15)
In questo senso anche i miracoli, ovvero i ``fatti'' addotti come prova d'efficacia, potrebbero essere visti come una sorta di allucinazione testuale, un'ubriacatura da eccesso di parola. E' come se venisse esaudita l'aspettativa dei fedeli che fondano le loro rappresentazioni soltanto su quanto hanno esperito attraverso il testo scritto. Un meccanismo che origine in una fase precedente alla religione, quella della magia. Hubert e Mauss erano arrivati a comprendere che ``la maggior parte della magia e' costituita dai desideri.'' [...] Ecco il punto: il ricordo diviene scrittura, e quindi realta'. E' questo il vero miracolo. (pg.51)
Ecco una grande intuizione della Chiesa che il marketing moderno non ha mai attuato: e' piu' efficace istituire sul punto vendita una forma di animazione stabile che si ripeta regolarmente secondo gli stessi dettami, rispetto alla variazione continua. (pg.75)
Il punto di vendita piu' importante della catena deve avere sontuosita' e spettacolarita' tali da suscitare sensazioni forti. [...] D'altra parte, come potrebbero trasmettere i valori del bello coloro che hanno rinunciato alla vita mondana in favore della ragione aziendale? (pg.91)
[Referendum fecondazione eterologa] il Vaticano consiglio' l'astensione dal voto. E' qui la sottigliezza. Non votare ad un referendum abrogativo produce alla fine lo stesso risultato del votare ``no'' ma in piu' c'e' il vantaggio di evitare ai fedeli il problema di dover risolvere da soli una complicata questione etica che normalmente e' gestita dalla Chiesa. (pg. 178)
Allo stesso modo, occorre comprendere che i valori che le grandi multinazionali tentano di venderci ci appartengono gia'. Ci appartengono le cose della nostra vita, come pure i valori e le parole che li descrivono. Non esiste un amore cristiano, esiste l'amore. Si puo' avere un grande rigore morale anche senza essere religiosi. La fede non puo' essere condivisa e quindi divenire oggetto di massificazione da parte del marketing, ne' essere esportata, diventare merce di scambio, motivo di persuasione degli altri. Deve restare una questione rigorosamente privata e personale. Solo cosi' aumentera' l'autocoscienza e diminuiranno i conflitti. (pg. 200)
The letters of Vincent van Gogh
Vincent van Gogh -- "The letters of Vincent van Gogh"
I read this book, with much pleasure I must say, over the past few months. This is the collection of letters that Vincent van Gogh (1853-1890) exchanged from 1872 until his death. Those letters were mostly addressed to his brother Theo, with whom Vincent had a very close connection. I won't copy and paste here the details of van Gogh's life, but one thing that I want to keep in mind is the fact that his path started as a failed pastor, with delusions here and there, and mostly, with a long and intense training of himself (by himself for the most of it) as an artist. I jot down here few of the passages that I liked the most.
When I compare the state of the weather to our state of mind and our circumstances, subject to change and fluctuations like the weather, then I still have some hope that things may get better (pg.64)
And I don't think it ever occurs to her that God may only appear once we say the words, those words with which Multatuli ends his prayer of an unbeliever:`Oh God, there is no God.' [...] but you see, I love, and how could I feel love if I were notalive myself or if others were not alive, and if we were alive there is something wondrous about it. Now call that God or human nature or whatever you like, but there is a certain something I cannot define systematically, although it is very much alive and real, and you see, for me that something is God or as good as God. (pg.124)
What is drawing? How does one come to it? It is working through an invisible iron wall that seems to stand between what one feels and what one can do. How is one toget through that wall--since pounding at it is of no use? In my opinion one has to undermine that wall, filing through it steadily and patiently. (pg. 206)
I tell you, if one wants to be active, one must not be afraid of making mistakes now and then. Many people think that they will become good just by doing no harm--but that's a lie, and you yourself used to call it that. That way lies stagnation, mediocrity. (pg.281)
[About one of his paintings] So the last thing I would want is for people to admire or approve of it without knowing why. (pg. 291)
Enjoy yourself too much rather than tool little, and don't take art or love too seriously--there is very little one can do about it, it is chiefly a question of temperament. [...] For me, for instance, it's a relief to do a painting, and without that I should be unhappier that I am. (pg. 338)
And if, deprived of the physical power, one tries to create thoughts instead of children, one is still very much part of humanity. And in my pictures I want to say something consoling as music does. I want to paint men and women with a touch of eternal, whose symbol was once the halo, which we try to convey by the very radiance and vibrancy of our colouring. (pg.394)
The day will come, however, when people will see they are worth more that the price of the paint and my living expenses, very magre on the whole, which we put into them. [about his paintings] (pg. 419)
Even though some of the letters are not particularly interesting, I still enjoyed the book very much. The life of Vincent van Gogh has been a real adventure: the struggles, doubts, and reflections of this painter are very intense, and very much close to what human beings in general experience, making it a source of comfort and inspiration. We feel less lonely in our little life, if we that know that other people, at some point, posed the same question which righ now seems to be so hard to ourself.
When I compare the state of the weather to our state of mind and our circumstances, subject to change and fluctuations like the weather, then I still have some hope that things may get better (pg.64)
And I don't think it ever occurs to her that God may only appear once we say the words, those words with which Multatuli ends his prayer of an unbeliever:`Oh God, there is no God.' [...] but you see, I love, and how could I feel love if I were notalive myself or if others were not alive, and if we were alive there is something wondrous about it. Now call that God or human nature or whatever you like, but there is a certain something I cannot define systematically, although it is very much alive and real, and you see, for me that something is God or as good as God. (pg.124)
What is drawing? How does one come to it? It is working through an invisible iron wall that seems to stand between what one feels and what one can do. How is one toget through that wall--since pounding at it is of no use? In my opinion one has to undermine that wall, filing through it steadily and patiently. (pg. 206)
I tell you, if one wants to be active, one must not be afraid of making mistakes now and then. Many people think that they will become good just by doing no harm--but that's a lie, and you yourself used to call it that. That way lies stagnation, mediocrity. (pg.281)
[About one of his paintings] So the last thing I would want is for people to admire or approve of it without knowing why. (pg. 291)
Enjoy yourself too much rather than tool little, and don't take art or love too seriously--there is very little one can do about it, it is chiefly a question of temperament. [...] For me, for instance, it's a relief to do a painting, and without that I should be unhappier that I am. (pg. 338)
And if, deprived of the physical power, one tries to create thoughts instead of children, one is still very much part of humanity. And in my pictures I want to say something consoling as music does. I want to paint men and women with a touch of eternal, whose symbol was once the halo, which we try to convey by the very radiance and vibrancy of our colouring. (pg.394)
The day will come, however, when people will see they are worth more that the price of the paint and my living expenses, very magre on the whole, which we put into them. [about his paintings] (pg. 419)
Even though some of the letters are not particularly interesting, I still enjoyed the book very much. The life of Vincent van Gogh has been a real adventure: the struggles, doubts, and reflections of this painter are very intense, and very much close to what human beings in general experience, making it a source of comfort and inspiration. We feel less lonely in our little life, if we that know that other people, at some point, posed the same question which righ now seems to be so hard to ourself.
Tuesday, February 03, 2009
install new latex package
Download
2. move .sty file to ..textmf/tex/latex/package-name/
3. if no .sty file .run latex on the .ins file
4. type texhash
from: http://avizit.blogspot.com
2. move .sty file to ..textmf/tex/latex/package-name/
3. if no .sty file .run latex on the .ins file
4. type texhash
from: http://avizit.blogspot.com
Tuesday, January 20, 2009
Alsa: Device or resource busy
I have seen this prblem a couple of times, more or less randomly:
Today I solved it in this way:
I dont' know wether this always works, anyway...
mplayer
[AO_ALSA] alsa-lib: pcm_dmix.c:996:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy
Today I solved it in this way:
lsof /dev/snd/*
[look at the pid's, excluding kmix]
kill pid's
I dont' know wether this always works, anyway...
Wednesday, January 07, 2009
Invitation to a beheading
Vladimir Nabokov
Invitation to a beheading
Invitation to a beheading
This books is about the last few days of a man, Cincinnatus, who is condemned to death. He doesn't know when his execution will take place, neither the reason why he was condemned. The incipit of the book is the following:
"In accordance with the law the death sentence was announced to Cincinnatus C. in a whisper. All those, exchanging smiles. The hoary judge put his mouth close th his ear, panted for a moment, made the announcement and slowly moved away, as though un-glueing himself."
The novel evolves with the narration of "the last few days", with flashbacks and nightmares of the main character providing some background on the situation. For example we know that Cincinnatus' wife was cheating on him, but we don't know precisely what he has done to get to jail (neither does he).
Another interesting fact in the plot is the fact that at some point another prisoner (inmate) is brought into the cell, and he tries to be nice to Cincinnatus. Later on we discover that this person is the executioner of the sentence to death who, according to the law, should get to know better his victim.
All of the characters are quite surrealistic, something in between the ones in "The master and Marguerite" and the ones in Kafka's novels.
"It was then that Cincinnatus stopped and, looking around him as if he had just entered this stony solitude, summoned up all his will, evoked the full extent of his life. and endeavoured to comprehend his situation with the utmost exactitude. Accused of the most terrible of crimes, gnostical turpitude, so rare and so unutterable that it was necessary to use circumlocutions like 'impenetrability', 'opacity', 'occlusion'; sentenced for that crime to death by beheading; imprisoned in the fortress in expectation of the unknown but near an inexorable date (which he distinctly anticipated as the wrenching, yanking and crunch of a monstrous tooth , his whole body being the inflamed gum, and his headthat tooth); standing now in the prison corridor with a sinking heart--still alive, still unpimpaired, still Cincinnatic--Cincinnatus C. felt a fierce longing for freedom, the most ordinary, physical, physically feasible kind of freedom, and instantly he imagined, with such sensuous clarity as though ti all was a fluctuating corona emanating from him [...]." (pg. 61)
"He went on, batting his eyelashes: 'I need not to explain how precious to the success of our common undertaking is that the atmosphere of warm camaraderie which, with the help of patience and kindness, is gradually created between the sentenced and the executor of the sentence. It is difficult or even impossible to recall without a shudder the barbarity of long-gone days, when these two, not knowing each other at all, strangers to each other, but bound together by the implacable law, met face to face only at the last instant before the sacrament itself.'" (pg. 148)
"'Just an instant more. I find it ludicrous and disgraceful that my hands should tremble so--but I can neither stop nor hide it, and, yes, they tremble and that's all.[...] I feel only one thing--fear, fear, shameful, futile fear...' Actually Cincinnatus did not say all this; he was silently changing his shoes. The vein on his forehead was swollen, the bold locks fell on it, his shirt had a wide-opened embroidered collar, which impairted a certain extraordinary youthful quality to his neck and to his flushed face with its blond quivering moustache.
'Let's go!' shrieked M'sieur Pierre.
Cincinnatus, trying not to brush against anyone or anything, placing his feet as if he were walking on bare, sloping ice, finally made his way out of the cell, which in fact was no longer there." (pg. 181)
The book maybe is a little too sophisticated for my English, using a rich and varied vocabulary. Apart from this, the book is a good "inviation to a behading", in the sense that it gives to the reader the feeling of being part of something which is going on, without having a clear point of view, moving between reality and nonsense, nightmare and imagination. The book is excellentin stimulating a reflection on the way we usually perceive capital punishment, in particular the "clean and neat picture" of it that our society is giving of the procedure.
The novel evolves with the narration of "the last few days", with flashbacks and nightmares of the main character providing some background on the situation. For example we know that Cincinnatus' wife was cheating on him, but we don't know precisely what he has done to get to jail (neither does he).
Another interesting fact in the plot is the fact that at some point another prisoner (inmate) is brought into the cell, and he tries to be nice to Cincinnatus. Later on we discover that this person is the executioner of the sentence to death who, according to the law, should get to know better his victim.
All of the characters are quite surrealistic, something in between the ones in "The master and Marguerite" and the ones in Kafka's novels.
"It was then that Cincinnatus stopped and, looking around him as if he had just entered this stony solitude, summoned up all his will, evoked the full extent of his life. and endeavoured to comprehend his situation with the utmost exactitude. Accused of the most terrible of crimes, gnostical turpitude, so rare and so unutterable that it was necessary to use circumlocutions like 'impenetrability', 'opacity', 'occlusion'; sentenced for that crime to death by beheading; imprisoned in the fortress in expectation of the unknown but near an inexorable date (which he distinctly anticipated as the wrenching, yanking and crunch of a monstrous tooth , his whole body being the inflamed gum, and his headthat tooth); standing now in the prison corridor with a sinking heart--still alive, still unpimpaired, still Cincinnatic--Cincinnatus C. felt a fierce longing for freedom, the most ordinary, physical, physically feasible kind of freedom, and instantly he imagined, with such sensuous clarity as though ti all was a fluctuating corona emanating from him [...]." (pg. 61)
"He went on, batting his eyelashes: 'I need not to explain how precious to the success of our common undertaking is that the atmosphere of warm camaraderie which, with the help of patience and kindness, is gradually created between the sentenced and the executor of the sentence. It is difficult or even impossible to recall without a shudder the barbarity of long-gone days, when these two, not knowing each other at all, strangers to each other, but bound together by the implacable law, met face to face only at the last instant before the sacrament itself.'" (pg. 148)
"'Just an instant more. I find it ludicrous and disgraceful that my hands should tremble so--but I can neither stop nor hide it, and, yes, they tremble and that's all.[...] I feel only one thing--fear, fear, shameful, futile fear...' Actually Cincinnatus did not say all this; he was silently changing his shoes. The vein on his forehead was swollen, the bold locks fell on it, his shirt had a wide-opened embroidered collar, which impairted a certain extraordinary youthful quality to his neck and to his flushed face with its blond quivering moustache.
'Let's go!' shrieked M'sieur Pierre.
Cincinnatus, trying not to brush against anyone or anything, placing his feet as if he were walking on bare, sloping ice, finally made his way out of the cell, which in fact was no longer there." (pg. 181)
The book maybe is a little too sophisticated for my English, using a rich and varied vocabulary. Apart from this, the book is a good "inviation to a behading", in the sense that it gives to the reader the feeling of being part of something which is going on, without having a clear point of view, moving between reality and nonsense, nightmare and imagination. The book is excellentin stimulating a reflection on the way we usually perceive capital punishment, in particular the "clean and neat picture" of it that our society is giving of the procedure.
Thursday, December 04, 2008
sd reader on hp laptop
Check what you have
make menuconfig and enable
then re-compile the kernel, reboot. When I insert
a SD card I see (dmesg)
finally
~ $ /usr/sbin/lspci |grep "Card Reader"
02:06.2 Mass storage controller: Texas Instruments 5-in-1 Multimedia Card Reader (SD/MMC/MS/MS PRO/xD)
make menuconfig and enable
Device Drivers --->
[*] Misc devices --->
-*- TI Flash Media interface support
<*> TI Flash Media PCI74xx/PCI76xx host adapter support
Device Drivers --->
<*> MMC/SD card support --->
<*> MMC block device driver
<*> TI Flash Media MMC/SD Interface support
then re-compile the kernel, reboot. When I insert
a SD card I see (dmesg)
tifm_core: MMC/SD card detected in socket 0:1
mmc0: new SD card at address b368
mmcblk0: mmc0:b368 SD 1997312KiB
mmcblk0: p1
finally
mount /dev/mmcblk0p1 /mnt/floppy/
Wednesday, November 12, 2008
Access to serial port
In order to get rid of the error
you don't have +rw permission to access serial port
you need to add your user to the uucp group
> ls -l /dev/ttyS0
crw-rw---- 1 root uucp 4, 64 Nov 12 18:44 /dev/ttyS0
/usr/sbin/usermod -a -G uucp my_username
you don't have +rw permission to access serial port
you need to add your user to the uucp group
> ls -l /dev/ttyS0
crw-rw---- 1 root uucp 4, 64 Nov 12 18:44 /dev/ttyS0
/usr/sbin/usermod -a -G uucp my_username
Monday, October 27, 2008
dual monitor on my laptop
Using xrandr and the monitor sitting on my desk.
Edit xorg.conf and add the "virtual" line (if there is no xorg.conf and it's
using the guess-mechanism, copy the guess from /var/log/Xorg.0.log )
Then create the script "switchDual"
As root create the dir where the lockfile is stored
and add an icon for it on the desktop
Voila
Edit xorg.conf and add the "virtual" line (if there is no xorg.conf and it's
using the guess-mechanism, copy the guess from /var/log/Xorg.0.log )
Section "Screen"
...
Subsection "Display"
...
Virtual 1280 1824
EndSubSection
EndSection
Then create the script "switchDual"
$ cat bin/switchDual
#!/bin/bash
if [ -e /var/lock/subsys/gerbaudo/dualOn ]
then
echo "turning off VGA screen..."
xrandr --auto --output LVDS --mode 1280x800 --output VGA --off
rm /var/lock/subsys/gerbaudo/dualOn
else
echo "turning on VGA screen..."
xrandr --auto --output VGA --mode 1280x1024 --above LVDS
touch /var/lock/subsys/gerbaudo/dualOn
fi
As root create the dir where the lockfile is stored
# mkdir /var/lock/subsys/gerbaudo
# chown gerbaudo:gerbaudo /var/lock/subsys/gerbaudo
and add an icon for it on the desktop
$ cat ~/Desktop/startDual.desktop
[Desktop Entry]
Comment=
Comment[en_US]=
Encoding=UTF-8
Exec[$e]='/home/gerbaudo/bin/switchDual'
GenericName=startDual
GenericName[en_US]=startDual
Icon=
MimeType=
Name=startDual
Name[en_US]=startDual
Path[$e]=
StartupNotify=true
Terminal=false
TerminalOptions=
Type=Application
X-DCOP-ServiceType=
X-KDE-SubstituteUID=false
X-KDE-Username=
Voila
Saturday, October 25, 2008
gentoo - fuse
install the "fssh" stuff that you got from Justace--thanks man!
emerge sys-fs/sshfs-fuse
mkdir /rooms
mkdir /work
chmod /rooms --reference=/mnt/cdrom
chmod /work --reference=/mnt/cdrom
At this point--works as root--something wrong with permissions
groupadd fuse
usermod -a -G fuse gerbaudo
Try to reboot: still not working. Google around and try this:
chown gerbaudo:gerbaudo /rooms
chown gerbaudo:gerbaudo /work/
Now it works :-)
emerge sys-fs/sshfs-fuse
mkdir /rooms
mkdir /work
chmod /rooms --reference=/mnt/cdrom
chmod /work --reference=/mnt/cdrom
At this point--works as root--something wrong with permissions
groupadd fuse
usermod -a -G fuse gerbaudo
Try to reboot: still not working. Google around and try this:
chown gerbaudo:gerbaudo /rooms
chown gerbaudo:gerbaudo /work/
Now it works :-)
gentoo install root (disable cintex+reflex)
Something is wrong with compiling root5.20.00 on gentoo
(see this bug report)
add in /etc/portage/package.keywords
sci-physics/root ~x86
Then following this link
gerbaudo-hp ~ # ls /usr/portage/sci-physics/root/
ChangeLog files root-3.05.04.ebuild root-5.18.00d.ebuild root-5.20.00.ebuild
Manifest metadata.xml root-5.16.00.ebuild root-5.20.00-r1.ebuild
gerbaudo-hp ~ # mkdir /usr/local/portage
gerbaudo-hp ~ # mkdir /usr/local/portage/sci-physics
gerbaudo-hp ~ # mkdir /usr/local/portage/sci-physics/root
gerbaudo-hp ~ # cp /usr/portage/sci-physics/root/root-5.20.00.ebuild /usr/local/portage/sci-physics/root/
gerbaudo-hp ~ # cp -rp /usr/portage/sci-physics/root/files /usr/local/portage/sci-physics/root/
add one line in make .conf
gerbaudo-hp ~ # emacs -nw /etc/make.conf
gerbaudo-hp ~ # diff /etc/make.conf /etc/make.conf~
< PORTDIR_OVERLAY="/usr/local/portage"
gerbaudo-hp ~ # cd /usr/local/portage/sci-physics/root/
disable cintex and reflex from the ebuild
gerbaudo-hp root # emacs -nw root-5.20.00.ebuild
gerbaudo-hp root # diff root-5.20.00.ebuild root-5.20.00.ebuild~
142c142
< --disable-cintex \ --- > --enable-cintex \
148c148
< --disable-reflex \ --- > --enable-reflex \
and finally digest
gerbaudo-hp root # ebuild root-5.20.00.ebuild digest
Then
gerbaudo-hp root # emerge -av =root-5.20.00
(see this bug report)
add in /etc/portage/package.keywords
sci-physics/root ~x86
Then following this link
gerbaudo-hp ~ # ls /usr/portage/sci-physics/root/
ChangeLog files root-3.05.04.ebuild root-5.18.00d.ebuild root-5.20.00.ebuild
Manifest metadata.xml root-5.16.00.ebuild root-5.20.00-r1.ebuild
gerbaudo-hp ~ # mkdir /usr/local/portage
gerbaudo-hp ~ # mkdir /usr/local/portage/sci-physics
gerbaudo-hp ~ # mkdir /usr/local/portage/sci-physics/root
gerbaudo-hp ~ # cp /usr/portage/sci-physics/root/root-5.20.00.ebuild /usr/local/portage/sci-physics/root/
gerbaudo-hp ~ # cp -rp /usr/portage/sci-physics/root/files /usr/local/portage/sci-physics/root/
add one line in make .conf
gerbaudo-hp ~ # emacs -nw /etc/make.conf
gerbaudo-hp ~ # diff /etc/make.conf /etc/make.conf~
< PORTDIR_OVERLAY="/usr/local/portage"
gerbaudo-hp ~ # cd /usr/local/portage/sci-physics/root/
disable cintex and reflex from the ebuild
gerbaudo-hp root # emacs -nw root-5.20.00.ebuild
gerbaudo-hp root # diff root-5.20.00.ebuild root-5.20.00.ebuild~
142c142
< --disable-cintex \ --- > --enable-cintex \
148c148
< --disable-reflex \ --- > --enable-reflex \
and finally digest
gerbaudo-hp root # ebuild root-5.20.00.ebuild digest
Then
gerbaudo-hp root # emerge -av =root-5.20.00
Friday, October 24, 2008
wifi on gentoo
This is the wireless HW I have:
gerbaudo@gerbaudo-hp ~ $ /usr/sbin/lspci -v | grep Wireless
10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
First of all you need to enable the drivers in your .config
(or use the .config you have, or create it automagically).
These are the flags I have
#
# Wireless LAN
#
CONFIG_WLAN_80211=y
CONFIG_IWL3945=m
CONFIG_IWL3945_QOS=y
...
#
# Wireless
#
CONFIG_CFG80211=y
CONFIG_NL80211=y
CONFIG_WIRELESS_EXT=y
CONFIG_MAC80211=y
then build the kernel and try some debugging
ifconfig wlan0 up
then copy your old wpa_supplicant.conf and then
add in /etc/conf.d/net
config_wlan0=("dhcp")
modules=( "wpa_supplicant" )
mode_wlan0="managed"
wpa_supplicant_wlan0="-Dwext"
cd /etc/init.d ; ln -s net.lo net.wlan0
One further thing that I did (but I don't know whether
or not it's necessary) is :
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
At the next reboot it tried eth0, timed-out, and connected on wlan0 :-)
gerbaudo@gerbaudo-hp ~ $ /usr/sbin/lspci -v | grep Wireless
10:00.0 Network controller: Intel Corporation PRO/Wireless 3945ABG Network Connection (rev 02)
First of all you need to enable the drivers in your .config
(or use the .config you have, or create it automagically).
These are the flags I have
#
# Wireless LAN
#
CONFIG_WLAN_80211=y
CONFIG_IWL3945=m
CONFIG_IWL3945_QOS=y
...
#
# Wireless
#
CONFIG_CFG80211=y
CONFIG_NL80211=y
CONFIG_WIRELESS_EXT=y
CONFIG_MAC80211=y
then build the kernel and try some debugging
ifconfig wlan0 up
then copy your old wpa_supplicant.conf and then
add in /etc/conf.d/net
config_wlan0=("dhcp")
modules=( "wpa_supplicant" )
mode_wlan0="managed"
wpa_supplicant_wlan0="-Dwext"
cd /etc/init.d ; ln -s net.lo net.wlan0
One further thing that I did (but I don't know whether
or not it's necessary) is :
wpa_supplicant -B -Dwext -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf
At the next reboot it tried eth0, timed-out, and connected on wlan0 :-)
Tuesday, October 14, 2008
split multiple-pages pdf in multiple files
gs -dSAFER -dBATCH -dNOPAUSE -sDEVICE=epswrite -sOutputFile=result-%02d.eps /tmp/infile.pdf
then eps2pdf
then eps2pdf
Monday, October 13, 2008
skype on SLC4
Tried to install skype on SLC4.
Can only get the latest version (2.0.0.72) from skype.com (cannot find older versions around).
Download the statically linked package from http://www.skype.com/go/getskype-linux-static
Unpack in /usr/local/share/skype; it complains about
/skype: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.4' not found
Need more recent stdc++ library (using gcc version 3.4.6 from /usr/bin/gcc);
get gcc-4.2.1 from http://gcc.gnu.org. Then configure; make; make install.
Change the symbolyc link so that it points to the new library
/usr/lib/libstdc++.so.6 -> /usr/local/lib/libstdc++.so.6.0.9
Now skype starts without much complaining. I can hear sounds, but
cannot speak. Kill artsd (don't know, might not be the problem),
change settings with alsamixer. Then from the skype settings switch
from the default audio device to the 4th one (otherwise
"Call Failed: Problem with Audio Playback" ).
Now it seems to work (can hear my voice back during test call), but I might
have to adjust the mic volume.
Note: set audio device different from the default one for input/output/ringing, not only for output
Can only get the latest version (2.0.0.72) from skype.com (cannot find older versions around).
Download the statically linked package from http://www.skype.com/go/getskype-linux-static
Unpack in /usr/local/share/skype; it complains about
/skype: /usr/lib/libstdc++.so.6: version `GLIBCXX_3.4.4' not found
Need more recent stdc++ library (using gcc version 3.4.6 from /usr/bin/gcc);
get gcc-4.2.1 from http://gcc.gnu.org. Then configure; make; make install.
Change the symbolyc link so that it points to the new library
/usr/lib/libstdc++.so.6 -> /usr/local/lib/libstdc++.so.6.0.9
Now skype starts without much complaining. I can hear sounds, but
cannot speak. Kill artsd (don't know, might not be the problem),
change settings with alsamixer. Then from the skype settings switch
from the default audio device to the 4th one (otherwise
"Call Failed: Problem with Audio Playback" ).
Now it seems to work (can hear my voice back during test call), but I might
have to adjust the mic volume.
Note: set audio device different from the default one for input/output/ringing, not only for output
Friday, August 29, 2008
find and grep
few ways to see which files contain a string
find . -name \*config -print -exec grep "sam:" {} \; > /tmp/find_out
grep -H -r "sam:" ./
grep -lir "text to find" *
grep -i -n ‘text to search' *
grep --with-filename --line-number `find -type f`
find . -name \*config -print -exec grep "sam:" {} \; > /tmp/find_out
grep -H -r "sam:" ./
grep -lir "text to find" *
grep -i -n ‘text to search' *
grep --with-filename --line-number `find -type f`
Monday, May 26, 2008
how to concatenate pdf
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf
Friday, May 09, 2008
emacs text mode menubar
On text-only terminals with no mouse, you can use the menu bar by typing M-' or (these run the command tmm-menubar).
from
http://linux.about.com/od/emacs_doc/a/emacsdoc317.htm
from
http://linux.about.com/od/emacs_doc/a/emacsdoc317.htm
Subscribe to:
Posts (Atom)