Archive for the ‘gentoo’ tag
Move files with zenity progress bar
I’m playing with a script that moves files between two directories and does that by piping two tar commands, so called Fast Copy.
You need zenity to see the progress bar, it is a work in progress as there are some bugs, eg when you click “cancel” the two tar child processes are not killed for some reason, I couldn’t get the correct exit code that probably gets lost somewhere.
Probably in the future I’ll write a better notification.Suggestions and modifications are wellcome.
Gnome places double entries
As a gentoo user I’ve been stuck with gnome 2.26 for ages and when I emerged gnome 2.28 I found out that two out of three nfs shares had double entries in the gnome places menu. It seems that there is some sort of problem with gvfs, some users have reported double entries in gnome places for local mounts and for remote shares.
I could solve the problem (now, end life of gnome 2.30) by mounting my shares with “defaults” as an option. These things make me wonder why I like computers.
Move files in bash with tar and progress bar
Example
gas@caldaia ~ $ my_move source_dir/ dest_dir/
43.5GB at 61.0MB/s eta: 59s 91% [=========== ]
You need to install “command line progress bar”, in gentoo it can be installed with emerge bar in ubuntu the deb can be grabbed here and installed with gdebi.
my_move:
#! /bin/sh
SOURCE="$1"
DEST="$2"
SIZE=$(du -sb "$SOURCE"|awk '{print $1}')
(cd "$SOURCE" && tar -cf - *)|bar -s $SIZE| (cd "$DEST" && tar -xBpf -)
PixieLive
A friend of mine, Christian, has released PixieLive, a slax based live linux distro build with gentoo.
It’s one of the few live distributions that support Intel GMA500, popular on netbooks like some Asus EEEPC.
Unmerge Kde in gentoo
Update
emerge --ask -C `eix -C kde-base --only-names --installed`
nano /etc/make.conf
and delete kde from the USE flags, remove qt3support and qt4 also if you don’t need them anymore
emerge -uavtqND world"
Now you should have just a few kde packages in the list you got as an output of that command, it’s your choice to leave them or unmerge them manually, with unmerge -pv –depclean
Indirizzo ip dinamico e dyndns opendns
Ogni qualvolta ci si collega ad internet viene assegnato un indirizzo ip pubblico al proprio computer/router, in Italia quasi tutte le connessioni adsl private hanno un ip dinamico che camba tutte le volte che ci si riconnette. Può tornare comodo conoscere questo ip per poter raggiungere il proprio computer dall’esterno ( lavoro, università ) e per evitare di doverselo scrivere su un “post it” tutte le volte che si accende il modem è possibile utilizzare un dns dinamico .
Razionale
- iscriversi ad un servizio di dns dinamico, si potrà scegliere un dominio di terzo livello ( terzolivello.secondolivello.it) a cui associare l’indirizzo ip del computer.
- iscriversi a dnsomatic che provvederà a fornire a tutti i servizi che si usano (come i servizi di dns dinamico ma anche altri come opendns) l’indirizzo ip del computer
- usare un client che al cambio dell’indirizzo ip avvisa dnsomatic
Superkaramba and Gentoo
Nowadays it seems that superkaramba works well, in the past it was heavy and buggy and I used to have conky. There are no particular reasons that made me switch to superkaramba , other than moving from Gnome to Kde.
My superkaramba monitor is based on the dual cpu monitor by Loacoon, I changed it a little to show some useful stuff , some of them gentoo specific ( last sync, last emerges, currently emerging….. genlop is a dependency).
Nokia N95 and UPNP
Finally i got it….at first it was a mess, some explanations on what does what:
- Media Server: it serves the content on the network
- Media Renderer: it renders the content served by a media server
So I actually needed both on my gentoo linux.
Probably the easiest way to browse content served by upnp servers is djmount , it works as a FUSE file system ( that can be mounted by a normal user) and it looks for all the upnp devices in a network. It works very well even with content provided by Windows Vista (or better from the Media Player that comes with windows vista). You create a directory and simply “djmount it”, in that directory there will be other subdirectories , one for each media server you have in your network.
Easy and working but not that cool, I mean…all this new stuff and , in the end, I still have to browse directories. I’m not using these new things just because I don’t want to plug in an usb cable, I’m not that lazy. So I went searching in various forums another solution.
My first choice as media server was ushare, somehow connected to the geexbox project but it had its limitation, one above all that it doesn’t read tags, so when you copy a music file to another device you must retag it manually. Another problem was the init script that didn’t work that well and I didn’t have time/will to fix it. Mediatomb seems the definitive choice to me, it seems a nice project, it reads metadata and has a built in sqlite backend. (you can use mysql too but i don’t have the server on my box). Mediatomb has a webserver you can connect to and you can add/delete content to your share and chose how to rescan your library , you can chose inotify on that ( if you are using beagle you should already have inotify in your kernel).
When it goes to the Media Renderer it seems that there is not much choice yet, but there is some and in particular there is gmediarenderer from the GNU guys. GmediaRender , as the names says, it’s able to render content served from a MediaServer, it needs gstreamer as a backend for all the codecs (it actually uses gstreamer to render the stream ). If you have gmediarender running you can simply go to your nokia N95 media player , chose a song and in options chose “execute on personal network” ( or something like that) and your computer (not the phone) will sound. You can do the same for videos or pictures.
What about coherence? I have it installed and the rhythmbox plugins actually works , I can see my N95 and browse its contents but you can’t (yet) make rhythmbox work as a MediaRenderer. Coherence is supposed to be a full UPNP solution with its server, renderer and controller but the people who develop it are very good in making Youtube videos but not that good to explain the world “how the hell that damn thing works”.
What is missing? On my nokia I can chose to copy or move stuff to my personal network, I can’t do it and don’t know what part of this upnp mess should provide this feature.
Mldonkey and conky
In the past conky had some built in features regarding mldonkey that have been dropped later. I launch a script that uses netcat to do the same thing ( at least what I need).
#! /bin/sh
USER=user ## mldonkey user
PASS=pass ## mldonkey password for user
HOST=192.168.1.2 ## host where mldonkey is running
PORT=4000 ##port
(echo "auth $USER $PASS";echo $1;echo q) | nc $HOST $PORT
and then for conkyrc
${execi 50 ml_command bw_stats|grep Down|awk -F " " '{print $1,$2,$3,$10,$11,$12}'}
Gnome 2.18
E’ da un paio di settimane che sto su gnome 2.18 2.18.1 e anche se masked sul mio sistema è stabile quanto il 16 se non di più.
In gnome 2.16 nautilus dava un po di problemi , dal famoso “incrozzarsi e riavvio” al ” io decido da solo che non hai i diritti per cancellare il file anche se non è vero” ; nel 2.18 non sembrano esserci più.
Per il resto ho individuato ( come sempre ) un po di pro e un po di contro.
Fra i pro metterei il guadagno in velocità e la maggior reattività , fra i contro spicca la furba scelta di togliere il backend per xine e di usare solo gstreamer 0.10 con una serie di menate tipo tirare avanti con la rotella o trovarsi il play che diventa “vai avanti a rallentatore”, togliere xine e usare quel cesso di gstreamer per i video è stato un bell’errore.
