Yet Another Blog

March 11, 2011

Tree Style Tab and Firefox 4.0

Filed under: computer, hacks, Software — Tags: , , , — guilleml @ 2:55 pm

It seems Tree Style Tab is not working with firefox 4.0 yet, it works just for the betas, you can make it work easily and fast if you want to.

First of all, you have to have firefox 4 installed. You will also need the Tree Style Tab xpi file, download the last version from the download section.

Once you have the treestyletab.xpi file, open it with a zip archiver like 7zip, winrar or just rename it as and double click it.

Localize the file install.rdf inside the zip file, it’ll be in the root level. Then you just have to edit it, go to line 157 (it may change depending on the Tree Style Tab version).

em:maxVersion=”4.0b12pre” />

Change the maxVersion to one equal or higher than your firefox installed.

em:maxVersion=”4.1″ />

Save the file overwriting the old install.rdf and drop treestyletab.xpi to the firefox window, the installation will succeed.

Now you just have to restart firefox. You can follow the same procedure with any firefox extension, of course, it may not work, that’s why the programmer didn’t include the new firefox version.


February 27, 2010

Apple’s iPod (bad) quality

Filed under: gadgets, ipod — Tags: , , , — guilleml @ 3:01 pm

I have a 5G iPod Video that I bought new some years ago, when it was a new model, 4 years ago I think and I’ve opened it today, I didn’t do it before and that’s weird in me.

My surprise was I found a screw behind the battery, that screw was from the harddisk, it didn’t make me happy, my iPod wasn’t supposed to be refurbished and if it is not, why the harddisk lost a screw? a harddisk never has to be opened, how was it built?

For the price I paid I was expecting something more, maybe…don’t know…all the screws in place?

iPod screw 1

iPod screw 2

January 20, 2010

Installing Solaris 10 on a Sun Enterprise T1000

Filed under: Uncategorized — guilleml @ 11:33 am

Installing Solaris 10 in a T1000 is not as easy as you think as this machine doesn’t have any USB ports nor optical units, just ethernet interfaces.

We will need:

  1. Another machine with Solaris or OpenSolaris. I am going to use a VirtualBox machine with OpenSolaris as I don’t have another Solaris machine. The ethernet should be configured as “bridged” in VirtualBox and the host machine must be in the same subnet as the T1000 where we want to install Solaris.
  2. The Solaris 10 64bits install DVD for SPARC (sun4v). I downloaded the image and mounted it inside VirtualBox.
  3. The OpenSolaris server and the T1000 must be in the same subnet. We can get the T1000 MAC address from the OpenBoot or from the documentation.

We load OpenSolaris in the virtual machine and we mount the install DVD:

  1. Mount the DVD
  2. Be root
  3. mkdir -p /path/to/anywhere/sol
  4. mkdir -p /path/to/anywhere/config
  5. cd /cdrom/cdrom0/S0/Solaris_10/Tools
  6. ./setup_install_server /path/to/anywhere
  7. add in /etc/dfs/dfstab: share -F nfs -o ro,anon=0 -d “install dir” /path/to/anywhere/sol and add the path to config too.
  8. Run shareall and share and check the folders are shared.
  9. Check that nfsd is running: svcs -l svc:/network/nfs/server:default if not, execute it svcadm enable svc:/network/nfs/server:default
  10. cd /cdrom/cdrom0/S0/Solaris_10/Tools
  11. ./setup_install_server -b /path/to/boot
  12. cp /cdrom/cdrom0/s0/Solaris_10/Misc/jumpstart_sample/* /path/to/config
  13. edit /path/to/config/rules
  14. write: network net_ip.0 && arch sparc – profile –
  15. edit profile
  16. write install_type initial_install
    system_type standalone
  17. edit sysidcfg
  18. add standard lines without root_passwd
  19. cd /
  20. umount the DVD
  21. Edit /etc/hosts and add a new entry with host1 ip_t1000
  22. cd /path/to/anywhere/Solaris_10/Tools
  23. ./add_install_client -e ethernet_t1000 -s ip_server:/path/to/anywhere/sol -c ip_server:/path/to/anywhere/config -p ip_server:/path/to/anywhere/config host1 sun4v
  24. Check in /etc/bootparams root_server is not localhost, it has to be the OpenSolaris server ip.
  25. Boot the T1000, when we see the promt >ok type boot net -v – install
  26. The installation will start, follow the onscreen instructions.

    October 21, 2009

    Broadcom-wl in archlinux 2.6.31

    Filed under: computer, linux — Tags: , , , , — guilleml @ 6:51 pm

    After upgrading to 2.6.31 my wifi stopped working so I googled a little, I found a few usefull links:

    Basically what I did was to execute “makepkg” again in the broadcom-wl package and reinstall it. Then I executed:

    #mkinitcpio -p kernel26

    Also make sure your rc.conf is rigth, you have to add !b43 and !ssb to your MODULES section.

    MODULES=(acpi-cpufreq cpufreq_ondemand lib80211_crypt_wep lib80211_crypt_ccmp lib80211_crypt_tkip wl !ssb !b43 fuse)

    Reboot your computer and check that your wifi card is working:


    eth0      IEEE 802.11  Nickname:””
    Access Point: Not-Associated
    Link Quality:5  Signal level:206  Noise level:165
    Rx invalid nwid:0  invalid crypt:0  invalid misc:0

    Then you can use wicd or networkManager to connect to your network.

    July 1, 2009

    Archlinux, VirtualBox and USB support

    Filed under: Uncategorized — guilleml @ 5:47 pm

    I’ve been using Archlinux for some time now and I’m pretty happy with it.

    I just want to comment how I got VirtualBox working with USB, just add the following line to your /etc/fstab file:

    none /proc/bus/usb usbfs auto,busgid=108,busmode=0775,devgid=108,devmode=0664 0 0

    Now you should be able to connect USB memory drives, webcams, modems…and catch them inside the virtual machine within the guest operating system running.

    February 8, 2009

    Setting up Hibernate with MySQL under GNU/Linux

    Filed under: linux, Software — guilleml @ 1:01 am

    We’ll need to have installed mysql packages, of course, as long as the java libraries for hibernate, mysql jdbc connector or any other things needed for the project as struts, spring…maybe an IDE as Eclipse or Netbeans.

    Query browser may be useful to check database updates, modify tables o whatever you could need, anyway, what I wish to comment is the hibernate.cfg.xml file:

    <?xml version=”1.0″ encoding=”UTF-8″?>
    <!DOCTYPE hibernate-configuration PUBLIC “-//Hibernate/Hibernate Configuration DTD 3.0//EN” “”&gt;
    <property name=”hibernate.dialect”>org.hibernate.dialect.MySQLDialect</property>
    <property name=”hibernate.connection.driver_class”>com.mysql.jdbc.Driver</property>
    <property name=”hibernate.connection.url”>jdbc:mysql://localhost:3306/empresas</property>
    <property name=”hibernate.connection.username”>root</property>
    <property name=”hibernate.connection.password”>toor</property>
    <mapping resource=”hibernate.hbm.xml”/>

    Take a look I’m using JDBC driver for MySQL, you should change the hibernate.connection.url with your own following the same format, let’s sayour database’s name is “enterprises”, then your connection url will be jdbc:mysql://localhost:3306/enterprises

    netbeans - hibernate

    The classes and tables mapping will be in hibernate.hbm.xml with its own format, for example:

    <class dynamic-insert=”false” dynamic-update=”false” mutable=”true” name=”com.myapp.struts.Empresa” table=”empresahib” optimistic-lock=”version” polymorphism=”implicit” select-before-update=”false”>
    <id name=”id” column=”id” type=”long”>
    <generator class=”increment”/>
    <property name=”nif” type=”java.lang.String”/>
    <property name=”fecha” type=”java.sql.Date”/>
    <property name=”rep_legal” type=”java.lang.String”/>
    <property name=”denomsocial” type=”java.lang.String”/>
    <property name=”telefono” type=”java.lang.String”/>
    <property name=”email” type=”java.lang.String”/>

    October 8, 2008

    Dell Inspiron 1525 hotkeys in KDE 4.1.1 Debian

    Filed under: computer, linux, Software — Tags: , , , , , , , , , — guilleml @ 7:57 am

    In Kubuntu 8.04 my laptop multimedia keys worked fine but in KDE 4.1.1 under Debian they didn’t, I couldn’t assign them to actions in system preferences.

    To solve it I’ve used xbindkeys, it works pretty nice and now I can control the volume with the volume keys. To do so, type:

    #aptitude install xbindkeys xbindkeys-config

    Now you can use xbindkeys-config to configure using a graphical interface or you can configure in ~/.xbindkeysrc.

    To configure volume keys under kde 4.1.1 you will need to assign some actions to each key in order to increase, decrease or mute the volume, I’ve used qdbus and kmix to do that, for example, if you want to  mute the audio:

    $qdbus org.kde.kmix /Mixer0 org.kde.KMix.toggleMute Master:0

    So you need to assign that to the mute key. To increase the volume:

    $qdbus org.kde.kmix /Mixer0 org.kde.KMix.increaseVolume Master:0

    And to decrease the volume:

    $qdbus org.kde.kmix /Mixer0 org.kde.KMix.decreaseVolume Master:0

    So the xbindkeysrc file will be:

    “qdbus org.kde.kmix /Mixer0 org.kde.KMix.toggleMute Master:0”
    m:0x0 + c:160

    “qdbus org.kde.kmix /Mixer0 org.kde.KMix.increaseVolume Master:0”
    m:0x0 + c:176

    “qdbus org.kde.kmix /Mixer0 org.kde.KMix.decreaseVolume Master:0”
    m:0x0 + c:174

    After that you want to run xbindkeys daemon every time you login with your user, so add it to ~/.xinitrc, ~/.kde4/Autostart or any way you know to do so.

    September 22, 2008

    Suspend to disk and ram in Debian and Ubuntu

    Filed under: Uncategorized — guilleml @ 6:31 pm

    I’ve discovered a nice package that can suspend the computer to disk and to ram, I’ve tryed it under ubuntu, kubuntu and Debian Lenny and it’s worked really nice every time I’ve suspended the computer.

    To install it:

    #aptitude install uswsusp

    To suspend to ram I just run:

    #s2ram -f -p -m

    To suspend to disk:


    September 19, 2008

    PHC-Control in Debian Lenny

    Filed under: computer, linux, Software — Tags: , , , , , , — guilleml @ 5:42 pm

    To build your own module for undervolting your CPU you’ll need some files:

    linux-phc-0.3.1 from

    linux-source and headers from aptitude:

    aptitude install build-essential linux-source-2.6.26 linux-headers-2.6.24-1-amd64

    Go to /usr/src and untar the linux source:

    tar xvfj linux-source-2.6.26.tar.bz2

    Apply the patch and build the module:

    cd linux-source-2.6.26

    cp /boot/config-2.6.26-1-amd64 .config

    cp /usr/src/linux-headers-2.6.26-1-amd64/Module.symvers /usr/src/linux-source-2.6.26

    patch -p1 < linux-phc-0.3.1-kernel-vanilla-2.6.26rc8.patch

    make oldconfig

    make prepare

    make scripts

    make M=./arch/x86/kernel/cpu/cpufreq

    mv /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko_old

    mv /lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko \

    cp /usr/src/linux-source-2.6.26/arch/x86/kernel/cpu/cpufreq/acpi-cpufreq.ko /lib/modules/2.6.26-1-amd64/kernel/arch/x86/kernel/cpu/cpufreq/

    And that’s all

    Edit: Thanks to Andrew for the correction, there was an error I made writing the commands to the blog.

    September 9, 2008

    Increase battery life in your linux laptop

    Filed under: computer, hacks, linux, Software — Tags: , , , , , , , , , — guilleml @ 7:10 pm

    Recently I’ve bought a laptop, Dell Inspiron 1525 with a T5750@2Ghz and a 9 cell battery.

    I installed KDE4, plasma, desktop effects…it’s cool, really cool,  but then I discovered powertop, a tool that is able to recommend some settings to make  your CPU to awake less times every second. The tools shows yo a list of the tasks that are awaking the CPU so you can try to get a more power-efficent system.

    It recomends you some actions to take, you just accept or not them, as set the SATA bus in low-power mode, USB autosuspend, set ondemand cpu freq governor, delay writing to the hard disc, etc…

    I noted KDE4 is cool but not when you’re using the battery so I installed fluxbox and XFCE, both are nice, XFCE seems to wake up less the CPU, then I started to look for scripts and patchs to waste less energy.

    So here are the tuning I’ve done to my laptop:



    # Go fast on AC power.  Similar to default Ubuntu settings
    if on_ac_power; then
    # Set the drive to mostly stay awake
    hdparm -B254 -M 254 /dev/sda

    # Remount ext3 filesystems so the journal commit only happens every 60
    # seconds.  By default this is 5 but, I prefer to reduce the disk
    # activity a bit.
    mount -o remount,commit=60 /
    mount -o remount,commit=60 /media/sda3

    # Turn off the laptop mode disk optimization
    echo 0 > /proc/sys/vm/laptop_mode

    # Manually set the wifi driver to no power savings.
    #echo 6 > /sys/bus/pci/drivers/iwl????/0000\:??\:00.0/power_level

    # Set kernel dirty page value back to default
    echo 10 > /proc/sys/vm/dirty_ratio
    echo 5 > /proc/sys/vm/dirty_background_ratio

    # Only wakeup every 60 seconds to see if we need to write dirty pages
    # By default this is every 5 seconds but, I prefer 60 to reduce disk
    # activity.
    echo 6000 > /proc/sys/vm/dirty_writeback_centisecs

    # Turn off sound card power savings
    echo 0 > /sys/module/snd_hda_intel/parameters/power_save

    # Set the SATA to max performance
    echo max_performance > /sys/class/scsi_host/host2/link_power_management_policy
    echo max_performance > /sys/class/scsi_host/host3/link_power_management_policy
    echo max_performance > /sys/class/scsi_host/host4/link_power_management_policy

    # Make sure ondemand governor is set
    echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

    # Enable the webcam driver
    #  modprobe uvcvideo

    else # Save power

    # Set the disks to aggressively save power and use the lowest acoustic
    # level.  Note: Currently Firefox is very poorly behaved and some
    # might find these settings too aggressive.  If so, change “-S 4” to
    # something larger like -S 24 (two minutes).
    hdparm -B180  /dev/sda

    #set the LCD bright to 60%

    echo 60 > /proc/acpi/video/VID/LCD/brightness

    # Change the ext3 commit times to 10 minutes.  This reduces disk
    # activity
    mount -o remount,commit=600 /

    # Set laptop disk write mode
    echo 5 > /proc/sys/vm/laptop_mode

    # Manually set the iwl3945 driver to power savings.
    #echo 5 > /sys/bus/pci/drivers/iwl????/0000\:??\:00.0/power_level

    # Reduce disk activity by waiting up to 10 minutes before doing writes
    echo 90 > /proc/sys/vm/dirty_ratio
    echo 1 > /proc/sys/vm/dirty_background_ratio
    echo 60000 > /proc/sys/vm/dirty_writeback_centisecs

    # Set sound card power savings
    echo 10 > /sys/module/snd_hda_intel/parameters/power_save

    # Set SATA to minimum power
    echo min_power > /sys/class/scsi_host/host0/link_power_management_policy
    echo min_power > /sys/class/scsi_host/host1/link_power_management_policy
    echo min_power > /sys/class/scsi_host/host2/link_power_management_policy
    echo min_power > /sys/class/scsi_host/host3/link_power_management_policy
    echo min_power > /sys/class/scsi_host/host4/link_power_management_policy

    # Make sure ondemand governor is set
    echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor

    # Remove the webcam driver
    modprobe -r uvcvideo
    modprobe -r sbp2
    modprobe -r ieee1394
    modprobe -r uvcvideo
    modprobe -r videodev
    modprobe -r v4l1_compat
    modprobe -r compat_ioctl32
    modprobe -r v4l2_common

    The script is commented, I only changed a few things from the original, it works fine, some drivers are able to set the hardware in low-power mode but it seems they don’t do by default, GNU/Linux seems to have to polish laptop distributions.

    Powertop shows you the watts you’re currently using when the laptop is not connected to the AC, so I played with phc to undervolt the CPU, now I’m able to use less power for the CPU, this doesn’t decrease the performance.

    You can use this tutorial to get a kernel able to undervolt the cpu, you just have to replace a module.

    My original settings are:

    43 35 27 19

    Now they are:

    24 1 1 1

    Powertop shows the laptop uses less energy now and the cpu is colder at high load.

    « Newer PostsOlder Posts »

    Blog at