fedora, linux

hplip problems in fedora

although the fedora print settings gui can detect networked hp printers, it adds them using a dns-sd backend, which seems to stop working soon after its installed. to make them work properly

sudo dnf install hplip
hp-makeuri <ip-address of printer>

now use the URI generated in the print gui, and choose the matching driver.


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 whois.radb.net -- '-i origin AS2906' | grep -Eo '([0-9.]+){4}/[0-9]+'|sort|uniq &gt; /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 https://cloudfront.debian.net/debian/ 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.