Funtoo

Ok, just to announce, in case anybody cares, that I am a dual resident now. I have Funtoo on my desktop (the PC I use most) and Fedora 21 in my laptop.

Usually, I write all my articles for Fedora but, for now, I will be writing them for both; mostly for Funtoo, for obvious reasons.

Anyway, this is not a “goodbye” to the Fedorian community. It is just a “Hello!” to the Funtoo community!

And, I must say, I am a very happy user!


HowTo: Use a dual screen setup with two graphics cards on GNOME

Well, I’ve been having problems with radeon. My card (Firepro v4900) is overheating when a dual screen setup is in use. The reason seems to be pretty well outlined here: http://wiki.gentoo.org/wiki/Radeon#Power_consumption_when_using_multi-head_.2F_multi-monitor

And my old friend, dpm, is to blame… Luckily, I got another v4900 from a friend and plugged it in.

Oddly, X seemed to recognize it, but GNOME would not see the display.

Well, some xrandr magic was to be conjured:

xrandr --setprovideroutputsource 1 0

This did it. It is telling card1 to use card0 as it’s source. After that command, GNOME can see it and overheating goes away.


HowTo: How to use your jack audio card with pulseaudio in Fedora 20 2

I, honestly, don’t know what happens here. I dunno if you’re delegating pulseaudio to jack or viseversa. Anyway, I use this method to enable my Focusrite Scarlett 18i20 in Fedora 20. I hope it helps out:

Procedure

#!/usr/bin/env bash

pulseaudio -k
pulseaudio -k
pulseaudio -k

pactl load-module module-jack-source;
pactl load-module module-jack-sink

After that (in GNOME 3), just go to Settings > Sound > Output and choose “Jack sink” as the default device. It should now work as your main audio output device.

Let me know, with your comments, of any success stories or feedback you might provide.


HowTo: Change your css according to client’s time

I am no fan of javascript. In fact, I despise it. But, recently, it occured to me that it would be cool to change the CSS theme according to the client’s time.

Here’s how:

function change_css_according_to_time() {
    var d = new Date();
    var h = d.getHours();

    if ( h >= 7 && h <= 19 ) {
        console.log( 'Good day!' );
        document.getElementById("mainStyle").href = '/css/default-day.css';
    } else {
        console.log( 'Good evening!' );
    }
}

change_css_according_to_time()

Demo: http://web2.woralelandia.com/

Check out the default.js. It’s as simple as that.

Also, you just need the VanillaJS framework: http://vanilla-js.com/.

Have fun!


HowTo: Cómo poder ver The Pirate Bay si tu país está bloqueando el acceso

Hoy, tras leer: http://derechoaleer.org/blog/2014/07/the-pirate-bay-el-catalogo-de-la-biblioteca-de-babel.html, me dió por ponerme de subversivo.

No me gusta cuando un país hace cosas en favor de los intereses comerciales de empresas con moral distraída.

Así que, ahí van algunas técnicas para que puedas esquivar los intentos de bloqueo de tu país:

Acceso por medio del PirateBrowser

Si descargas el navegador, podrás accesar sin problemas: http://piratebrowser.com/

IP en tu archivo hosts

Para los que preferimos seguir usando nuestro navegador, y si tu ISP está bloqueando thepiratebay.se por medio de DNS, solo debes agregar la IP de thepiratebay.se en tu archivo de hosts. Actualmente, la IP es: 194.71.107.27 pero puede cambiar. Para averiguarla, busca un servicio de dig online.

Solo pon el dominio y te dará la IP. Luego, es fácil de agregar a tu archivo de hosts.

Para GNU & Linux:

    # agrega la IP a tu archivo /etc/hosts (en Fedora, necesitas tener bind-tools instalado)
    echo $( dig @8.8.8.8 +short thepiratebay.se ) thepiratebay.se www.thepiratebay.se > /etc/hosts

Si eso no funciona, edita, como root, el archivo /etc/hosts y agrega la entrada: 194.71.107.27 thepiratebay.se www.thepiratebay.se

Es posible que tengas que actualizar manualmente la IP de vez en cuando. Solo repite los pasos y ya.

Para usuarios de mac o windows, sigue los pasos provistos acá; pero usando el mismo tipo de entrada expuesto en este artículo: http://www.rackspace.com/es/knowledge_center/article/how-do-i-modify-my-hosts-file