Archive for the ‘Linux’ tag
Laptop ubuntu suspend and nvidia virtual tty
I decided to keep ubuntu even if I don’t like this new release ( hardy ) at all. When it came out it used to hang for no reason , the new kernels seem to have solved the issue.
I had two big problems, I couldn’t hibernate/suspend and I couldn’t switch to the ttys with Alt+F1 for example.
Starting from the latter I realized that the nvidia-glx package instead of the nvidia-glx-new does the job. Since I don’t know the difference between the two packages and I really don’t care to have the newest nvidia driver I consider this problem fixed.
Now suspend works and not sometimes or just one time like it used in the past, I had to change some config options in /etc/default/acpi-support
SAVE_VBE_STATE=false
POST_VIDEO=false
SAVE_VIDEO_PCI_STATE=true
Hiberating is still a problem or better waking up from hibernation is a huge deal on my laptop. It does hibernate and it tries to wake up during next boot but when X starts everything freeze. It seems a kernel or xorg problem because I can’t turn on/off the capslock led. Here’s the bug I’ve filled, hopefully someoene will look at it.
Installazione Windows Xp1 e Linux
Ho comperato un nuovo harddisk e ho deciso, dopo averne fatto a meno per un anno, di installare windows xp….magari una mezz’oretta con Cod4 ci sta.
Inizio col dire che è stata più lunga del previsto.
Ho una vecchia copia di windows xp sp1 che non ha al suo interno i driver per il controller sata della mia scheda madre (ICH9) e allora ho dovuto scaricarmeli dal sito della Asus. Dopo averlo fatto mi sono ricordato di quel famoso pulsante F6 da premere in fase di installazione di windows per poter caricare driver di terze parti, subito dopo un flash: “Ma serve il floppy??????”. Già …..
E dove lo prendo un dischetto? Ho varie chiavette, da 128 MB a 8GB, ma di dischetti pochi o nulla…ma uno si,che non va. “Ravana ravana” ho trovato in un angolo di una libreria una vecchia confezione di Verbatim con scritto “Gia Formattati!!” Wow
Copiati i driver sul dischetto e riavviato facendo il boot da cd di windows mi trovo schermata nera, solo una piccola scritta “Rilevazione Hardware” in corso e poi nero completo e cd fermo che non legge.Sia il cd? Cambiati 3 cd e stesso problema.
Ho poi scoperto che se l’installer di Microsoft trova sugli harddisk più di una partizione con la flag “bootable” esce senza avvisare lasciandoti li come un pirla con la schermata nera. Ho risolto scollegando gli altri due harddisk in raid (quando ho fatto il raid forse ho creato anche il danno), un altra soluzione con “parted” era di togliere le flag bootable o lasciarne al massimo una.
In compenso però ora mi ha avvisato che cambierà la risoluzione dello schermo….ma vedi di andare a ….
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}'}
New Emerald Theme
New emerald theme for my desktop, I’ve modified a little Scaled Black Mod by DBO


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.
Ubuntu, Debian Etch e le email
Ci sono in giro un sacco di howto complicati (sopratutti quelli che parlano di “Perfetct Setup”) su come creare un server mail in debian / ubuntu ma ce ne sono pochi per quelli come me che hanno la semplice esigenza di voler leggere le email generate dal sistema allo stesso modo di come leggono le email mandate dagli amici.In pratica la mia esigenza è quella di reindirizzare tutte le mail di sistema su una casella email esterna tipo mionome@gmail.com.
Bill
Contentone…

Debian 4.0 out
A few months ago Etch was freezed now it has been officially released as Debian 4.0
These are the release notes and among the new changes I found:
- PHP5.x
- MySQL 5.x
- Apache 2.2.x
- GCC v4.1
- from XFree86 to X.org v7.1
Updating
Fist of all install aptitude
apt-get install aptitude
I used to have Debian Sarge 64 that is a semi official backport , now Etch is shipped with amd64 architecture too so the backport is not needed anymore. Updating is not difficult , one should change all “sarge” to “etch” in /etc/apt/sources.list, mine look like this
deb ftp://mirror.switch.ch/mirror/debian/ etch main contrib non-free
#deb http://www.backports.org/debian sarge-backports main contrib non-free
deb http://security.debian.org/ stable/updates main contrib non-free
deb-src http://http.us.debian.org/debian stable main contrib non-free
deb-src http://non-us.debian.org/debian-non-US stable/non-US main contrib non-free
# TOR
deb http://mirror.noreply.org/pub/tor etch main
deb-src http://mirror.noreply.org/pub/tor etch main
the “www.backports” line is comments out because etch hit stable just today. Backports are binaries compiled for etch and shipped for sarge, sometime you can’t install a package because it misses a dependency but you can run it because it doesn’t miss any dependency while it runs, hence that backports that let me use the latest mldonkey with sarge for example.
Then
apt-get update
aptitude -f --with-recommends dist-upgrade
Note that aptitude was used rather that apt-get dist upgrade because is known to be more strict on dependencies that apt-get dist-upgrade, installing aptitude here as docs say will bring in lots of other packages.
I hope that etch will be as good as sarge , for me sarge never hanged once in its life, the only problem I had was a that a couple of deamons used to exit silently after a couple of weeks running . Hopefully etch comes with a version of shorewall that is able to handle traffic shaping.
2 cents about gentoo : I love gentoo and I have no intention to change my desktop distro …but debian management is damn faster… I remeber last Gcc major upgrade , rebuilding the the system and then the world , emerge breaking during night, a couple of days compiling vs 20 min of debs fetching in debian.
Edit: Squid and Shorewall have new configurations:
- Squid: ( ola ola Christian )delete these lines
httpd_accel_host virtualand add this
httpd_accel_port 80
httpd_accel_with_proxy on
httpd_accel_uses_host_header onalways_direct allow all.Now look for http_port X.X.X.X and add “transparent” the result should be something like this:http_port 192.168.1.2:8080 transparent
- Shorewall: have a look at /usr/share/doc/shorewall/examples . Now the file “zones” must contain the firewall zone, there are no comments and no display any more so in the end you should find something like this:
net ipv4
loc ipv4
fw firewall
ipv4 is the default for normail traffic
Kiss WordPress Upgrade Script
Description
This is a KISS ( Keep It Simple Stupid ) script to backup and upgrade to the latest version your wordpress blog.You will need a shell / ssh to run this script ( tested on standard linux bash ).
Features
- No configuration needed
- Full Database Backup
- Full blog root backup excluding the backup directory
- Automagic blog upgrade
- Easily written and hence easily adaptable
Installation
open a shell and “cd” to your wordpress blog root path ( the one that contains wp-admin directory or wp-config.php for example)
wget http://www.lucagasperini.com/wpautoupgrade.sh
chmod u+x wpautoupgrade.sh
Usage
open a shell and “cd” to your wordpress blog root path
sh wpautoupgrade.sh
Now point your browser to http://www.example.com/wp-admin/upgrade.php
Restore
I have an idea for doing things the KISS way but no time for now so you have to do things manually . The backup performed is standard so you can simply follow the codex.
Notes
- Two different backups are made , content and sql table, they are stored in /pathtoblog/backup.
- To download your blog backup file point your browser to http://www.example.com/backup/files.tar.gz.
- To download your sql table backup point your browser to http://www.example.com/backup/sql.gz
- All backups are kept and are not backed-up ( buckups don’t contain older backups). This mean that over time the backup directory can potentially become huge.Check it and delete older ones
- I didn’t want this script to call the upgrade.php autamatically cause it means no feedback at all.
- If you don’t have a standard wordpress install don’t use this script. For example if you use a Debian package to install wordpress this script won’t work because the deb has been debianized and all config have been moved to /etc/wordpress rather than standard /blogroot
- If it doesn’t work is your fault