Category Archives: linux

How To: Download Any Flash Video with flashrip in Ubuntu

Downloading flash videos in Linux was already not too difficult, but thanks to flashrip, it has gotten very easy. Here is a little demo how it works:



Once installed, you basically use one click to get a video preview and then a prompt with the filename to save the file. The script works by looking into the newest flash files in your /tmp folder, and creates a hardlink to the save destination. When the video has fully loaded, you can close the browser window. The temp file will get deleted, and the linked copy will remain.

Installing flashrip

Open a terminal like gnome-terminal or konsole, and run these commands:

wget http://martin.ankerl.com/wp-content/uploads/2009/11/flashrip.sh
chmod 755 flashrip.sh
sudo mv flashrip.sh /usr/local/bin

Now all thats left to do is to create a link in your gnome panel for ease of use: Right click the gnome panel, “Add to panel…”, choose “Custom Application Launcher…”. Choose a proper name, and a command like this:

/usr/local/bin/flashrip.sh /home/manker/Videos

For the command, replace the second parameter with the default location where you want to save the ripped videos (you have to use the full path here!)

I have tested this in Ubuntu, but it should work on any linux where gnome is installed.

Have fun!

Online Password Encrypter for Apache

Apache uses (among other hashes) SHA-1 keys for encryption in the .htpasswd. I administer a subversion server, and from time to time I have to add new external users to the system. This is usually rather cumbersome because there is no easy way to get to their encrypted password.

Thats why I have created The Online Password Encrypter. Here users can enter their desired username and password, and the encrypted key is automatically generated online, without transmitting anything to any server.

Here is an iframe of the file. Click here for full screen.

The Online Password Encrypter is just one single HTML page, it does not depend on any other files. So it is easy to download it, modify and send it around. Feel free do whatever you want with it.

Have fun,
Martin

Beautiful Font Hinting in Ubuntu 8.10 and 9.04

Even though I have an LCD monitor, I always have the subpixel hinting switched off because it is just painfully ugly to my eyes. Even when hinting is switched to maximum, the fonts are quite blurry (if you don’t believe me, type xmag and take a screenshot of your font. You can see red and blue linese everywhere). My eyes hurt when I see this.

Thanks to Johan Kivinemi I have just found out how to bring back the excellent legacy subpixel hinting engine. This has a much more crisp hinting, and uses subpixels only where it really is an improvement:

Just open these files in your home directory, and copy the content into them:

~/.fonts.conf

<?xml version='1.0'?>
<!DOCTYPE fontconfig SYSTEM 'fonts.dtd'>
<fontconfig>
  <match target="font">
    <edit name="antialias" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hintstyle" mode="assign">
      <const>hintfull</const>
    </edit>
    <edit name="lcdfilter" mode="assign">
      <const>lcdlegacy</const>
    </edit>
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>
</fontconfig>

~/.Xresources

Xft.antialias:  true
Xft.hinting:    true
Xft.hintstyle:  hintfull
Xft.lcdfilter:  lcdlegacy
Xft.rgba:       rgb

This should work in Ubuntu 8.04, 8.10, and 9.04 too, and makes all fonts much more crisp. Of course, your mileage may vary.

UPDATE: Comparison Screenshots

As promised on reddit, I got back from an awesome snowboard trip so I am able to put up extensive comparison screenshots of the two subpixel hinting engines. Move your mouse over the following images to see the differences. Watch especially out for letters like “m” where the spacing between the lines is very small. You might have to wait a bit for the image to load.

I have used all of the most important fonts that I usually use, and just for fun I have added “Dijkstra”, which just looks cool.

Sans Fonts

Mouse to see the same fonts with the legacy hinter.

 

Mono Fonts

Mouse to see the same fonts with the legacy hinter.

 

Zoomed Comparison Screenhots

Here is an excerpt with 400% magnifications. Mouse over the pictures to see the legacy hinter.

Zoomed Sans

 

Zoomed Mono

 

Human Compact Themes (for Ubuntu 8.10)

This is a new release of the compact theme, based on the original Ubuntu 8.10 (Intrepid) theme. It was created by Jan Suhr almost a month ago, based on my little howto.

I have now two versions of the theme: one with normal icon sizes, and one with the smaller 16×16 icons for even more compactness. Here is a comparison animation of the standard Human theme vs. the compact theme:



You can download the themes here:

Download and Installation

  1. Save the theme to your computer.
  2. Open the gnome’s appearence dialog with System > Preferences > Appearance.
  3. Drag and drop the downloaded file into the Theme tab of the appearance dialog. If you get an error message “Can’t move directory over directory”, you have already installed a theme with the same name. To be able to reinstall it, remove the directory ~/.themes/Human Compact or ~/.themes/Human Compact Small Icons.
  4. Choose “Apply new theme” in the popup dialog.

Most changes will occur immediately, but for e.g. the icon sizes it is best to log out and log in again. When you change the theme, you can get the Human Compact theme back by clicking on Customize, and then selecting Human Compact.

Any question, praise or flames? please post them!

Install for root (e.g. Synaptic)

Some readers asked how to get this to work for applications that run as root (e.g. synaptic), so here it is: simply copy the copy the theme file into the root’s home directory, like this (exchange username with your own name):

sudo cp /home/username/.themes/Human\ Compact/gtk-2.0/gtkrc /root/.gtkrc-2.0

Afterwards synaptic uses the human compact theme.

Older Themes

Here is some information about the original compact themes I have created: