Showing posts with label gentoo. Show all posts
Showing posts with label gentoo. Show all posts

Thursday, November 20, 2008

Da avere assolutamente ;)

Oggi mi è stato segnalato un software che gli amanti di Gentoo devono avere assolutamente:

La pagina web del programma dice:
Hot-babe is a small graphical utility which displays the system activity in a very special way. When the CPU is idle, it displays a dressed girl, and when the activity goes up, as the temperature increases, the girl begins to undress, to finish totally naked when the system activity reaches 100%.


Come al solito un immagine vale più di mille parole ;):









Insomma, un utility che non può mancare ... :D

Monday, September 29, 2008

"Vmware Server" and USB devices

Dopo una settimana di sbattimenti sono finalmente riuscito a venire a capo di questa annosa questione. Vediamo di spiegare un poco come stanno le cose.

Precisazione iniziale: tutte le info scritte qui non sono farina del mio sacco ma dal momento che non è stato facile raccoglierle, preferisco lasciare questo appunto. In modo che sia io che i posteri possiamo usufruirne ;).

Ho una macchina virtuale Windows 2003 Server e voglio usare delle periferiche USB. Vmware Server (attualmente sto usando la versione 1.0.7-108231) non supporta le periferiche USB 2.0, questo significa che ogni volta che attaccate una periferica USB 2.0, Windows da un bel BSOD. Tra i vari suggerimenti che ho letto per risolvere questo problema c'è anche stato quello di usare un hub USB 1.1 (come se fosse facile trovarlo). Comunque ecco come ho risolto la questione:

  1. Aggiungere la riga: none /proc/bus/usb usbfs devgid=46,devmode=664 0 0 in /etc/fstab
  2. Rimuovere il modulo USB 2.0, lasciando solo quelli per USB 1.1: rmmod ehci_hcd
Questo permette di usare solo USB 1.1 ma meglio di niente ;).

Friday, October 5, 2007

Skype 1.4 per Linux

Gli sviluppatori di skype hanno ufficialmente annunciato la versione 1.4 del loro celebre software.

Io uso le varie beta della 1.4 già da un pezzo e credo che non ci siano molte novità tra la release che attualmente ho installato:

* net-im/skype
Latest version available: 1.4.0.99
Latest version installed: 1.4.0.99
Size of downloaded files: [no/bad digest]
Homepage: http://www.skype.com/
Description: A P2P-VoiceIP client.
License: skype-eula


Vi farò sapere dopo che la installo ;)

EDIT: Fri Oct 5 15:28:47 CEST 2007

A parte qualche modifica all'interfaccia, i bottoni adesso risultano posizionati meglio e quindi facilmente raggiungibili, non noto nulla di nuovo rispetto alla versione precedente (1.4.0.99).

Thursday, August 23, 2007

fortune-mod-woody-allen-it-0.1.ebuild

Someone in the gentoo group added my ebuild to portage ;).

See here for more details.

Tuesday, August 14, 2007

LINGOT - LINGOT Is Not a Guitar-Only Tuner

Surfing the web I found an interesting application for musician :): LINGOT.

LINGOT is an acronyms for "LINGOT Is Not a Guitar-Only Tuner"

The description on lingot website says:


LINGOT is a musical instrument tuner. It's accurate, easy to use, and highly configurable. Originally conceived to tune electric guitars, its configurability gives it a more general character. (Tuning another instruments has not been tested).

It looks like an analogic tuner, with a gauge indicating the relative shift to a certain note --found automatically as the closest note to the estimated frequency--, indicating that note and its frequency.

The note will be found automatically, since the program hasn't any manual function mode (indicating the note to tune manually), for mantaining its general purpose.


I wrote an ebuild for Gentoo/Linux. You can find it here.

Happy guitar tuning ;)

Wednesday, July 18, 2007

The Glider: A Universal Hacker Emblem

Eric S. Raymond proposed a new emblem that should represent the entire hacker community.
The emblem was proposed in the October 2003, but I discovered it this morning 0_o.


hacker emblem


The symbol represents a "glider", a particular pattern existing in the simulation "The game of life".

BTW, I think that this is not a bad idea :).

Thursday, July 12, 2007

How to generate network load diagrams

Yesterday, someone asked me how I generated the network load diagrams used in the post "SSHFS performance test".

My original idea was to search for a ready to use software, but surfing the web I didn't found anything simple to install a quick to use. So i decided to write some bash lines to generate raw data and OpenOffice (oocalc) to draw the diagrams.

This is the script used to generate raw data:



#!/bin/bash

###################################
#
# Wed Jul 11 11:38:54 CEST 2007
#
# This script is used to generate
# network traffic statistics
#
# Author: Davide Restivo (xgutter@yahoo.it)
#
# Released under GPLv2
#
####################################

E_BAD_ARGS=65

# The default interface
INTF="eth0"

# Default output filename
TMP_FILE=`tempfile`
FILE_OUT="netmon-`basename $TMP_FILE`.out"

# Default delay measurement
TICK="1"

# Usage
function usage () {
echo "Please invoke this script with zero or three arguments."
echo ""
echo "Example:"
echo " $0 "
echo ""
echo "where:"
echo " defaults to eth0"
echo " is automatically generated"
echo " is equal to 1 second"
}

# Let's check command line arguments
if [ $# -eq 0 ]
then
:
elif [ $# -eq 3 ]
then
# Setting parameters
INTF=$1
FILE_OUT=$2
TICK=$3
else
usage
exit $E_BAD_ARGS
fi

################
##### MAIN #####
################
echo "Seconds - Byte sent - Byte received" >> $FILE_OUT

SECONDS_COUNTER="0"
while true;
do
INITIAL_BYTE_SENT=`ifconfig eth0 |grep bytes|cut -d":" -f3|cut -d" " -f1`
INITIAL_BYTE_RECEIVED=`ifconfig eth0 |grep bytes|cut -d":" -f2|cut -d" " -f1`

sleep $TICK

BYTE_SENT=$((`ifconfig eth0 |grep bytes|cut -d":" -f3|cut -d" " -f1` - $INITIAL_BYTE_SENT ))
BYTE_RECEIVED=$((`ifconfig eth0 |grep bytes|cut -d":" -f2|cut -d" " -f1` - $INITIAL_BYTE_RECEIVED ))

TEMP_SECONDS_COUNTER=$(($SECONDS_COUNTER + $TICK))
SECONDS_COUNTER=$TEMP_SECONDS_COUNTER
echo "$SECONDS_COUNTER $BYTE_SENT $BYTE_RECEIVED" >> $FILE_OUT
done

Tuesday, July 10, 2007

SSHFS performance test

Some days ago, I made some tests on SSHFS.

Let's talk, for a moment, about SSHFS.

From SSHFS home page:

This is a filesystem client based on the SSH File Transfer Protocol. Since most SSH servers already support this protocol it is very easy to set up: i.e. on the server side there's nothing to do. On the client side mounting the filesystem is as easy as logging into the server with ssh.

The idea of sshfs was taken from the SSHFS filesystem distributed with LUFS, which I found very useful. There were some limitations of that codebase, so I rewrote it. Features of this implementation are:

* Based on FUSE (the best userspace filesystem framework for linux ;-)
* Multithreading: more than one request can be on it's way to the server
* Allowing large reads (max 64k)
* Caching directory contents


Basically, SSHFS is a FUSE (File System in User Space) module.

In order to install it on gentoo GNU/Linux:

# emerge -av sys-fs/sshfs-fuse


Let's mount a remote directory:

# sshfs user1@192.168.177.172:/home/user1 temp_dir


If you would umount the remote dir, you should use the command:

fusermount -u temp_dir


Uhm, amazing simple ;), but what about network performances?

The following diagrams figure out network performances:




The tests had performed on a 100MBit network with very low traffic.

Saturday, May 5, 2007

Configurare un LG U8360 su GNU/Linux per usare il servizio "Naviga 3"

0 - Descrizione del servizio

"3" ha commercializzato una tariffa che permette 50MB di traffico Internet giornaliero. Il costo per l'abilitazione del servizio "Naviga 3" è di 9 EUR al mese. E' anche possibile richiedere che venga disabilitato il rinnovo automatico e rinnnovarlo soltanto quando necessario (sempre comunque su base mensile).

Devo dire che la tariffa non è niente male, considerando che una media di una decina di minuti di navigazione (~3MB) costano circa 10 EUR.

Non è sicuramente la soluzione per una connessione persistente ma permette una buona mobilità e di accedere ad Internet nelle "situazioni di emergenza".

Vediamo adesso come configurare un LG U8360, per poterlo utilizzare come modem su GNU/Linux.

1 - Carichiamo i moduli corretti

Per permettere il riconoscimento di questo telefonino come modem da parte sel sistema è necessario caricare i moduli:

usbserial (CONFIG_USB_SERIAL=m CONFIG_USB_SERIAL_GENERIC=y)
cdc_acm (CONFIG_USB_ACM=m)


nonchè aver compilato il supporto a PPP nel kernel:


CONFIG_PPP=m
CONFIG_PPP_ASYNC=m
CONFIG_PPP_SYNC_TTY=m
CONFIG_PPP_DEFLATE=m
CONFIG_PPP_BSDCOMP=m


I device creati in /dev dopo il caricamento di questi moduli (usbserial, e cdc_acm) saranno:

/dev/ttyACM0
/dev/ttyACM1

2 - Configuriamo wvdial

Per prima cosa è necessario installare wvdial. Questo software è disponibile per tutte le distro. Nel caso in cui si usi gentoo basta emergerlo con in comando:

# emerge -av net-dialup/wvdial


Sono disponibili diverse GUI a seconda del WE/DE che usate. Ad esempio chi usa gnome può optatare per gnome-ppp:

* net-dialup/gnome-ppp
Latest version available: 0.3.23
Latest version installed: 0.3.23
Size of downloaded files: [no/bad digest]
Homepage: None available
Description: A GNOME 2 WvDial frontend
License: GPL-2


Il file di configurazione per wvdial è il seguente:

[Dialer Defaults]

Modem = /dev/ttyACM0
Baud = 460800
Init1 = ATZ
Init2 = AT+CGDCONT=1,"IP","naviga.tre.it",,0,0
ISDN = 0
Modem Type = Analog Modem
Carrier Check = no
Phone = *99#
Username = a
Password = ''

Dovrete salvare questo file in /etc/wvdial.conf

3 - Connessione!!!

Fatto ciò basta aprire una shell come superuser e lanciare il comando:


# wvdial

per disconnettersi basta usare CTRL+C.

Buona Navigazione ;)

4 - Monitorare il traffico

Per non eccedere la soglia dei 50MB consiglio di monitorare il traffico sul sito di "3". Basta registrare la propria USIM ed accedere all'area "Info Costi". Nella sezione "Visualizza soglie" troverete i dettagli del traffico generato e rimanente.

Vi consiglio caldamente di non eccedere la soglia dei 50MB ;)

Saturday, April 21, 2007

A set of fortunes of "Woody Allen Quotes" (In Italian)

Partendo dal pdf di citazioni di Woody Allen creato da Filippo Corti ho creato un set di fortunes di tali citazioni.

Il pacchetto è scaricabile qui (dal momento che Altervista ha problemi con i referrer, per scaricare il pacchetto fate copia ed incolla del link in un'altra finestra del browser).

Ho anche creato degli ebuild per gentoo. Chi fosse interessato può trovarli qui.


Edit Sat Jan 17 21:55:05 CET 2009: Dal momento che Lycos Europe ha deciso di chiudere i battenti, sono stato costretto a spostare tutta la mia roba compreso questo pacchetto su Altervista. Il link sopra quindi è stato corretto.

Sunday, March 25, 2007

Il mio nuovo WM/DE

Dopo anni di onorato servizio del mio amato Windowmaker ho deciso di passare a Gnome. Non che il primo mi abbia in qualche modo deluso anzi, lo reputo uno dei migliori WM in fatto di leggerezza e usabilità. Ho solo deciso di cambiare un poco :) o come si direbbe:

... vorrei una pausa di riflessione, sarebbe meglio che non ci sentissimo per un po per capire se ...


Per aggiungere ancora di più un tocco di modernità (LOL ;)) ho deciso di configurare anche un composite engine (Beryl). Ho provato Beryl per un paio di giorni e sono rimasto favorevolmente impressionato dalla stabilità raggiunta da questo software, non me lo sarei mai aspettato.

Anche se la mia scheda video (Intel 855GM) non è l'ultimo ritrovato della tecnologia devo dire che fa il suo sporco lavoro :D.

Di seguito un paio di screenshot del mio nuovo desktop:


Tuesday, November 14, 2006

... continuando a parlare di heartbeat

Visto che ho parlato dei miei problemi con heartbeat qui, posto anche dove reperire le soluzioni ;)

Gentoo Buzilla

Clear-Text: http://bugs.gentoo.org/show_bug.cgi?id=152776
Secure: https://bugs.gentoo.org/show_bug.cgi?id=152776

Wednesday, October 25, 2006

heartbeat-2.0.7 e kernel version

Dopo due giorni di sbattere la testa su questo messaggio di errore:


Oct 23 12:38:16 auriga CTS: BadNews: heartbeat[11283]: 2006/10/23_12:37:46 ERROR: Cannot write to media pipe 2: Resource temporarily unavailable


ho finalmente compreso che heartbeat è incompatibile con versioni di kernel superiori al branch 2.6.16.

Linux idra 2.6.16.14 #1 SMP Tue Oct 24 15:32:19 CEST 2006 i686 Intel(R) Xeon(TM) CPU 3.60GHz GNU/Linux


Alla fine a parte dei piccoli bug nell'ebuild di gentoo sembra andare tutto.

P.S.: per chi fosse interssato questo è il link del bugreport dove ho postato una patch per l'ebuild heartbeat-2.0.7-r2 che risolve vari problemi.

Tuesday, May 23, 2006

mpd && asus hotkeys REVISITED

#!/bin/bash

###############
MPD_URL="localhost"
MPD_PORT="6600"
###############

function xecho() {
echo "$1" | osd_cat --font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" --shadow=2 --pos=top --align=center --colour=yellow --delay=2
}

function send_command_to_mpd () {
echo $1 | nc -q1 $MPD_URL $MPD_PORT
}

function get_current_song() {
filename=`send_command_to_mpd currentsong | grep "file: " | sed -e 's/file: //'`
artist=`send_command_to_mpd currentsong | grep "Artist: " | sed -e 's/Artist: //'`
title=`send_command_to_mpd currentsong | grep "Title: " | sed -e 's/Title: //'`

if [ "$artist-$title" == "-" ] ; then
echo $filename
else
echo "$artist -- $title"
fi
}

function mpd_status () {
status=`send_command_to_mpd status | grep "state:" | sed -e 's/state: //'`
case $status in
play ) echo play ;;
pause ) echo pause ;;
stop ) echo stop ;;
* ) echo unknown ;;
esac
}

case "$1" in
play_pause )
case `mpd_status` in
play ) send_command_to_mpd pause && xecho "`get_current_song`" ;;
pause ) send_command_to_mpd play && xecho "`get_current_song`" ;;
stop ) send_command_to_mpd play && xecho "`get_current_song`" ;;
esac ;;
stop ) send_command_to_mpd stop && xecho "`get_current_song`" ;;
next ) send_command_to_mpd next && xecho "`get_current_song`" ;;
previous ) send_command_to_mpd previous && xecho "`get_current_song`" ;;
* ) exit 1;;
esac

exit 0

asus_acpi events

I forgot asus_acpi events :S

gutter@giskard ~/.asus_acpi/events $ for list in `ls mpd*`
> do echo Filename: $list
> cat $list | grep -v \# | grep -v -e "^$"
> done

Filename: mpd_next
event=hotkey.*41[[:space:]].*
action=~/.asus_acpi/mpd.sh next
Filename: mpd_play_pause
event=hotkey.*45[[:space:]].*
action=~/.asus_acpi/mpd.sh play_pause
Filename: mpd_previuos
event=hotkey.*40[[:space:]].*
action=~/.asus_acpi/mpd.sh previous
Filename: mpd_stop
event=hotkey.*43[[:space:]].*
action=~/.asus_acpi/mpd.sh stop

Monday, May 22, 2006

mpd && asus hotkeys

A bunch of bash lines in order to use mpd in combination with Asus hotkeys.

This sript requires: netcat, xosd, asus_acpi and mpd ;).

#!/bin/bash

###################
MPD_URL="localhost"
MPD_PORT="6600"
###################

function xecho() {
echo "$1" | osd_cat --font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" --shadow=2 --pos=top --align=center --colour=yellow --delay=2
}

function send_command_to_mpd () {
echo $1 | nc -q1 $MPD_URL $MPD_PORT
}

function get_current_song() {
filename=`send_command_to_mpd currentsong | grep "file: " | sed -e 's/file: //'`
artist=`send_command_to_mpd currentsong | grep "Artist: " | sed -e 's/Artist: //'`
title=`send_command_to_mpd currentsong | grep "Title: " | sed -e 's/Title: //'`

if [ "$artist-$title" == "-" ] ; then
echo $filename
else
echo "$artist -- $title"
fi
}

function mpd_status () {
status=`send_command_to_mpd status`
play_or_pause=`echo $status | sed -e 's/.*state: //' -e 's/ song:.*//'`
case $play_or_pause in
play ) echo play ;;
pause ) echo pause ;;
stop ) echo stop ;;
* ) echo unknown ;;
esac
}

case "$1" in
play_pause )
case `mpd_status` in
play ) send_command_to_mpd pause && xecho "`get_current_song`" ;;
pause ) send_command_to_mpd play && xecho "`get_current_song`" ;;
stop ) send_command_to_mpd play && xecho "`get_current_song`" ;;
esac ;;
stop ) send_command_to_mpd stop && xecho "`get_current_song`" ;;
next ) send_command_to_mpd next && xecho "`get_current_song`" ;;
previous ) send_command_to_mpd previous && xecho "`get_current_song`" ;;
* ) exit 1;;
esac

exit 0

Wednesday, February 8, 2006

Xgl

Sono rimasto davvero impressionato dai risultati raggiunti dal progetto Xglx. I video sono davvero impressionanti e sentendo i pareri di alcuni utenti del forum che lo hanno provato mi pare di capire che se si è in possesso di una "buona" scheda video non si hanno grossi rallentamenti del sistema. Ovviamente il progetto è ancora in beta testing ma credo che le premesse ci siano tutte.

Tuesday, December 6, 2005