Browser Privacy Package: Disabling Flash Cookies, Google Analytics and Google Ads tracking

Flash cookies are a way to identify you even if you disabled your browsers identification and even all your cookies. Here's a guide how to disable flash cookies. Basically it deletes ~/.macromedia and creates a symlink to /dev/null instead. :) I suggest to delete .macromedia/Flash_Player and symlink that to /dev/null. That way it won't interfere with other macromedia software.

You can see what cookies are already installed with e.g.
find ~/.macromedia -iname '*.sol'
strings .macromedia/Flash_Player/ helps to see what's inside the cookies.
You probably also want to disable or restrict google's cookies. And you might want to opt out of Google Analytics. A quick overview and opt-out page for the other large advertising group's cookies
is also available.

Also check how to disable Facebook tracking you on other websites. And you may just want to install the Chrome AdThwart extension.

The just released Flash 10.1 supports a mode without flash cookies if your browser supports a private surfing mode and Flash is compatible with your browser's setting. I think that's mostly Firefox.

Make your Firewall Safer with Knockd

Here's a nice howto. It describes how to install, configure and test knockd.

Linux Kernels 2.6.24 - 2.6.29 Benchmarked (Phoronix)

I've read the newest Phoronix benchmark of all kernels 2.6.24 through 2.6.29 and if you don't follow the link now, I'll spoil it for you in the next paragraph...

Okay, so besides some normal fluctuations there is a significant speed gain for OpenSSL (+99%) and the OpenCL-backed Graphicsmagick (up to +73% and +80%) and a regression in 7-zip compression (-27%).

Wow - fascinating stuff. I wonder how much potential kernel code optimization has. I still remember the extreme difference between 2.4.x and 2.6.x. I had just bought a new computer because my old one was... getting old. And I felt completely cheated. The new kernel had brought me much more increase in responsiveness and "felt performance" than the new computer (AMD Duron 700 Mhz -> Athlon XP 2500+). If I could I probably would've brought it right back to the store. Well, they don't take returns on self-build computers here.

I really wonder how much difference the intel compiler compiled kernel makes in comparison to gcc. Maybe Phoronix could compare that one, too? Oh yeah "... boost up to 40% for certain kernel parts and an average boost of 8-9% possible" quotes LJ.

Debugging Alsa HDA Audio

If you're using the snd-hda-intel module and you've got audio problems, you might want to try out manually using a specific model, the list is in e.g. patch_realtek.c:
11687 static const char *alc268_models[ALC268_MODEL_LAST] = {
11688 [ALC267_QUANTA_IL1] = "quanta-il1",
11689 [ALC268_3ST] = "3stack",
11690 [ALC268_TOSHIBA] = "toshiba",
11691 [ALC268_ACER] = "acer",
11692 [ALC268_ACER_DMIC] = "acer-dmic",
11693 [ALC268_ACER_ASPIRE_ONE] = "acer-aspire",
11694 [ALC268_DELL] = "dell",
11695 [ALC268_ZEPTO] = "zepto",
11696 #ifdef CONFIG_SND_DEBUG
11697 [ALC268_TEST] = "test",
11698 #endif
11699 [ALC268_AUTO] = "auto",

sudo modprobe -r snd-hda-intel; sudo modprobe snd-hda-intel model=test

See here for more.

Automatic Backups on Linux (IBM)

Darn them. They just wrote the article I was planning to write and get famous with: Automatic backups over SSH with Keychain and Scp... well, I suggest to use rsync instead. That way it's fast enough to regularly run over internet without even using a lot of bandwidth. (See "Tiny Backup Script with Rsync" under "You might also like".)

By the way, look at their crontab:
34 3 * * * /home/backups/
34 20 * * * /home/backups/

Could've simply written:
34 3,20 * * * /home/backups/

"Never use the second pass encoding again" - Using 'Constant Ratefactor' Instead of Average Bitrate in x264

Okay, I may not be able to completely fulfill that promise, but you will most likely be saved from the second pass and thus a lot of encoding time quite often with this tip. If you don't need the resulting file to e.g. fit on a CD, Constant Ratefactor aka Constant Quality is probably perfect for you. Let me supply you with a quick overview and my quick mencoder script that does the job.

Did you know you can use a roughly vorbis-like quality selection, constant quality crf even in x264? This will save you a lot of encoding time with more or less the same quality. Or maybe not? Well it will look different, but it should be fine. For x264 a range of 18-26 is recommended. The higher the number the lower the bitrate and thus the file size will be.

Nice! Finally I don't need to adjust and calculate bitrates myself anymore! The algorithms really seem to work, because when I now change the codec settings to more efficient ones (e.g. increase the frameref, subq or enable mixed_refs) the quality (SSIM) remained pretty similar, while the bitrate sank.

Some experience with the parameters: The mixed_refs parameter did regularly increase the SSIM for me, but also took a lot more time to encode. Frameref=2 increases the efficiency with little performance impact in my experience. I wonder why it's not the default. Bframes decrease the quality slightly but shave a lot off the bitrate and even increase performance a bit for me.

Let me show you my "quick" example script for mencoder.

CRF=23.5 # 21-26 recommended, the higher the smaller the resulting file, see

INPUT="$1"; shift
X264OPTS="$1"; shift
OUT=`basename "$INPUT"`"-x264.avi"
echo Encoding $INPUT to $OUT

mencoder="time nice /usr/bin/mencoder -quiet -cache 16384"
enc="$mencoder -ovc x264 -oac copy -x264encopts crf=$CRF:trellis=1:frameref=2:bframes=2:8x8dct:psnr:ssim:$X264OPTS"
# I suggest nr= of no more than 2 or 3 with current x264 from svn.
# something along the lines of -vf
# eq=contrast=20:brightness=2,hue=saturation=1.25 for bleak videos
# denoise3d for noisy and unsharp=l:3x3:1.045 for blurry videos.
# I recommend to try out the result with mplayer first.
# A combination of all may work well, too.

echo $enc -o "$OUT" "$INPUT" $*

[ -f "$OUT" ] && echo File exists && exit 1;

$enc -o "$OUT" "$INPUT" $*

# You can call the script like this:
# input [x264encopts] [mencoder parameters]
# $ sh somefile.mpg "interlaced" "-vf crop=..." or
# $ sh somefile.mpg "" "-vf crop=..." or simply
# $ sh somefile.mpg
# to get the right crop settings try $ mplayer -vf cropdetect

Feel free to get out the flame thrower - or just make some productive comments.

How To: Comfortably Make your own WINE Bottles

If you're installing a few programs in WINE, you may notice that they tend to influence each other negatively. The fix is to install them in completely different operating system environments, also known as WINE bottles. This way it's easy to completely remove applications by just deleting their "bottle". Let me show you how to make this effortless with standard WINE and a simple shell script.

The script is the key part. You tell it a directory where you want your bottles installed and then it will create a new folder each time you install a program. Of course you may also install several programs into one bottle. Let's call the script wine-bottle, which I suggest to put into your $PATH:

# wine-bottle v. 0.2
# (c) 2009, (c) 2009 Joost @
# newest version at
# published under the GPL v. 3.0
INSTALLDIR="$HOME/.wine/bottles"; #Set this to where you want to put your Wine bottles
[ $# -lt 1 ] && #if you gave no parameters
echo "Please give me parameters! Usage:" &&
echo "Execute a program : $0 \"BottleName\" \"Program\"" &&
echo "Configure a bottle : $0 --conf \"BottleName\"" &&
echo "List bottles : $0 --list" &&
exit 1;
[ $# -lt 2 -a $1 != "--list" ] && #if you didn't give the right parameters
echo "Please give me at least two parameters or a --list parameter! Usage:" &&
echo "Execute a program : $0 \"BottleName\" \"Program\"" &&
echo "Configure a bottle : $0 --conf \"BottleName\"" &&
echo "List bottles : $0 --list" &&
exit 1;
[ $1 == "--list" ] && #if you want to list the bottles
echo "Wine bottles in $INSTALLDIR:" &&
ls -1 $INSTALLDIR &&
exit 1;
[ -d "$INSTALLDIR" ] || ( #if installdir is not existing
echo "Root of Wine bottles not existing: $INSTALLDIR" &&
) || ( #if installdir creation failed
echo "Could not create installation Directory: \"$INSTALLDIR\"." &&
exit 1);
which wine || ( #if wine is not found
echo "Wine not found, please install it first" &&
exit 1);
[ $1 == "--conf" ] && #if you wish to configure a bottle
exit 1;
#finally, the only remaining possibility is you want to run an application
shift; #drop first parameter to leave the command with its parameters

You can now use this script almost like wine. The only difference is that you first need to tell it the bottle's name. E.g. wine-bottle lingopad setup.exe installs the program inside setup.exe into the bottle lingopad. I suggest using the "create Desktop short cut" option of installers, as it lets you easily start them later, without the need to use this script.

If you want to create a backup of your bottle, simpy put the bottle directory inside $INSTALLDIR together with the related .desktop file into an archive. If you want to manually start a program, you can of course still use wine-bottle from the shell: e.g. wine-bottle lingopad "$HOME/Wine/lingopad/drive_c/Program Files/Lingopad/Lingopad.exe".

You may also want to install a current wine via the wine ubuntu repository.

Let me know if you liked this howto!

Update: Updated to Joost's version, thanks!

Update2: It seems my script has inspired "Joost". He's created a version including a simple GUI. Check out his website.

Fixing XRANDR Caused High Latency with KDE4 - Display Flickering - Freezing Videos

If you're using KDE4 you might be disappointed by a bug that causes high latencies and or a flickering (second) display. Here's a really easy explanation how to permanently fix that right now.

Go to System Settings, Advanced, System Services.

Then in the bottom uncheck "Detecting RANDR (monitor) changes", then press Stop on the bottom right. The problem disappears immediately now.

You may read more about the bug here and here. Thanks to Electricroo for the fix. By the way, you know you have this bug, if DDC EDID probes ("(II) intel(0): Printing DDC gathered Modelines, (II) intel(0): EDID vendor") keep showing up in tail -f /var/log/Xorg.0.log and you know it's fixed once they disappear. If you don't have that message in your X log, your most likely don't have this issue.

Note that this will stop KDE from automatically detecting when you plug in an external monitor. But as the configuration doesn't yet work well anyway I think there's no detriment. And of course there will be other causes for latency, but this one was the only real problem for me.

Unfortunately it seems like the fix does not (currently) work for KDE 4.2. If you don't find the service in the list in KDE 4.1.x, this might be a good sign and show that it's already disabled. If you still find the messages in Xorg.0.log, the please post a comment and let's try to find a way around it. If there's no way to disable it, all you can do is file a bug for your distribution and refer to the here mentioned information.

The bug has already been reported for KDE 4.1 at the kde bugzilla. Please participate there if you see this problem in KDE 4.2. You might also help to get a fix by voting for it. Until that time you can probably use my previously posted dirty hack that works around the kde session management service (ksmserver) by starting the KDE4 environment manually - please let me know if this works for KDE 4.2 as well.

You can also try to manually disable all outputs you don't need in Xorg, but the instructions vary significantly between different graphics cards, setups, distributions etc. And of course that won't help you if you're using a dual screen setup. If you find instructions on how to do that, please let me know in the comments.

For KDE 4.2, check your config file:
grep polling ~/.local/screen-configurations.xml
If it says polling false and after upgrading KDE to 4.2 you suddenly get the messages described above in Xorg.log, especially if the fix above worked for you before, then there's a bug somewhere in KDE. If you get polling true, you can try to reconfigure KDE to make it stop polling. (You can just edit the file and change true to false.)

Related: Automatically switch to connected External Display on Boot with XRandR shows you how to automatically set up your displays without just a single screen, so that you can disable xrandr.

I'm a Linux

Check out these "Linux Ads":

A cool French one:

One from Novel:

And what's your problem:

By the way, you should also have a look at this one(not in the competition).

New Look

I've just changed to Layout. I thought the old one was a tad too boring for the KDE 4 era. :)

Let me know if you like it in the comments!
(alternatively: works=I like it, doesn't work=don't like it.)

Parted Magic - A great bootable Linux CD for exhaustive Partitioning and Backups

Parted Magic doesn't only come with a fresh graphical parted and partimage, Testdisk, ext3grep and support even for reiser4 and ntfs-3g, but also with Firefox, XChat, LXDE. I simply but the 80 MB image on my boot partition and (next to knoppix) on my USB stick so I can start it out of grub if I need to.

Rescue Important Data with ddrescue

ddrecue is better than dd, dd_rescue or dd_rhelp if you want to (try to) backup what's possible from a broken (hard or compact) disc. It creates a log file and which lets you continue interrupted backups. If you try to backup a broken cd or dvd it might help to use different dvd drives to try to read the disc.

Don't let it run over night or you might end up with an exhausted dvd drive that doesn't really want to read anything any longer.

How the Linux Kernel Works

Tuxradar has a great article entitled "How the Linux Kernel Works". Great for beginners!

How to Remove Grub from your Boot Sector(MBR) but keep the Partition Table

It's one really easy command, if you know what it is ;)
sudo dd if=/dev/zero of=/dev/XXX bs=446 count=1

That helps you to remove any boot sector from that device, e.g. sda. But make sure you've got a boot sector somewhere! I can recommed installing grub to a USB stick for backup purposes.

How To Add Knoppix to your USB Stick

If you've got a large USB stick, there's a high chance you will have some space left for installing a current Knoppix on it. That way you can save a few CD-Rs as you need not write a new CD when a new Knoppix comes out.

Install Daily Fresh Ubuntu Directly over the Web

If you're doing a fresh installation and you don't have a CD downloaded yet, I can recommend the netboot installer. It let's you download and install the freshest packages from a mirror near you. All you need as preparation is e.g. a USB-Stick that boots into grub. Checkout this howto.

Basically all you need to do is copy the kernel "linux" and the initrd "initrd.gz" to your stick. Then boot them from Grub and you can start your installation.

The great thing about it: During the installation you can chose whether to install Kubuntu, Xubuntu, Ubuntu, etc. And you will automatically get the newest available packages right away. There's no need to fetch and install updates after the installation.

And getting the newest packages right away might save you a lot of trouble because of bad packages in the installation cd. And the network installer itself also gets updated regularly.

Extensive List of Great Ubuntu Repositories

The I been to Ubuntu blog just posted a great and extensive list of excellent Ubuntu repositories.

I especially recommend medibutu: (mplayer, codecs, etc.)
deb intrepid free non-free
(install the medibuntu-keyring package)

deb intrepid main
install the key:
wget -O - | sudo apt-key add -

deb stable non-free

deb intrepid main

and Google: (Picasa, Google Earth, etc.)
deb stable non-free
deb testing non-free # for beta versions like picasa 3
wget -O - | sudo apt-key add -

There's a great way to install the missing keys: E.g. for Opera just use this command:
sudo apt-key adv --recv-keys --keyserver 033431536A423791
Replace the number with the one from the error message on sudo apt-get update (without the leading "0x")

Or all in one:
deb intrepid free non-free
deb intrepid main
deb stable non-free
deb testing non-free
deb stable non-free
deb intrepid main

And then the keys:
wget -O - | sudo apt-key add -
wget -O - | sudo apt-key add -
sudo apt-key adv --recv-keys --keyserver 033431536A423791

What packages are installed in Debian/Ubuntu

Howtoforge has a nice article on how to install the packages you've installed on another computer. It's written for debian and ubuntu systems, including step by step screen shots for doing it in Ubuntu with Synaptic. Here's how you can do the same thing in CLI(also in that article):

sudo dpkg --get-selections "*" > package_list
sudo dpkg --set-selections < package_list && sudo apt-get -u dselect-upgrade

Oh and from the article's comments: The method only works well if you use the exact same version of Ubuntu on both computers. Let me add that it only works at all if you have the same /etc/apt/sources.list and sources.list.d/* files on both computers.

Flashing your BIOS with a bootable CD

Here's a quick howto. I think it would probably be much easier if you'd just use a 2.88 MB floppy image which I think is supported as well. Also be aware that flashing your BIOS from a CD is not supported by most vendors and thus might even void your warranty. But hey, at least you won't need to install Windows.

Against Intellectual Property

Being a Linux fan you might be interested in this book(free pdf download) of two economists, which explains why they think intellectual property is often the wrong choice.

Fixing Grub Boot Problems

If your system doesn't boot anymore, because grub was overwritten, you installed windows, or you installed a second hard driver, etc. check out this wiki from the makers and users of the super grub disc.

Google and Privacy Part Two: Ad Privacy Settings

I've already written about the Google Ad Cookie Opt-Out. Now Google is introducing even more personal tracking of your private information. Here you can change your google ad tracking settings and chose to prevent Google from tracking your preferences. There's also a plugin that ensures that the tracking remains deactivated even if you delete your cookies.

Both links will stay available in the links section on the right hand side.

Automatically switch to connected External Display on Boot with XRandR

I bought a notebook to be flexible, but when at home I use it with external monitor, keyboard and mouse to be comfortable. Now the problem was that I couldn't tell Ubuntu I want to only use the external monitor - if it's available.

Well, I've written a one-liner that fixes that problem. If the external display is attached, it will automatically switch over to it and display the internal display. Otherwise it boots normally (leaving the internal display enabled).

I put the script into the Xsession.d directory so it gets started for every user on boot: /etc/X11/Xsession.d/98vgaonly and made it executable.

The actual script line is this:
xrandr -q | grep 'VGA connected' && xrandr --output LVDS --off --output VGA --auto
It checks if the line 'VGA connected' was found in xrandr's query and then asks your X server to turn off the internal output and use the external one with automatic resolution detection.

So to automatically switch to a connected VGA during boot just execute:
echo 'xrandr -q | grep \'VGA connected\' && xrandr --output LVDS --off --output VGA --auto' | sudo tee /etc/X11/Xsession.d/98vgaonly && sudo chmod a+x /etc/X11/Xsession.d/98vgaonly

You may have to change the name of the outputs for your setup. xrandr -q will let you know what's available. It would probably be possible to somehow call this script automatically when plugging in a monitor, but I've not figured out how. xrandr only works when called from inside the running X session in my experience.

If you want to know more about XRandR, check this recent article.

Any comments are welcome!

Why we shouldn't trust Google

Danielweb explains quite well why there might be other priorities for Google than your privacy. I wish to add government policies to that list, as already in China and Europe and soon possibly everywhere.

Fixing common Linux Problems

Techradar has a nice little introduction on the subject, covering grub, drivers, X graphics and lots more.Link

Testing the Development Kernel in Ubuntu

Testing the bleeding edge development kernel from Linus' git tree has never been easier. You can now download precompiled debian packages for the current release candidates from the Ubuntu kernel ppa.

Debugging a program whose user has no shell by the example of Mldonkey

When the mldonkey package in debian/ubuntu does not work properly you may very well end up without any error messages in all log files. When you try to login as user mldonkey to start it manually, that won't work either, because it doesn't have a shell. So what to do?

It's actually quite straight forward: You supply a shell manually when changing to user mldonkey: sudo su mldonkey -s /bin/bash
Then you simply cd ~; mlnet
And it should print out some error message. For me it complained about downloads.ini.tmp being in the directory and exited.