Presentaciones:
Fedora16
Comunidad Fedora
Category: tech
Ciclo de Charlas de Software Libre

El próximo Sábado 19 de Noviembre vamos a estar dando dos charlas sobre Fedora en la Universidad de Luján.
Las charlas seran las siguientes:
14:00 hs. Fedora 16
16:00 hs. Comunidad Fedora
Si estas interesado en venir, inscribite en el siguiente link!
Video de Fedora 16
Fedora 16 is out!!
Fedora 16 is ready to download!!
New features are:
- GNOME 3.2
- GRUB2
- KDE 4.7
- A lot of enhancements in Virtualization including some Cloud features.
You can start downloading it here.
Full feature list is here
Spanish
Fedora 16 esta ahora disponible para su descarga.
Entre sus mejoras:
- GNOME 3.2
- GRUB2
- KDE 4.7
- Muchas mejoras en virtualización incluyendo cositas de Cloud.
Puede descargarse aquí.
La lista completa de mejoras (In inglés) puede verse aquí.
CISL 2011: ahí estuvimos
Yesterday, September 9th, we were present in the CISL (Free Software International Conference). Our presentation was shorter than we had planned because the previous speaker didn’t finish on time but fortunately we had enough time to cover all the important points.
It was Rino’s first event as a Fedora speaker and he did a great job! He also enjoyed it a lot!! Welcome Rino!!
After our presentation we met Hernán Vivani, one of our Fedora’s SA, and Claudio Pereyra Díaz, one of our translators . Hernán told us about the presentation he had given the day before. It was about how he switched a small national company from proprietary to free software
We also had some time before Richard Stallman’s presentation to give LiveCDs and answer questions to the participants.
You can download the presentation here.
Spanish
Ayer, 9 de Septiembre participamos en la CISL, Conferencia Internacional del Software Libre. La charla tuvo que ser rápida porque nos entregaron el aula tarde pero se mencionaron las cosas mas importantes de la presentación.
Fue el primer evento de Rino, como orador para Fedora y lo hizo excelente! También él lo disfruto mucho. Bienvenido Rino!!
Después de la presentación nos visitaron Hernán Vivani, SA de Fedora, y Claudio Pereyra Diaz, traductor de Fedora. Hernán nos contó sobre la charla que dio en CISL el Jueves 08 sobre su caso de éxito al migrar Postres Balcarce, de Software privativo a Software libre.
Pudimos aprovechar antes de la charla de Richard Stallman, para obsequiar LiveCDs y contestar preguntas al público.
Como lo prometido es deuda, se puede descargar la presentación aquí.
CISL 2011 ahí estaré!
Conferencia Internacional de Software Libre means Free Software International Conference.
On September 9th I will be giving a talk about Fedora 15 in our National Library. I will also talk a bit about the spins and what is coming in Fedora 16.
Another thing I will be talking about is the community and the different roles that our project has and how everyone can join us!
If you have any hint please feel free to leave a comment and/or wish me luck!
To register go here: CISL.
Spanish
El 9 de Septiembre a las 14:00 voy a dar una charla acerca de Fedora 15 en la Biblioteca Nacional. También voy a hablar sobre los Spins y que vendrá con Fedora 16.
Asimismo hablare sobre la comunidad, los diferentes roles que cualquiera puede tomar y como involucrarse!
Pueden registrase en la pagina oficial del CISL.
phew.. thanks resize2fs for being cool
Yesterday while shrinking a filesystem my computer got stock due a hardware failure:
[root@mirror /]# resize2fs -p /dev/mapper/vg_mirror-LogVol03 410G
resize2fs 1.41.14 (22-Dec-2010)
Resizing the filesystem on /dev/mapper/vg_mirror-LogVol03 to 107479040 (4k) blocks.
Begin pass 2 (max = 15391251)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXX------------------
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 😀
Spanish
Ayer mientras achicaba un filesystem mi computadora se freezo por un problema de hardware:
[root@mirror /]# resize2fs -p /dev/mapper/vg_mirror-LogVol03 410G
resize2fs 1.41.14 (22-Dec-2010)
Resizing the filesystem on /dev/mapper/vg_mirror-LogVol03 to 107479040 (4k) blocks.
Begin pass 2 (max = 15391251)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXX------------------
Bootie desde un DVD, en modo rescate, monte el filesystem y todo estaba bien. El tamaño del filesystem todavía era el original. Realice un e2fsck y después probé de nuevo con el resize2fs. Aparentemente la parte de “Relocating blocks” no hace ningún daño si se interrumpe 😀
My smart backup script
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.
#!/bin/bash
export DISPLAY=:0
#Vars for remote computer
DSTUSR=user
DSTROOT=root
DSTIP=192.168.1.2
DSTFOLDER=/path/to/destionation/backup/folder/
#Vars for my OpenWrt router
LINKSYS=192.168.1.1
LINKSSHPORT=22
LINKUSER=root
PCTRL=0
PCTRL2=0
#this part checks if I’m on my LAN, if not it tries to connect to
# my OpenVPN server running in my Linksys with OpenWrt
echo “Checking if my router is on this network”
ssh $LINKSYS -p $LINKSSHPORT -l $LINKUSER ls &> /dev/null
PSTATE1=$?;
while [ ! $PSTATE1 -eq 0 ]; do
echo “it isn’t”
if [ ! -f /var/lock/subsys/openvpn ]; then
echo “openvpn is down, let’s try to connect”
$HOME/vpn $(Xdialog –stdout –title “OpenVPN password” –no-close \
–screen-center –password –inputbox “Password” 10 100);
fi
sleep 20;
ssh $LINKSYS -p $LINKSSHPORT -l $LINKUSER ls &> /dev/null;
PSTATE1=$?;
PCTRL=`expr $PCTRL + 1`
if [ $PCTRL -eq 5 ]; then
notify-send “connection failed”
exit 1
fi
done
#this part checks if my home computer is up, if not, it will
#try to turn it on by WOL from my OpenWrt router.
echo “hmmm, is my Computer up?”
ssh $DSTROOT@$DSTIP ls
PSTATE2=$?;
while [ ! $PSTATE2 -eq 0 ]; do
echo “it’s not..”
ssh -l $LINKUSER -p $LINKSSHPORT $LINKSYS /root/wakeup &> /dev/null
sleep 30;
ssh $DSTROOT@$DSTIP ls
PSTATE2=$?;
PCTRL2=`expr $PCTRL2 + 1`
if [ $PCTRL2 -eq 5 ]; then
notify-send “cannot power on remote computer”;
exit 2 ;
fi
done
echo “it’s now”
# backup part
echo “starting backup…”
notify-send “starting backup…”
date
rsync -vaHx –progress –numeric-ids $HOME/ $DSTUSR@$DSTIP:$DSTFOLDER
notify-send “backup done”
#here it asks me if I want to turn off my home computer
Xdialog --title --stdout "remote computer is on..." --screen-center --yesno \
"Turn off computer?" 10 50
if [ $? -eq 0 ]; then
#the following line will set something in my Ethernet card that allows me to
#wake up my computer with WOL
ssh $DSTROOT@$DSTIP /sbin/ethtool -s eth0 wol g &> /dev/null
ssh $DSTROOT@$DSTIP poweroff &> /dev/null
fi
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.
#!/usr/bin/expect
if $argcsend_user “usage: \n”
send_user “$argv0 password \n”
send_user “”
exit
}
spawn sudo /usr/sbin/openvpn –config /etc/openvpn/openvpn.conf –daemon
expect “Enter Private Key Password:”
send “[lindex $argv 0]\r”
interact
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.
Español
Todo comenzó cuando tenia configurado un script de rsync en el cron, el cual me permitía hacer backup desde mi laptop a mi desktop. Mi idea era hacer backup diariamente, incluso aquellos dias en los que no estaba en casa. Con este propósito, antes de que mi script se ejecutase tenia que preparar el entorno, iniciar la VPN y asegurarme que mi PC de casa estuviese prendida.
Si el día estaba tranquilo, no había problema, pero si era un día complicado me quedaba sin backup.
Decidí hacer un script para solucionar este problema
#!/bin/bash
export DISPLAY=:0
#Variables sobre mi computadora remota
DSTUSR=usuario
DSTROOT=root
DSTIP=192.168.1.2
DSTFOLDER=/path/a/la/carpeta/donde/backupear/
#Variables de mi router
LINKSYS=192.168.1.1
LINKSSHPORT=22
LINKUSER=root
PCTRL=0
PCTRL2=0
#Esta parte verifica si mi PC esta en mi red hogareña, si no esta
#intenta conectar utilizando OpenVPN
echo “Chequeando si mi router esta en esta red”
ssh $LINKSYS -p $LINKSSHPORT -l $LINKUSER ls &> /dev/null
PSTATE1=$?;
while [ ! $PSTATE1 -eq 0 ]; do
echo “no esta”
if [ ! -f /var/lock/subsys/openvpn ]; then
echo “openvpn esta abajo, tratamos de conectar”
$HOME/vpn $(Xdialog –stdout –title “OpenVPN password” –no-close \
–screen-center –password –inputbox “Password” 10 100);
fi
sleep 20;
ssh $LINKSYS -p $LINKSSHPORT -l $LINKUSER ls &> /dev/null;
PSTATE1=$?;
PCTRL=`expr $PCTRL + 1`
if [ $PCTRL -eq 5 ]; then
notify-send “conexion fallida”
exit 1
fi
done
#esta parta chequea si mi PC esta prendida, si no esta
#va a tratar de prenderla por WOL a través de mi router con OpenWrt
echo “hmmm, esta prendida mi PC?”
ssh $DSTROOT@$DSTIP ls
PSTATE2=$?;
while [ ! $PSTATE2 -eq 0 ]; do
echo “no esta….”
ssh -l $LINKUSER -p $LINKSSHPORT $LINKSYS /root/wakeup &> /dev/null
sleep 30;
ssh $DSTROOT@$DSTIP ls
PSTATE2=$?;
PCTRL2=`expr $PCTRL2 + 1`
if [ $PCTRL2 -eq 5 ]; then
notify-send “no se puede prender la PC”;
exit 2 ;
fi
done
echo “Lo esta ahora”
# parte del backup
echo “Iniciando backup..”
notify-send “Iniciando backup..”
date
rsync -vaHx –progress –numeric-ids $HOME/ $DSTUSR@$DSTIP:$DSTFOLDER
notify-send “backup listo”
#luego pregunta si quiero apagar mi PC
Xdialog --title --stdout "la computadora esta prendida.." --screen-center \
--yesno "Apagar computadora remota?" 10 50
if [ $? -eq 0 ]; then
#la siguiente linea configura algo en mi placa de red para que pueda
#prenderla por WOL
ssh $DSTROOT@$DSTIP /sbin/ethtool -s eth0 wol g &> /dev/null
ssh $DSTROOT@$DSTIP poweroff &> /dev/null
fi
Para los diálogos tuve que instalar el programa ‘xdialog’
También estoy utilizando otro script llamado ‘vpn’ que hice con expect. La función de este script es conectarme a mi servidor OpenVPN con la password que le paso como parámetro.
#!/usr/bin/expect
if $argc<1 {
send_user “Modo de uso\n”
send_user “$argv0 password \n”
send_user “”
exit
}
spawn sudo /usr/sbin/openvpn --config /etc/openvpn/openvpn.conf --daemon
expect "Enter Private Key Password:"
send "[lindex $argv 0]\r"
interact
En mi router, hice un script que se llama ‘wakeup’ que solo contiene la siguiente linea:
etherwake AA:BB:CC:DD:EE:FF
Donde AA:BB:CC:DD:EE:FF es la MAC address de mi PC de escritorio.
“No soy una persona técnica! que esta haciendo esto?”
Básicamente, esta viendo si mi laptop esta en mi red hogareña. De no estarlo trata de establecer una conexión con mi red hogareña a través de una VPN. Una vez en la red, se fija si mi computadora esta prendida. Si no esta prendida, trata de prenderla por WOL. Cuando todo esta OK, hace un backup diferencial entre mi laptop y mi computadora de casa.
Espero que puedan usar el script para algo, sino, es un buen ejemplo de como usar Xdialog, expect y otras cosillas…
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:
echo "user ALL= NOPASSWD : /bin/file" >> /etc/sudoers
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.
Español
Para poder hacer esta tarea solo tenemos que ejecutar el siguiente comando como root:
echo "user ALL= NOPASSWD : /bin/file" >> /etc/sudoers
Donde user es el usuario al que le queremos dar permisos y /bin/file es la dirección o path es el archivo binario que le vamos a permitir ejecutar.
Para hacer más cambios al archivo sudoers es recomendable utilizar el comando ‘visudo’.
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
cat << EOF > /etc/modprobe.d/bttv.conf
alias char-major-81 videodev
alias char-major-81-0 bttv
options bttv pll=1 card=120 radio=1 tuner=38 remote=1 bttv_verbose=1 gbuffers=4
EOF
Then, reinitialize the appropriate module:
# rmmod bttv; modprobe bttv
Install tvtime that is my recommended program to watch the TV.
# yum install tvtime
Configure tvtime with your norm (in my case PAL-Nc) and scan for channels.
$ tvtime-configure -n PAL-Nc
$ tvtime-scanner
Run tvtime from your GNOME/KDE menu or running ‘tvtime’ .
For others linux distributions, like ubuntu the procedure may be similar.
Español
Para configurar esta capturadora, primero tenemos que configurar los parámetros en /etc/modprobe.d/bttv.conf
cat << EOF > /etc/modprobe.d/bttv.conf
alias char-major-81 videodev
alias char-major-81-0 bttv
options bttv pll=1 card=120 radio=1 tuner=38 remote=1 bttv_verbose=1 gbuffers=4
EOF
Luego, recargamos el modulo:
# rmmod bttv; modprobe bttv
Instalamos TVtime, que es mi programa preferido para ver TV en la PC.
# yum install tvtime
Configuramos tvtime con la norma correspondiente para nuestro país. Argentina es PAL-Nc
$ tvtime-configure -n PAL-Nc
$ tvtime-scanner
Listo! ahora podemos correr tvtime desde una consola o desde el menú de GNOME/KDE.
Para otras distribuciones de Linux, como Ubuntu, el procedimiento debería ser similar.






