Il blog di Gas

Solo un altro sito WordPress

Archive for the ‘gentoo’ tag

Move files with zenity progress bar

with one comment

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.

 

 

 

Written by gas

luglio 22nd, 2011 at 4:52 pm

Posted in English,Linux

Tagged with , , ,

Gnome places double entries

without comments

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.

Written by gas

settembre 13th, 2010 at 8:42 pm

Posted in English,Linux

Tagged with ,

Move files in bash with tar and progress bar

with 4 comments

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 -)

Written by gas

settembre 11th, 2010 at 3:14 pm

Posted in English,Linux

Tagged with , ,

PixieLive

without comments

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.

PixieLive

Written by gas

agosto 26th, 2010 at 7:04 pm

Posted in English,Linux

Tagged with , , ,

Unmerge Kde in gentoo

without comments

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 you can see what packages pulls in your atom.

Written by gas

luglio 24th, 2010 at 11:48 am

Posted in English,Linux

Tagged with , ,

Indirizzo ip dinamico e dyndns opendns

without comments

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

  1. 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.
  2. 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
  3. usare un client che al cambio dell’indirizzo ip avvisa dnsomatic

Read the rest of this entry »

Written by gas

dicembre 27th, 2009 at 2:39 pm

Posted in Generale,Linux

Tagged with , , , ,

Superkaramba and Gentoo

without comments

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).

superkaramba

Read the rest of this entry »

Written by gas

giugno 12th, 2008 at 5:21 pm

Posted in English,Generale,Linux

Tagged with , ,

Nokia N95 and UPNP

with 5 comments

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.

MediatombMy 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.

RhythmboxWhat 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.

Written by gas

febbraio 22nd, 2008 at 11:44 pm

Posted in English,Linux

Tagged with , , , , ,

Mldonkey and conky

with one comment

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}'}

Written by gas

febbraio 14th, 2008 at 2:12 pm

Posted in English,Linux

Tagged with , , , ,

Gnome 2.18

with one comment

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.

Read the rest of this entry »

Written by gas

giugno 1st, 2007 at 5:05 pm

Posted in Linux

Tagged with ,