howto change the deault web browser for evolution

Evolution doesn’t seem to follow the system rules when opening web links.

First check what is the current setting, and see what other browsers are available:

gvfs-mime --query x-scheme-handler/http
gvfs-mime --query x-scheme-handler/https

Change the default to Firefox:

gvfs-mime --set x-scheme-handler/http firefox.desktop
gvfs-mime --set x-scheme-handler/https firefox.desktop

routing rules for Netflix to bypass your VPN

Its great to send all your traffic through a VPN to protect your privacy. Unfortunately, Netflix will stop working. Here is a script to set up routes for all of Netflix’s IP ranges.

In this example, is the network gateway. I call this using an ‘ifup’ script from OpenVPN. If you know how to do this without using the temporary file let me know!

whois -h -- '-i origin AS2906' | grep -Eo '([0-9.]+){4}/[0-9]+'|sort|uniq > /root/tmp.txt
for i in `cat /tmp/nfips.txt`; do
	ip route add $i via
debian, linux

how to install the latest version of firefox on debian

Debian is great but sometimes we need the latest and greatest browser, and we want to install it cleanly. This is how to do it.

  1. Set up your /etc/apt/preferences so that we don’t accidentally upgrade any other packages to unstable:
    Package: *
    Pin: release a=unstable
    Pin-Priority: -1
  2. Run these commands to add sid to your package listings:

     echo 'deb sid main non-free contrib' >> /etc/apt/sources.list
    apt-get update
  3. Now we can see what firefox packages are available:

    apt-cache madison firefox
  4. You should see a new version in the sid repository. To grab it from sid:

    apt-get install -t sid firefox

Before typing ‘y’, make sure you aren’t pulling in any crazy new dependencies you don’t want. Running a mixed-system like this has its risks – you should always watch carefully what apt is doing when using ‘-t sid’.


how to watch the progress of dd

Copying an ISO to a USB stick can be a slow process! And what’s worse is that dd doesn’t have an option to show its progress. It does however print its progress if you send it the USR1 signal.

So run this command in another terminal, then look back at your dd to see its progress:

 watch -n 1 'sudo kill -USR1 `pidof dd`'

The -n parameter sets how often (in seconds) watch runs the ‘kill’ command. You should now get some output like this in your dd window:

 955425+0 records in
 955425+0 records out
 489177600 bytes (489 MB, 467 MiB) copied, 345.323 s, 1.4 MB/s

Wow, thats a slow SD card.

Don’t forget to run ‘sync’ and wait for it to finish before physically removing the device from the system.


how to fix grub

This is burned into my brain, but here it is for reference. Boot from a livecd, mount your rootfs at /mnt/tmp and enter the following:

mount -o bind /dev /mnt/tmp/dev
mount -o bind /proc /mnt/tmp/proc
mount -o bind /sys /mnt/tmp/sys
chroot /mnt/tmp
grub-install /dev/sda
dos, virtualization

dos soundblaster 16 in vmware

If you’re running DOS or early windows in VMware, this might come in handy:

In your vmx file:

sound.present = "TRUE"
sound.virtualDev = "sb16"
sound.opl3.enabled = "TRUE"
sound.autodetect = "TRUE"
sound.baseAddr = "0x220"
sound.dma16 = "7"
sound.dma8 ="1"
sound.irq = "5"
sound.mpu401baseAddr = "0x330"

In your autoexec.bat:

SET BLASTER=A220 I5 D1 H7 P330 T6

dos soundblaster 16 in virtualbox

This is the line you need to get sound working within DOS in VirtualBox. Put this in your autoexec.bat

SET BLASTER=A200 I5 D1 T6 H7 P330

A lot of games and other apps won’t work due to lack of memory. This is because Virtualbox doesn’t actually emulate an IBM-compatible PC and doesn’t set up the memory properly. VMware is a better option.