phew.. thanks resize2fs for being cool

Yesterday while shrinking a filesystem my computer got stock due a hardware failure:

Booted from a DVD in the rescue environment, mounted the filesystem and everything was OK. The size was still the original. I performed an e2fsck and then tried again. Apparently, the “Relocating blocks” part doesn’t cause any corruption if interrupted 😀

My smart backup script :O

I was used to have a rsync call in my crontab to perform backup from my laptop to my desktop. My idea was to backup my laptop everyday even if I wasn’t at home, so before the time that the rsync ran I had to make sure that I was connected to my home network via OpenVPN and that my desktop was on.

If the day was calm, no problem, but when I was busy at work that meant no backup for that day.

I decided to code my own script to solve this problem.

for the dialogs, I had to install ‘xdialog’

Also, I’m calling another script called ‘vpn’ that I made with expect, it’s used to connect to my OpenVPN server with the passphrase I specify with a parameter.

if $argcsend_user “usage: \n”
send_user “$argv0 password \n”
send_user “”

spawn sudo /usr/sbin/openvpn –config /etc/openvpn/openvpn.conf –daemon
expect “Enter Private Key Password:”
send “[lindex $argv 0]\r”

In my router I made an script called ‘wakeup’ that only runs:

Hope you can use it for something, if not, you have a good example of how to use Xdialog, expect and some other things.

How to allow a user to run a single command as root via sudo

In order to allow a user to run a single command as root using sudo run the following as root:

Where user is the specified username and /bin/file if the path to the binary that we are allowing this user to run.

If you want to do further changes to the sudoers file it’s recommended to use the command ‘visudo’ to do so.

How to set up kozumi ktv-01c in Fedora ?

In order to setup this card, you have to add these parameters to /etc/modprobe.d/bttv.conf

Then, reinitialize the appropriate module:

Install tvtime that is my recommended program to watch the TV.

Configure tvtime with your norm (in my case PAL-Nc) and scan for channels.

Run tvtime from your GNOME/KDE menu or running ‘tvtime’ .
For others linux distributions, like ubuntu the procedure may be similar.

Solución: Mic. roto en Acer 1410

Thanks to Mathieu Bouffard, he helped me to to workaround the issue with my mic in Acer Aspire One 1410.


Somehow the ALSA driver is trying to pass to PulseAudio an stereo output that PulseAudio doesn’t understand.


Use jackd as a “proxy” between ALSA and PulseAudio, jackd will capture the input in mono from the ALSA driver, and pass it to PulseAudio.

Download his module for PulseAudio:

Configure PulseAudio to no auto respawn when killed.

Create a file in our home directory ~/

Create the config file for ALSA: ~/.asoundrc

and last but not least, create a mini-script to launch PulseAudio using this configuration. I called it ~/pulsejack:

We run our script:

A patch was submitted to the alsa devel team to fix this problem at ALSA level.