What's New in Linux v. 2.6.28

Heise's got a nice article about what's new, what's hot, what's not in the not yet quite released 2.6.28.

Printer Tip: Cleaning your Print Heads the Cheap&Smart Way

If you use the printer's internal cleaning utils (if they are available for Linux at all), you are likely to lose a lot of ink down the drain. And you usually can't even chose which color to clean. But can do it much cheaper:
  1. Open GIMP.
  2. Create a new full size page (e.g. A4 or Letter).
  3. Change the foreground colour to the color that's making the problem. Use the CMYK color picker and you can e.g. just pcik Yellow or Magenta, which your printer uses. I had a problem with yellow. See the "Y" on 100% on the left side.
  4. Fill the entire page with the chosen foreground color.
  5. If you can, go to the printer settings,
  6. set the Quality to the Highest setting.
  7. set the Malfunctioning Color e.g. +50.
  8. set the maximum dpi.
  9. Print the page, better twice in a row, that's more efficient unless there's just a minor skip in the color. Then keep printing single pages until the color comes back nicely.

Worked great on my Canon MP610! And it does not only save ink from the colors you spare the cleaning, it usually also saves ink from the color your cleaning. Also the ink goes onto the paper and not somewhere in the spongue inside your printer, that has a limited size. And that sponge is known to be the first part to cause problems in Canon printers: At some point it's reported as full and the printer stops working. (You can reset the print counter, but then ink might come out of your printer at some point.)

How much does Google know about you?

Check out this review of a book with that title.

Google Really is Going Towards the Browser OS

Google just released the native client, a browser plugin that helps to efficiently use the CPU of a machine accessing a web page. Available for many browsers - except the Internet Explorer. After Google Gears and Chrome this piece of Software is another important step towards establishing the technical infrastructure for a Browser Operating System.

Default File Permissions on Creation - Umask

With the umask command you can set, what permissions a file will normally have when it's first created. It's a bit complicated, though: You have to XOR 666 for files and 777 for directories with the numerical permission code you want the file to have. (see man umask for more)

With umask you see the current mask, with umask -S you see it understandably. The default in Ubuntu is umask 022, which means that files will be -rw-r--r-- by default. With umask 026 you can prevent files from being readable and directories being accessible by "other"s (meaning anyone) by default (-rw-r-----).

You can also use the much easier symbols like with chmod, e.g. umask u=rwx.

Opera 10 alpha

I'm right now trying out the newest browser (update) out there: Opera 10 alpha.

This is Opera coming back into the league with a speedier rendering engine that's working better with online applications such as Gmail, Blogger and Google Reader. I've tested them all and I'm quite convinced.

It feels much faster and I notice a lot less hang ups in opera as it e.g. now terminates hung up plug-ins automatically and improved the asyncronious javascript support.

Check for Viruses Online

There's not only the Kapersky Scanner(32-bit only, Java required), but also VirusTotal, which scans a file with several engines at once.

Google Cutting the Costs

While Google's attention to costs may sound good on the first view, I also see dangers of going to far, thus loosing the valuable elite personell google employs - or at least their creativity.

Things like the new designs in Gmail aren't going to bring any revenue directly, but they sure do make a big difference for the user.

Hotkeys in KDE4.1 are broken

If you wondered why it doesn't work for you... it doesn't work for anyone. ;-)
They hope to have it fixed in KDE 4.2, says someone in a forum.

If you need a fix, try out installing xbindkeys-config and save the settings to the default config file and press apply for immediate changes. Works nicely for me.

Blanking External Monitor to Save Energy with Xorg

I've just found out that my external monitor remains on for quite a while in the suspend and off modes (xset dpms force off). The only one that it accepts is standby. Then it turns off right away. And the internal one as well. So that's fine for me. But good to know, isn't it? ;-)

And btw. if you want to use it in a script you have to issue the xset command twice and sleep in between for about 6 seconds. Otherwise they're not really off. Don't ask me why...

Use Dbus in Shell Scripts

http://foss-boss.blogspot.com/2008/11/ride-d-bus-control-your-linux-desktop.html

Open Source Business Model

Stuart Cohen, former CEO at the Open Source Development Labs, published an interesting arcticle at businessweek which says that as an open source company you have to do more than just deliver support and add-ons. You have to add extra value to succeed in this economic situation, he claims. But unless I missed it he doesn't really say anything what that extra value would be.

Digital Traces

The New York Times has a very interesting article about the digital traces we leave and a completely new generation of Big Brother approaching.

The Hitchhiker's Online Game

I accidentally just found out about the Hitchhiker's Guide to the Galaxy online game by Douglas Adams. And it's full of his witty and hilarious dialogues. (If you have a hard start, try turning on the light... and register on h2g2 to save your games.)

Is the World Ready for a Cyberwar?

After reading a lot in the media about the so called cyber war, I wonder: How well prepared are the nations? In the media it seems as if Russia and China had active cyber warriors sitting and waiting to get into action or if not already attacking. But I can hardly imagine that any technologically advanced nation would not have highly professional IT security experts available...

What do you think? Or are the US cyber warriors just more sneaky? Would the US invent the internet for military reasons and then just sit there while everybody else seems to be putting up their armies? Could a cyber war lead to a real war? Are plain computers the 21st century's war machines?

The Infallible Ticket Machine - When Machines Do Make Mistakes

The LinuxJournal posted a great article about good and bad consequences of technology.

I have had similar thoughts. What people may forget is the problems you may get into with machines and that they do make mistakes. But let me tell you what happened to me.

I went to buy train tickets. They were non-refundable day tickets valid for one day only (not 24 hours).

I went to the machine. I chose the type of ticket. Then I chose a date. Then I chose to take two of them. Then I paid and left. A few hours later I looked closely at my tickets and found out that it did not apply the choice of date to both tickets. One of them was valid only for yesterday. I had bought them at about 11.45 pm. And yesterday was now already past.

Okay, there were several problems: The machine should have warned before selling you a day ticket that would be valid only for 15 minutes. It should actually automatically select the next day then. But the very least it must of course apply your choice of day to the tickets when in the last step it asks you for the number of tickets.

Okay, I thought, no problem. Luckily there are still humans. I went to a service person. The date and time of purchase were printed on the ticket, so it was an obvious situation. I told them about it and was quite surprised about their reaction.

The tickets are non-refundable they told me. That I aleady knew. I said again that I told two tickets and that the date was not applied. They told me I must have made a mistake when ordering them, so it was my fault. That kind of remark is hard to deal with, especially if you're earning money with IT services. I tried to explain this to them and they informed me that machines don't make mistakes.

Ah. That was new to me. I gave up with her and went to another service person somewhere else:

I: Hi, I've gotten the wrong ticket from the ticket machine.
S: Well, the tickets are non-refundable.
I: Oh yes, I know. But I didn't choose that ticket.
S: Then it wouldn't have printed it - you must have made the wrong choices.
I: Aha. (explaining the choices). Could the problem be with the machine?
S: No, there is no problem with the machines. You should simply buy the tickets one by one.
I: And now?
S: You're too late to exchange it now. Try writing a letter to the central custumer service department.

By now I had no time to buy new tickets and had to run to catch my train. It turned out that the train personell didn't even notice the difference in dates when checking my tickets. So luckily in the end a human error helped me avoid problems after the machine's error.

In the end I quite agree with his critic view on technology: One should always keep in mind that machines do make mistakes. And when they do, it can be extremely hard to impossible to convince people of it.

Easily Receiving Big Files via Droopy Webserver

There's a nice little python script named droopy available which let's you receive big files quite comfortably over a simple web browser upload.

List Open Files of a Process

lsof -p `pifof process`

provides an exhaustive list including libraries.

ls -l /proc/`pidof process`/fd

provides a list of only the "plain" files.

Intro to Linux Virtual Memory

LinuxPlanet has a really good article explaining how the Virtual Memory System works in Linux. I think it's nicely done and considering the subject it's a pretty easy read.

Introduction to SSH

LinuxPlanet has a nice short intro to ssh. I have her on one point, though:

The example ssh terry@host2 ls ~ is just badly quoted/escaped. There's no need to use /home/terry if you correctly escape the tilde by putting it all in quotes: ssh terry@host2 "ls ~".

This lets your shell know it's not supposed to resolve the "~" so that the shell on the other side of the ssh line will do so. See the e.g. EXPANSION section in man bash for more.

Sed One-Liners

Catonmat has a nice overview of sed one-liners.

More About Being a Good Citizen in an Open Source World

After looking into the source of Android, Metthew Garrett tells us about his disappointment with the underlying code. And with his example of iPhone vs. Android a heated debate was of course not far:

Who is the worse open source citizen, Google, Apple or nobody? And I posted a little comment as well:


Google is to blame for doing open source(Linux), but the wrong way(hotfix instead of a good solution).
Apple is to blame for doing open source(BSD), but the wrong way(bad or no community "backfeed").

What's worse is a matter of taste. I also think Apple is the worse open source participant. They give back so little to the community it makes me sad. (Then they restrict the app store in ways that prevents competition, etc.)

Google does not do much for the community, though it says it tries. But honestly, if you would put their effort into relation with what money they make through open source software, it's really very sad, too. And the companies PR departments would be silly if they wouldn't make sure it looks like a serious effort.

But they both gain a lot and give a little. Google may state what they wish - considering their resources they give little. They could employ at least a few expert kernel hackers pro bono. Otherwise they will get an identity crisis a little like Ubuntu currently: People want to know they are part of bringing things forward.

And this shows the problems with current open source licenses in my view: The companies still don't really have to give useful "back-feed" to the open source projects (far from being in relation with what they gain).


What if the EU would decide that every device must come with open source drivers? Or if someone wrote a license that requires at least 1% of the profits from the open source project to flow back into the project? It would of course be very good for the projects. But in a second step I am convinced it would be at least as useful from a macroeconomic point of view:

Less development effort would be duplicated and the code quality would constantly increase.

Of course the big problem with this approach is finding out how much money is made with a project. That would be the job for courts to decide. And currently I can't think of any really good measurement possibilites. But then with 1% of the profits I'm sure it would not hurt a company anyway.

NVIDIA Brings Fast GPU Video Acceleration to Linux

It's been a while. I've sat here on my chair for a long time and thought to myself: Hey, if you want to do it, video acceleration would be really easy to integrate into Linux software: It's mostly open source and the changed would be pretty specific to that part.

Then came XvMC and it was not really convincing, because the impact was not too fast and it only worked during playback Mpeg2 AFAIK, not during transconding.

Now came NVIDIA (admittedly a couple weeks after AMD, but therefore publicly and including patches for mplayer) and finally brought out really nice and efficient video acceleration for linux.

My favorite Linux Performance News Site Phoronix checked it out and you can see quite an improvement (CPU usage with first OpenGL, then XVideo and then Nvidia's "VDPAU"(Video Decode and Presentation API).

I hope AMD and Intel will finally come out with some progress in this area, too. Next I would like to see support for encoding, e.g. in Xvid and then maybe even tasks such as gzip, bzip2 (the latter ones didn't even show multi-core support in my tests).

Customized Linux Message Notification, I Wish I Had

After writing an alias that shows me what's currently going on in my system (tail -f /var/log/..., ~/.xsession-errors, ...) I've wondered:

A. Why the information is not all going through syslog (almost is, but not e.g. the users errors).

B. And more importantly: Why isn't there a nice interface to syslog that shows me what I want to know, e.g. as a plasma applet for kde4, configurable but with low resource consumption nice&pretty on my wallpaper?

That'd be nice, wouldn' it? Maybe I'll write that myself one day...

How to Scroll Back in Screen

Ctrl + a + [ + j/k
Or Ctrl + a then Esc and then use the cursor keys. Esc to leave the mode again.

Google Finds the Flu

Google just released a tool to track the spread of flus by statistical analysis of their search data. And it seems to work, too.

Prepare JPG Files for Fax

This script prepares your scanned Jpgs for using them e.g. with the sipgate fax. Or you can simply join them together in a small (black&white) pdf. Of course you can change it.

#!/bin/bash
# (c) 2008 linux-tipps.blogspot.com
# published under GPL v. 3.0 or later.

which convert || echo Please install ImageMagick && exit 0;
which sam2p || echo Please install sam2p && exit 0;
which pdftk || echo Please install pdftk && exit 0;

mkdir tmp
cd tmp
ln ../*.jpg .
for i in *.jpg; do nice convert $i -unsharp 3x3 -monochrome $i.png; done
for i in *.png; do sam2p -pdf:b2 $i -pdf: $i.pdf; done
pdftk *.pdf cat output output.pdf
mv output ..
cd ..

rm -rI tmp

"Begging the Software Gods"

"Begging the Software Gods" is an interesting read about what choices we make in Software and what they mean. A nice work of open source politics. I think I would not understate to say he is preaching open source ethics.

But I have one point to make: Unless you are (or employ) a mighty programmer, you are not as free as you feel after reading the article from your Linux system. ;-)

Update:
The point he makes is true and good. But in my view having a freedom is worth no more than you have the actual concrete ability to use it and gain direct benefit from it.

Now I think it should be made easier to actually do it, to benefit from that freedom. But e.g. finding a suitable programmer is often still complicated and not every open source project has a place to e.g. offer bounties. As he sais: it is not always an easy choice, but a worthy choice.

You have the freedom, but you can only really use it when you have someone with programming skills. And he did not mention that. (Of course that's not his point.)

The point I'm trying to make is that an infrastructure that enables the average non-programmer user (e.g. through money) to really take advantage of these freedoms (customize software) without much effort would have a positive effect for the open source community. It would give provide money to the programmers and help users in realizing the open source freedoms.

Now the other cool then is that you might actually get a programmer to write a feature for the same money you would have paid for a closed source software (esp. Microsoft Office vs. OpenOffice). And when you do, everybody can profit from that. If more people would see that and act like it, the whole community would profit.

TV International?

I still wonder why TV is not really international yet. We have endless countries with interesting TV channels. Especially US channels would probably get a lot of international viewers, as many people speak English and they often show things earlier than the TV stations in other countries.

But they don't broadcast their channels. At first they always claimed it would not be feasible technically, until Zattoo came along and proved what was clear before: Where there is a will, there is a way.

Now the TV stations claim they don't own the rights. Or they go online for some regions like hulu.com. And I still think: Where there's a will, there's a way. How long do we have to wait, until the Internet tears down the borders of TV stations?

How long until it will be possible to legally and comfortably watch your favorite TV series when it first aired.

Setting up NX

A tutorial how to set up the IMHO best remote desktop connection: NX.

WPA Encryption Cracked

If you haven't already read about it, it seems to be true: The Wifi encryption protocoll WPA has been compromised. The method will probably published pretty soon.

That means many people will need a new router and a new setup for it. And for a long time many networks will remain open again. If you want a long term solution it more and more looks like a VPN solution is the only way to go.

And if I'm not mistaken he who managed it is Erik Tews from the German University of Applied Sciences Darmstadt.

Okay, it turned out the hack is not as bad as thought. It will probably still take some time and combination with other approaches to really become useful. But I think this might help around the current restriction that you can only decypher clients that connected after you were "listening" with WPA.

A Tiny Backup Script with Rsync

This script lets you easily mirror a local directory to foreign computers that have rsync installed - securely via ssh. It assumes you have already set up a public key authentication with those servers. (Have a look at ssh-keygen and ssh-copy-id)
#!/bin/sh
# (c) 2008 linux-tipps.blogspot.com
#

FROM=/home/user
# the base path
DIRS="Desktop Documents"
# you can also use absolute paths

RSYNC="rsync -av --progress -e ssh"
# add -z for compression

ssh-add -l || ssh-add
# this adds ssh private keys if not added already
# for cron scripts use keychain instead:
# source ~/.keychain/*-sh
# see here for more

cd $FROM

$RSYNC -z $DIRS djtm@server1:/some/path/Backup/ &

$RSYNC $DIRS djtm@server2:/some/path/Backup/ &

wait && echo Sync Done. || echo Sync Failed or Aborted.

Find Bots in your LAN with BotHunter

BotHunter is a pretty cool software that helps you detect bots through passive network monitoring.

Their webpage has just gone offline. I'm sure that's because of all my readers visiting their web page right now. ;-)

Apple's Lock-In Syndrome

Apple is locking iPhone users into their rigid software framework through the App Store: They would not let people develop interfaces to Gmail and now they prevent the great Opera Mini from being ported to the iPhone.

Adobe Flash has also been ported, but is kept away from the iPhone by Apple.

So if you've wanted to buy an iPhone, reconsider. It's buggy and Apple won't let you install any software that might "duplicate" available functions. They should be honest and say software that competes with theirs.

Source: Heise Article [german original]

DVB-T in Linux

There are two great program for watching DVB-T in Linux: Kaffeine if you want it really comfortable (including scheduled recording, instant pause and high quality deinterlacing) and VLC if you're a sync freak (it has special syncing algorithms to ensure there is no audio video desynchronisation.

But most people don't notice a few ms desync, so I can recommend kaffeine. If you still want to use vlc, you should know you can open the channels.conf like a playlist so you need not go crazy trying to manually set up the reception.

OpenOffice 3.0 in Ubuntu 8.10

Here's a quick guide. It's all about downloading it and installing the deb files... ;-)

Interesting readme files

Who ever reads those readme files coming with the software? Well, someone did. And he's posted some funny quotes.

Ask a Spammer for Ubuntu!

Someone already did it. Check out what happened.

Fixing Wake On LAN in Ubuntu 8.10

I've already spent a few hours to finally get this working again. There are several problems in Ubuntu 8.10 considering Wake on LAN:

1. The network cards' drivers are unloaded during suspend.

This often deactivates your card's wake on lan feature and completely powers it off.
You have to add your network cards driver module to the MODULES_WHITELIST in /etc/default/acpi-support. Also add the network card's interface(e.g. eth0) to SKIP_INTERFACES.

2. The network is not (properly) restarted after resume.

a. NetworkManager overrides settings in /etc/network/interfaces.

The easy way is to simply remove networkmanager: sudo aptitude remove network-manager.

b. The network setup script is not restarted after resume.

You can add the script (networking) to STOP_SERVICES in /etc/default/acpi-support.

3. Wake on Lan is not enabled by default

You need to issue e.g. sudo ethtool -s eth0 wol g. You can do that in an init script and you will likely have to do it again after resume. (I've put it a script to do that into both /etc/acpi/suspend.d/54-wol.sh and /etc/acpi/resume.d/99-wol.sh )

List of Ubuntu Intrepid Bugs

There's a nice list of issues in Intrepid after upgrading. And there's more from other users in the comments. So read this post before considering the upgrade to Ubuntu 8.10 unless you've got some time on your hands.

Linux Memory Statistics

Find out a lot more detailled how memory is used in your Linux system with these tools.

Introduction to WINE

Here's a nice little intro on what to do with wine. For help with wine, checkout Frank's Corner.

New Layout

I've changed a few things in the layout. Let me know if it works for you!

My Software Favorites

Googling for Something Linuxy

Sometimes when you talk about things as a Linux user, people look at you oddly. For example when you tell them about installing software into a wine bottle in Linux. They'll probably just look at you in wonder and consider if you've gone mad.

Now the same sort of happens with Google sometimes. Even though Google is based on Linux, it will find quite a different kind of wine unless you e.g. add linux to the search. But even then it's not efficient and you might lose pages, as wine also works on Mac OS X and (yeah, I know) Windows itself.

But there's help: the Google Linux Search. It's not restricted to Linux as its name suggests, but excludes almost everything that doesn't have anything to do with computers (and which might distract the normal Google).

I've got Sun Java Working in my Browser in 64-Bit Linux!

I've been trying to get java to work in the browser for me for a long time now. And I've got two final results for you: First, it's (yet) impossible, the 64-bit java browser plugin will not be out before 2009.

But Secondly, it's possible and really easy with wine! Just download Firefox and install it. Then download Java and install it. Done! That easy! :) It should work the same way for Flash, etc.

Now finally I could use packstation.de in Linux!

Automatically Boot Different Kernel on Fail With the Grub Fallback Options

Did you know you can configure grub to automatically fallback to a different boot entry if one was not successful? A pretty neat idea, especially for servers where you can now avoid a lot of head aches. It doesn't matter at what point the system hangs, grub will boot the other kernel the next time, unless the system boot completes and you tell it not to with another grub-set-default. Nice!

Funny Bug Report Misuse

Ever been annoyed the Bugzilla or a similar software to report bugs online? Here are some funny examples for bug report misuse: http://linuxshellaccount.blogspot.com/2008/11/funny-mozilla-bugs-open-source-humor.html

Find Out Which Operating System is the Best

The Operating System Sucks-Rules-O-Meter will tell you.

Rude Linus Torvals

If you ever wondered why people say the kernel developers are sometimes very rude, check out this article, referring to a post by Linus himself.

Funny Linux Shirts

Check out these funny Linux T-Shirts.

32 Bit Software in 64-Bit Debian-Based Distribution (e.g. Ubuntu)

There's a wonderful script named getlibs, that makes the annoying process of installation 32-bit libraries really comfortable.

Canon Printer Tips

Did you know there are original Linux driver from Canon? Now you know that, why not get the hacked and enhanced version.

Famous Flame Wars

Check out this summary of Famous Open Source Flame Wars.

Preacher of the Flying Spaghetti Monster

Here's a funny video about a FSM preacher.

Microsoft Office 2003 with Wine

Check out this howto install MS Office 2003 with regular Wine:
http://www.wine-reviews.net/microsoft/running-ms-office-2003-under-linux-with-wine-0952.html

Backup with Rsync

There's a nice article about backups with rsync at Linux.com.
I shall leave the explanations to it and just post my script as example here
DIRS="Documents Desktop"

cd ~
for i in $DIRS;
do
echo Syncing $i
rsync -av --progress -e ssh "$i" user@server:/path/to/dir
done

Disabling Touchpad on Demand

There's now an alternative to using the shared memory of the synaptic driver to enable and disable the touchpad:

xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 8 1 (enable)
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 8 0 (disable)

This should work out of the box in Ubuntu 8.10 (Intrepid). But it doesn't. At least not for me. But this works for me:

xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 8 0
xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Off" 8 1

Nice! :)

Workaround for Screen Flickering in Kubuntu 8.10

Okay, I've got a dirty hack for now to work around the flicker problem in Kubuntu 8.10. You can edit /usr/bin/startkde and comment out the line starting ksmserver (kwrapper4 ksmserver).

Then instead write

kwrapper4 krunner &
kwrapper4 plasma &
kwrapper4 kwin

There will be no session management, but also not flickering. I'll let you know when I find a better fix.

Update: Eventually I did find a much better fix. But it doesn't work for KDE 4.2 (yet).

Google's Lack of Response to Security Threats

Google criticized a security researcher for publishing information about a security vulnerability in the android platform. They had no reason and don't do anything to motivate researchers tells us the article at cnet.

Voting Machines Are Good - Homer Votes

Arora - A Webkit Browser

Today I accidentally stumbled about Arora, another simple webkit based browser. And I'm very pleased. It's quite fast, renders webpages without errors, is google-mail, etc. compatible, and has a basic interface that's very similar to Firefox(tm).

That's getting pretty close to a cross-plattform Safari in my opinion. In comparison to Chrome it lacks the faster javascript engine and the multi-threaded multi-process approach, which causes it to slow down a bit with many tabs open. A private browsing feature is included.

But I think it's lean, but a true alternative and I'm writing this blog post in it - without any issues. I've tested version 0.4 in Ubuntu 8.10.

Apt-Get Tipps

TuxArena put up a nice summary of some useful apt-get commands.

I have to correct them in one point: For dpkg -L to work, the package needs to be installed already.

I also have a few extra ones:

  • apt-cache search (search packages)
  • apt-cache show (show full package description)
  • apt-cache policy (show available package versions)
  • apt-cache depends (show package dependencies)
  • dpkg -P (remove package completely, that means also configuration etc.)
  • dpkg-reconfigure --priority=low (reconfigure package, show all options)

Free CrossOver - Today Only!

You can download full versions of CrossOver Linux and Mac for free from their webpage today!

Ubuntu 8.10 No-Go for Dual Head

Don't upgrade your Ubuntu to 8.10 if you want to use a dual head setup. There second screen will reguarly turn off for a second while there is an edid ddc scan shown in the Xorg.log. (The bug is not really fixed or fix not in main repository yet. Or I've found a different one. -> It's still not working!)

And the whole system will stutter during that time. That makes video playback very annoyingly slow and usage an external monitor impossible. I'll let you know when I find a fix.

Ubuntu Getting Slower

After upgrading to Ubuntu 8.10 (release candidate), I've recently noticed stuttering in video playback. That might very well also be related to my using the intel 2.5.0 xorg driver. But Phoronix now made a correct examination and found out Ubuntu is getting slower and slower since 7.04.

Complexity or just bad programming? Is it related to the kernels gettings worse and if so, is that related to the Ubuntu patches or the vanilla kernel? I'm curious for hopefully following explanations.

Mode Setting with IntelFB

Let me begin by stating that the intelfb driver is very old already. And there are issues. Mode setting with "non-CRT" devices usually fails:

intelfb: Non-CRT device is enabled ( LVDS port ). Disabling mode switching.
intelfb: Video mode must be programmed at boot time.

So you need to set the mode very counter-intuitively via the vga kernel commandline. To do that, you need to know the mode. Especially on 64-bit systems the only way to find it out is sudo hwinfo --vbe.

Now you can use a kernel command line like video=intelfb:mode=1280x800 vga=0x0362 and the system should boot with the chosen resolution. Even if you're using a laptop like I am.

This will not work with a kernel earlier than 2.6.28-rc1 from my experience, but maybe you're lucky. If nothing happens, try the newest kernel. And of course feel free to comment in any case. And I think this works only if the intelfb module is compiled-in, not if it's compiled as a module, as it usually is in distribution kernels.

Trouble Uninstalling a Package?

Sometimes you're trying to install or uninstall a package, but the process aborts, because the installation script fails. I think there was an option in apt-get or dpkg to override this behavior, but for now there's a very simple workaround that will usually help:

Insert a line "exit 0" into the script causing the error. (It then exits "without an error" right away.) At least in init scripts during deinstallation this should not cause too much damage. In my example, the packet tspc failed during upgrade from hardy to intrepid (release candidate).

There were a few packets that didn't upgrade cleanly, about 5 I think. But now everything works pretty well.

Encyclopedia of Life

A website mapping (or trying to) all life on our cosy little planet Earth. Why go to other planets to find life if you need not go father than your backyard? Out now: eol.org.

Also check out this interview with the founder.

Flash 10 in Ubuntu 64 Bit

There's a nice little script that does the entire installation automatically. Worked great for me. Make sure you check the contents of the script, it's not a lot. And when you run a script as super-user you should always do that. Then do sudo bash flash10_en.sh.

Automatic Monitor Brightness Control

Why isn't there a software that controls your monitor's brightness level automatically. E.g. if you have a webcam, you could use it to detect the current amount of light in the room. If you don't have a webcam, you could use the current time.

Canon Printer Problem "pstocanonij write error,32" Solved

I just had the error message

"pstocanonij write error,32."

when trying to print something with the Original Canon Printer Driver and my MP610. It turned out I needed to cancel the job. I printed a test page and then I printed the same thing again and it worked just fine. Sometimes it hangs up and I have to turn if off and on again.

But I still have no idea why he's cleaning his inks several times a day currently...

Update:

The error comes up more and more often now and I haven't found a real fix yet. It might be related to certain settings. The printer prints one page and then stops printing.

FIX:

You can either use a different driver (e.g. the gutenprint one), or it may be an incorrect page border setting. In my experience, changing the page border settings back to their original settings (31,75mm) fixed the problems. You may have to reboot your computer and turn the printer off and on again for it to work again.


FIX2:
It might also be that your /tmp directory is full. This happens especially when you're using the special tmpfs on that directory, as some distributions automatically do. Or, of course, if you're main partition is out of space.

Mixed Static and Shared Library Linking with GCC

If you want to link some libraries statically and other dynamically you can use these switches:

-Wl,-Bstatic -lsomelibstatically -Wl,-Bdynamic -lotherlibshared

If you just want to compile it all statically, use LDFLAGS="-static".

Dillo 2.0 for AMD64

I've compiled Dillo 2.0 for Ubuntu amd64 (or "intel64") and packed with upx. It should work with other amd64 distributions as well. It does not need fltk 2.0, it's statically linked. Ssl support is missing. It didn't find my ssl library. The required libraries are:

  linux-vdso.so.1 => (0x00007fffde5fe000)

  libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x0000003e44800000)
  libpng12.so.0 => /usr/lib/libpng12.so.0 (0x0000003e40c00000)
  libz.so.1 => /usr/lib/libz.so.1 (0x0000003e3dc00000)
  libX11.so.6 => /usr/lib/libX11.so.6 (0x0000003e3f800000)
  libXi.so.6 => /usr/lib/libXi.so.6 (0x0000003e41c00000)
  libXinerama.so.1 => /usr/lib/libXinerama.so.1 (0x0000003e44000000)
  libXft.so.2 => /usr/lib/libXft.so.2 (0x0000003e46400000)
  libpthread.so.0 => /lib/libpthread.so.0 (0x0000003e3d800000)
  libXext.so.6 => /usr/lib/libXext.so.6 (0x0000003e3fc00000)
  libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0x00007f6dd6242000)
  libm.so.6 => /lib/libm.so.6 (0x0000003e3d400000)
  libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f6dd6033000)
  libc.so.6 => /lib/libc.so.6 (0x0000003e3cc00000)
  /lib64/ld-linux-x86-64.so.2 (0x0000003e3ba00000)
  libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x0000003e41000000)
  libXrender.so.1 => /usr/lib/libXrender.so.1 (0x0000003e41400000)
  libxcb-xlib.so.0 => /usr/lib/libxcb-xlib.so.0 (0x0000003e3ec00000)
  libxcb.so.1 => /usr/lib/libxcb.so.1 (0x0000003e3f000000)
  libdl.so.2 => /lib/libdl.so.2 (0x0000003e3d000000)
  libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x0000003e40400000)
  libXau.so.6 => /usr/lib/libXau.so.6 (0x0000003e3f400000)
  libexpat.so.1 => /usr/lib/libexpat.so.1 (0x0000003e40000000)
  libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0x0000003e3e800000)


Enjoy! ;-)

Dillo Browser 2.0 Out Now!

Well, if browsers were only about pure speed and size, I guess dillo would always win. It's probably the most minimalist browser for X. And it's blazingly fast. It Opens extremely fast, it loads webpages in amazing speed. And now version 2.0 is out. Unfortunately there are no amd64 packages available, so I had to go and do it myself again. I will put them in a seperate post.

Javascript innovations - How will Opera react?

Until now it seemed Opera was the most innovative Browser out there: Tabs, Browser Sync, "Magic" Input bar, ... Opera had it first, or did it better.

Now Firefox came with their JIT Javascript engine and Chrome added a multi-threaded approach to that and I ask myself: How will Opera react?

In my experience Opera has been pretty good with most webpages and was faster, especially with many web pages at the same time. But it does get laggy then. And especially (Google's) web applications such as Gmail and Google Reader respond pretty slowly in Opera.

I've set up the email account, because I was bothered how long things took in Gmail. And using Firefox was not better, using both is really annoying.

I wish Opera was available with Chrome's innovative new features... Hopefully they're already working on it. And Opera Browser for the Web 2.0.

The Knotify4 Wake-Up Problem

Martin Kretz released an alternative backend for phonon that fixes the knotify4 high wake-up problem.

Broadcom Wireless Drivers - wl vs. b43 - Performance Comparison

I've compared the performance of both drivers with a simple iperf test over a few meters:

Broadcom Proprietary Driver:

TCP

------------------------------------------------------------
TCP window size: 85.3 KByte (default)  
------------------------------------------------------------
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 46362
[ 4] 0.0-10.2 sec 24.6 MBytes 20.2 Mbits/sec  
[ 5] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 46363
[ 5] 0.0-10.2 sec 24.6 MBytes 20.2 Mbits/sec
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 46365
[ 4] 0.0-10.2 sec 24.0 MBytes 19.8 Mbits/sec

UDP
------------------------------------------------------------
Receiving 1470 byte datagrams
UDP buffer size: 375 KByte (default)
------------------------------------------------------------
[ 3] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 35141[ 3] 0.0-10.0 sec 24.2 MBytes 20.2 Mbits/sec 1.364 ms 0/17239 (0%)[ 3] 0.0-10.0 sec 1 datagrams received out-of-order[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 38437[ 4] 0.0-10.0 sec 27.2 MBytes 22.8 Mbits/sec 1.837 ms 0/19418 (0%)[ 4] 0.0-10.0 sec 1 datagrams received out-of-order[ 3] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 45356[ 3] 0.0-10.0 sec 28.8 MBytes 24.1 Mbits/sec 1.319 ms 0/20555 (0%)[ 3] 0.0-10.0 sec 1 datagrams received out-of-order
B43 Open Source Driver

TCP
------------------------------------------------------------
TCP window size: 85.3 KByte (default)
------------------------------------------------------------
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 42345
[ 4] 0.0-10.1 sec 19.6 MBytes 16.4 Mbits/sec
[ 5] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 42346
[ 5] 0.0-10.2 sec 23.1 MBytes 19.0 Mbits/sec
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 42347
[ 4] 0.0-10.2 sec 21.7 MBytes 17.8 Mbits/sec

UDP

------------------------------------------------------------
Receiving 1470 byte datagrams
UDP buffer size: 375 KByte (default)
------------------------------------------------------------

[ 3] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 57459
[ 3] 0.0-10.1 sec 14.0 MBytes 11.7 Mbits/sec 0.438 ms 152/10171 (1.5%)
[ 3] 0.0-10.1 sec 1 datagrams received out-of-order
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 55062
[ 4] 0.0-10.0 sec 15.7 MBytes 13.1 Mbits/sec 1.372 ms 205/11373 (1.8%)
[ 4] 0.0-10.0 sec 1 datagrams received out-of-order
[ 3] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 49861
[ 3] 0.0-10.1 sec 23.4 MBytes 19.5 Mbits/sec 3.724 ms 292/17017 (1.7%)
[ 3] 0.0-10.1 sec 1 datagrams received out-of-order
[ 4] local 192.168.178.24 port 5001 connected with 192.168.178.34 port 42069
[ 4] 0.0-10.0 sec 21.5 MBytes 18.0 Mbits/sec 1.370 ms 239/15544 (1.5%)
[ 4] 0.0-10.0 sec 1 datagrams received out-of-order

As you can see, the proprietary driver is slightly faster in TCP mode. And somehow they're both really slow in UDP mode. That's something I'd like to find out more about.

Update: That was my fault. For some reason iperf restricts UDP tests to 1 Mbit/s. Now the results are more appropriate. The result is that the proprietary driver has a more stable connection speed.

But I think that's really not worth installing a proprietary driver. Broadcom really would better integrate the changes into the open source driver. Their driver is still relying on the deprecated wireless system anyway.

Update2: Further tests showed that, at least after a while of usage, the proprietary driver creates high network latencies. Ping times to the router went up from 2 ms to an average of 160ms (peaks of 500ms !).

Broadcom Proprietary Drivers with Linux 2.6.27

I've found a way to get the drivers to compile... I just downloaded the intrepid restricted modules package source from Ubuntu.

Then unpack, go to ubuntu-intrepid-lrm/ubuntu-restricted/broadcom
and make -C /lib/modules/`uname -r`/build M=`pwd`

They only work with TKIP for me, at least not with WPA2. (The open source b43 drivers does.)

Broadcom's Unfree Driver

Broadcom put up some partially binary drivers for their wireless chips. Well, better late and little I guess. They don't compile with 2.6.27 yet, though. Please post hints in the comments.

Automated Linux Kernel Testing

I'm currently always using the current git kernel. And my thought is: Why isn't there some tool available to automatically tell the developers how many users are currently runnig the kernel, on what platform, how many segfaults, crashes, etc. the test systems had. That would make it much easier to know bugs are there... And it could all run automatically in the background, or at least semi-automatically.

Perfect Slide Shows in Linux with Digikam's Advanced Slide Show Plugin

I've always been jealous of Picasa's Slideshows under Windows. They don't work well in Linux' Wine version unfortunately. Until today. I wrote an email to the developer of the great kde screensaver "smooth slide saver" that I've mentioned just the day before yesterday.

And he told me about a digikam plugin with similar features. It was pretty hard to find. Even after looking up screenshots of it being used. It's called digikam advanced slideshow plugin. And it's part of the kipi-plugins package.

You need to install the packages digikam kipi-plugins. Then you start digikam. Don't select the normal boring slideshow that's normally used. Instead select a couple pictures in an album, go to Extras (in the menu), select (Advanced) Slideshow, right underneath Find Duplicates. And enjoy! :)

And the great thing: Digikam and with it the (opengl) advanced slideshow plugin support the comments I put into the pictures with Picasa. That means I can do the perfect slideshows under Linux now, even much better than Picasa'a Windows slideshows, with all my comments. And all open source! Cool.

Difference Between the iPhone and a Stone

Check out this funny comparison between a stone and the iPhone.

Smooth Slide Saver

I think at least one of the best screen savers available on Linux is the SmoothSlideSaver. It's an enhanced version of the GL picture screen saver and as the name says it's really smooth. There was a version for KDE 3.5 available. I so wish someone would port it to KDE 4... *sigh* ... and I wish it was integrated into the main distribution - because it really deserves to, at least into extragear.

KDE 4.1 with Multi-Head

Just a short note: If you plan to use KDE 4.1 with Multi-Head, make sure you do *not* do it using xrandr, otherwise KDE gets confused and messes up your screen. So set up your xorg.conf statically.

Intel put up a short howto, but it shouldn't be that different for other drivers. The important part goes like this:


Section "Device"
Identifier "Configured Video Device"
Driver "intel"
Option "FramebufferCompression" "off" # on for battery, off for multi-display
Option "monitor-LVDS" "internal"
Option "monitor-VGA" "external"
EndSection

Section "Monitor"
Identifier "internal"
EndSection

Section "Monitor"
Identifier "external"
Option "RightOf" "internal" #the left display is the primary one
EndSection

Section "Screen"
Identifier "Default Screen"
Monitor "internal"
Device "Configured Video Device"
SubSection "Display"
Virtual 2560 1024
# this should be as large as both displays next to each other
EndSubSection
EndSection

Section "ServerFlags"
# Option "Xinerama" "true" # crashes
Option "AIGLX" "false" # crashes multi-head
EndSection




After doing that, (instead of crashes and frustration) you're rewarded with very nice customization options in KDE 4.1.2: You can set the wallpaper for each screen, put different plasma applets at different locations, etc.

If you're using the intel driver I can also recommend disabling AIGLX in the ServerFlags Section of your xorg.conf to make the setup more stable. After supend/resume I regularly have to set reconfigure the screen setup with xrandr and then switch back and forth between X and the console to turn my external monitor back on.

I wonder how the new X server version in Kubuntu 8.10 will be.

Divx Embedded Video with Mplayer in Linux

If you want to watch Divx embedded Videos in your browser, like they used to be offered by Stage6, you can use the mozilla-mplayer package with the following customizations:

Install the package mozilla-mplayer.

In /etc/mplayerplug-in.types you need the lines
video/divx:divx:DivX Media Format;
video/vnd.divx:divx:DivX Media Format;

and in /etc/mplayerplug-in.conf you need the line
use-mimetypes=1

Don't start your browser before you've made these changes, otherwise you need to uninstall the plugin, start the browser, exit it, reinstall the plugin and then it should work. This works in Opera and Firefox for me.

Update: Unfortunately this does not work on all pages, some seem to check specificly for the divx.com plugin, which of course won't work...

New Stuff

Pogue just wrote an article about basic things every computer users should know. Well, most of it I did know and won't write it here. But one thing I found interesting it the part about new hardware coming out:

iPods come out in September and digital cameras in February and October.

Midori

If you want to try out a browser that uses webkit in Linux, just try out midori. It's not a lot like chrome, though. It's not as fast, etc. I do hope they quickly port a privacy-enhanced version of Chrome to Linux...

At least in the meantime I will stay with Opera, and hope they incorporate some of those Chrome features. That might make Chrome entirely unnecessary, which would be good. Google is probably too big already. No need for them to dominate the browser market. If their products just weren't so good and innovative...

KDE Webkit

I just found out there is a webkit KDE port, called webkitkde, with Ubuntu (372kb) packages:

Webkit is what Apple uses for Safari and Google used for Chrome.

Update: This does not work cleanly if you use the kde 4.1.1 packages for hardy from the motu developers. Or to make it short: webkitkde works only in intrepid, because of wrong paths. If I have a workaround at the end.

Update2: Google Mail works with a bit of tweaking now. (I had to set Konqueror to identify as Safari 2.0 and reload the page mail.google.com.)

Update3: It's really beta software, you're not likely to have a lot of fun with it... :(. Gmail does not really work after all.

Update4: Even compiled from svn-trunk it's not really fun. There's some problem with the page loading, the fonts are too small I think. And just using khtml is much faster and more fun.

Just put this into your (Ubuntu hardy) shell:

sudo su -c "echo 'deb http://archive.ubuntu.com/ubuntu intrepid main' > /etc/apt/sources.list.d/intrepid.list"
apt-get update
apt-get install webkitkde
sudo su -c "echo > /etc/apt/sources.list.d/intrepid.list"
apt-get update

# workarounf for hardy
cd /usr/lib/kde4/share/kde4/services/
sudo ln -s /usr/share/kde4/services/webkitpart.desktop .
cd /usr/lib/kde4/lib/kde4/
sudo ln -s ../../webkitkdepart.so
# now the fine-tuning
cd /usr/lib/kde4/share/kde4/apps/ && sudo ln -s /usr/share/kde4/apps/webkitpart
cd /usr/lib/kde4/share/icons/hicolor/ && for i in 16x16 32x32 48x48 64x64 128x128; do cd $i/apps; sudo ln -s /usr/share/icons/hicolor/"$i"/apps/webkit.png; cd ../..; done;

kbuildsycoca4


And to uninstall:

sudo rm /usr/lib/kde4/share/kde4/services/webkitpart.desktop /usr/lib/kde4/lib/kde4/webkitkdepart.so /usr/lib/kde4/share/kde4/apps/webkitpart
cd /usr/lib/kde4/share/icons/hicolor/ && for i in 16x16 32x32 48x48 64x64 128x128; do cd $i/apps; sudo rm webkit.png; cd ../..; done;
sudo apt-get purge webkitkde


The README tells us:
You can switch between the different rendering engines:
View -> View Mode -> {KHTML, WebKit} (Website needs to be opened)
If WebKit does not show up in Konqueror, run 'kbuildsycoca4'.

If you want to set the WebKit part as default, run:
'keditfiletype text/html'
and move "WebKit (webkitpart)" in the "Embedding" tab to the top.

For more information about this project please see also:
http://techbase.kde.org/Projects/WebKit

Browsers in Linux

Okay. After my Opera link frustration I must admit that I've come back. Firefox was nice and fast at the beginning, but it's got serious issues after using it for a while. And with many tabs it gets slower, it's not very pretty, it takes longer to load, FlashBlock causes me a lot of trouble. And other issues.

I just like Opera. It doesn't get slower after using it for a couple weeks. It's got a neat bookmark system (It better not dare swallowing my bookmarks again!!!), it's fast&snappy. I hope they'll fix the network issue which cause Opera to be faster on slow links but slower on fast links. And some webpage don't render well.

And I hope they'll quickly incorporate a lot of the improvements of Chrome. I think if it would run natively on Linux (it works quite well with WINE), I'd be very tempted to use it as my primary browser.

Google Ads Experiment Ended

I've ended the experiment with Google Ads and removed all ads. I've earned somewhere between 0 and 8 cents. Looks like my Blog (still) has way too few visitors. I don't even really know from looking at my ad control website. And then they did put some quite weird and non-fitting ads in here every once in a while...

But don't worry, I'm still spying on you with Google Analytics. ;)

Linux Boot in 5 Seconds (with subscriber link)

Linuxhaxor posted a special subscriber link to the long-awaited lwn.net article on how to get (the eee pc) to boot in 5 seconds as part of an (unfortunately superficious and highly redundant) collection of linux tip articles.

The lwn article turned out to be not as impressive as I had hoped and expected from lwn - usually their articles are of excellent quality. Don't get me wrong - I do like what they've done. But the documentation level is too low for my taste. It is far from a howto that someone in the comments then asked about.

But I can recommend the flame war in the comments about how to correctly measure the boot time of a distribution. Come one guys, it's still so far away from 5 seconds, it doesn't matter how you measure it. And yes, some serious changes arelikely needed.

I hope Ubuntu puts a lot of the boot time improvement into the next release. I would put up with a couple bug in the release for that.

Arjan van de Ven Interview

As I mentioned in my last post, O'Reilly interviewed him and it's a quite interesting read. I only disagree on one point. He says "I think there are always going to be keyboards." (...) "it's also the fastest way to get more than a few characters into the computer."

I think that will change. At some point voice detection has to come around and get better than the keyboard and we will finally start talking again - as nature wants us to - instead of quietly sitting in front of our computer.

And at some point there will be developments to directly transfer sentences from your brain to the computer without the need to talk - though I'm not sure if that's really an improvement, language is just too cool an invention imo.

Well, for now I really look forward to improvements in booting time and on latency issues. That's another point were Windows has a really hard time to compete. The drivers' and applications' code is mostly proprietary and hidden somewhere behind closed doors and servers.

It's simply a great technical advantage to be immediately able to look at all the code, see how it works and find out where's the best point to fix a certain problem. And then being able to fix the actual root cause of the problem. That's one of the neatest things about open source.

Registration Hell

I know this is an old hat: You have to register for everything. Then came OpenID to the rescue. Only that it's so complicated to actually implement it on the server side and use it on the user side (what exactly do I have to put into the user box?) that it never quite arrived.

Now more and more I notice myself not bothering to register somewhere to add a comment to a bug, or file a new bug if it doesn't really matter that much to me. I've got probably a hundred or more accounts at different places by now and it's so bothersome. I really hope something's going to eliminate that problem at some point...

The actual page that made me write this was a pidgin bug ticket, which is related to pidgin using fsync way too often and causing very bad latency in the process. (~300+ms on my system). I found it using latencytop after reading this interesting interview. And I was wondering if something has been done about the problem. It doesn't look like it...

Bashrc Tipps

Here's a little article with some tips for making your daily shell life easier which at least I have not seen before. They include saving the history of all shells on exit.

Quick Transcoding with Mencoder and Xvid

This little script helps you to quickly transcode any content mplayer accepts to an xvid avi file. It copies the audio track and encodes the video track to xvid in the original resolution in your current directory.


#!/bin/bash
# mencode.sh (c) 2008 linux-tipps.blogspot.com

# settings

BR=1400 # bitrate
lang=en # your language code for the DVD audio track, e.g. en/de/es
OUT=`basename "$1"`"-xvid-fast.avi" # output file in current directory
XVID="lumi_mask:interlacing:nochroma_me:me_quality=4:vhq=1:autoaspect:chroma_opt:bitrate=$BR" # xvid settings

# settings end

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

echo Encoding $i
screen -O mencoder -alang $lang -cache 32768 -ovc xvid -oac copy \
-xvidencopts $XVID "$1" -o "$OUT";

e.g. bash mencode.sh dvd://

You may want to compile xvid and mencoder for your machine to speed it up even more, but I've already set the xvid settings to a reasonably fast mode. I get around 25-30 fps when doing a DVD to Xvid backup on my notebook.

You could add -vf scale=640:-1 but it doesn't really increase speed, but makes it look worse. I use screen, so I can detach(Ctrl-a, Ctrl-d) from the encoding when I have to e.g. exit the current X session.

Detaching also helps to decrease unnecessary screen updates which eat cpu in many terminals. And it's better than passing -quiet as command line argument, because you now have the choice between seeing what's going on and how long it'll take or not. Screen is great... You can re-attach with screen -r. If you have several cores, try adding threads=x to the xvid options.

Black borders are not removed. If you have an idea how to do that automatically, let me know. Interlacing is kept for a good reason: Deinterlacing slows down the process and usually also degrades the quality. Deinterlacing while playing is usually the better alternative.

By the way: The most important parts are the xvid setting me_quality=4 and vhq=1 - they speed it up a lot - and compiling xvid for your processor, because some distributions don't properly compile it, even for amd64.

You may not use this script for content you do not have the rights to transcode.

Iron - Chrome after Rehab

Some German developers put Google's Open Source Chrome browser into a rehab and removed most of it's spying functions. They call it Iron and you can already download it for Windows. It's from German developers but works fine in English. Be aware that the security problems are probably not fixed.

And don't forget to disable the Google Ad cookie (permanent link in my links box on the right side of the webpage)! ;-)

OpenOffice Tips

LinuxPlanet has a nice article with some tips for efficient OpenOffice (Writer) usage.

I always recommend continually saving with a new filename if you're working on a big document, e.g. Important00, Important 01, (...). This means that if your current document should for some reason get lost (which happens a lot with MS Office, but rarely with Openoffice), you can use the last save. I actually had Openoffice corrupt a document once I think.

Syntax Highlighting in Nano

You can easily activate a pretty nice syntax highlighting in the small nano text editor, by putting these lines into your ~/.nanorc:

include "/usr/share/nano/c.nanorc"
include "/usr/share/nano/patch.nanorc"
include "/usr/share/nano/sh.nanorc"

See what else is available with ls /usr/share/nano/

Found here.

Chrome Developer's Channel

There's now a Chrome Developer's Channel available with automatically installed bleeding-edge versions of Chrome.

Multiseat Display Manager Out Now

The Multiseat Display Manager is now out and (hopefully) helps you to set up a multiseat environment (much) easier than before.

I have always wondered when a software such as the MDM would come out, as the Unix and X architecture is already perfectly prepared for cases as this and even over Network it is already possible.

Now you need only one computer with several displays, keyboards and mice to let several users e.g. surf the internet at the same time.

I will post my experiences as soon as I get to trying it out. For the curious of you here is a link to installing instructions, packages for debian and ubuntu are provided, as well as the sources of couse.

Update: The packages is very large at 20K, but unfortunately at this point available only as i386 package...

Update2: I've quickly assembled a Ubuntu 8.04 package for AMD64 systems ;-).

Ubuntu Restricted Extras

I just found out how easy it is to install all that good stuff to be able to listen to mp3s and everything:

sudo apt-get install ubuntu-restricted-extras

You must of course first check the legal situation of these packages in your country.

Chrome on Linux Now Really Easy

CodeWeavers has ported Google Chrome to Linux using Wine. You can download packages here.

Update: In my experience the package is not really worth trying. I had much better results running it with normal wine as mentioned before. The CodeWeavers package is really easy and comfortable.

But the AMD64 version I tested is also much slower and less responsive and I think it crashes more often than, but that's hard to tell with Chrome ;-). And the tabs often hang after loading a webpage and the webpage disappears until you press reload. And the letters are not on the same line, but always higher or lower.

But the cool thing about the port: SSL works. That means you can actually use google webpages with login like GMail. I hope that is ported back to wine, making chrome actually usable in Linux.

Update2: The problems I had seem to be related to 64-bit, as other webpages don't mention these issues.

Don't try Multi Head Configurations with KDE 4.1

There are several issues up to KDE 4.1 in multiple display configurations, so I can not recommend using KDE 4 for that purpose (yet).

See these bugs for more:
https://bugs.kde.org/show_bug.cgi?id=163057
https://bugs.kde.org/show_bug.cgi?id=162623
https://bugs.kde.org/show_bug.cgi?id=158850

Plasma Crash on Start Since Last Update

Since the last time I've updated my Ubuntu KDE 4.1.1 packages, plasma keeps crashing every single time I start KDE4. I think I'll try a mv ~/.kde4 ~/.kde4-crash ...

So my recommendation: Skip the KDE 4.1.1 upgrades for now.

Correct Ink Printer Usage

No matter if you use your printer under Linux or Windows, there's a couple things you should do to extend your printers life time and reduce your ink usage:
  1. Keep the Printer connected to the power outlet. (Do turn it off, though.) The energy this costs should be low on any modern printer. And if you disconnect your printer it will most likely clean it's ink tank the next time you turn it on or print something. And cleaning the ink tank once takes a lot of ink.
  2. Print something in every color at least once a week. This keeps the tank clean and ensures the printer doesn't need to use the ink cleaning program, which uses a lot more ink than most things you will print. The best thing to do it to print the test pattern once a week if nothing else. It usually activates every ink once and has a very low ink usage.
  3. Use printing modes like "draft" for uninportant things. They are not only faster, they also use much less ink. Also use your printer's duplex feature if it has one. This saves 50% paper and therefore is good for the environment and your wallet. And you can always print several pages on each side of a paper.
  4. Get your ink cardridges refilled. This is good for the environment, your bank account balance and it doesn't hurt your printer. Sometimes alternative ink is even better than the original one. E.g. Pelican ink works with printers with a chip now and the results are even better than with Canon's original ink.

Safely Reboot a Crashed Linux

You need to press
Alt + Print, hold it and press
R E I S U B
(without the spaces).

Now your kernel *should* sync and unmount the filesystems and then reboot.

Found in 10 tips for lazy admins.

Sysctl for Network Perfomance

The short version:

net.ipv4.tcp_fin_timeout = 15
net.ipv4.tcp_keepalive_time = 1800
net.ipv4.tcp_window_scaling = 0
net.ipv4.tcp_sack = 0
net.ipv4.tcp_timestamps = 0
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.log_martians = 1
net.ipv4.tcp_max_syn_backlog = 1024
net.ipv4.tcp_max_tw_buckets = 1440000
net.ipv4.tcp_rmem = 4096 87380 8388608
net.ipv4.tcp_wmem = 4096 87380 8388608
net.core.wmem_max = 262143
net.core.rmem_max = 262143
net.core.rmem_default = 262143
net.core.wmem_default = 262143


Or less with more comments:
# Decrease the time default value for tcp_fin_timeout connection
net.ipv4.tcp_fin_timeout = 15

# Decrease the time default value for tcp_keepalive_time connection
net.ipv4.tcp_keepalive_time = 1800

# Turn off the tcp_window_scaling
net.ipv4.tcp_window_scaling = 0

# Turn off the tcp_sack
net.ipv4.tcp_sack = 0

# Turn off the tcp_timestamps
net.ipv4.tcp_timestamps = 0

# Enable bad error message Protection
net.ipv4.icmp_ignore_bogus_error_responses = 1

# Log Spoofed Packets, Source Routed Packets, Redirect Packets
net.ipv4.conf.all.log_martians = 1

# Increases the size of the socket queue (effectively, q0).
net.ipv4.tcp_max_syn_backlog = 1024

# Increase the tcp-time-wait buckets pool size
net.ipv4.tcp_max_tw_buckets = 1440000


An excerpt from Webhostingtalk.

The Great Sysctl Mystery

Most advanced Linux users with know the sysctl interface for fine-tuning the Linux kernel. But there is probably noone on earth who really understands all those parameters. Well no wonder, as they're usually not even documented.

So I just thought to myself:
It would be great to have a program which has all the values and explanations to them. It could then create configuration files and let sysctl parse them. "Linux Kernel Tuning" would be a cool name. If I had more time... ;-)

The World in Danger

When the Large Hadron Collider was activated for the first today there was a very disconcerting picture leaked.

Also check out this comic.

Git Bisecting the Linux Kernel to Find Bugs

You can help the Linux developers by testing out the current bleeding edge version of Linux by downloading the current version from git:
git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

And then you can compile the kernel normally. To fetch the newest updates you enter the directory (linux-2.6) and enter git pull.

Then if you find a bug that wasn't there before you can find out which patch caused it with a git bisect search. It's relatively quick through a binary search algorithm, it only needs around 14 compiles and boots for about 4000 patches, and the complexity is logarithmic I believe (so it's always relatively quick, even with a lot to test).

Also see this quick intro and the man page.

Compiling really takes most of the time. You can decrease that time by creating a minimal kernel configuration (it's worth it!) with only the features activated that are needed to trigger the bug.

I recommend compiling everything directly into the kernel, you can then just do "make bzImage" instead of make and save the time for making and installing the modules (over and over again).

When Community does not Help: Ubuntu Maintainers keep their hands still about NetworkManager Memory Leak

There is a bug report about the current networkmanager memory leak at launchpad since March now. At that time the current Release was not even out. But the maintainers at Ubuntu are so passionately careless about it that they haven't even commented on it since then.

There are several people watching the bug and of course thousands affected with NetworkManager being in the standard installation of at least Ubuntu and Kubuntu, but the maintainers keep their hands still. A fix is also out and has been successfully applied and a package was released, too. It just never went into the current distribution.

This shows how the community can care so much about important bugs, if the appropriate people don't respond, many Linux users are just as helpless as when they use Windows. But I really doubt that such a major memory leak would remain unfixed for such a long time even in any current Microsoft product.

A shame...

If you want the bug fixed for you, you can do so manually, I posted links to the fixed packages a while ago.

Latencytop Explained

I hope you all know what powertop is - at least if you own a Laptop with Linux on it - but I always had trouble with the wonderfully non-intuitive interface to LatencyTop. But now there's an article on Linux.com explaining it.

Debian Packages the Easy Way

Ever wanted to create a debian package so your package manager knows about the program you installed from source and helps you with the clean up or upgrades? Do you configure; make as usual and then simpy give it a
sudo checkinstall -D

You may of course need to apt-get install the package checkinstall first.

Using IrDA on Linux

Using IrDA under Windows is quite simple. It just works. On Linux it took me literally hours to get it working. But you might get it working much faster with these tips ;-)

A very useful website was this one: http://www.hpl.hp.com/personal/Jean_Tourrilhes/IrDA/#debug

You have to do most things as user root. Otherwise they might now work because you don't have the permissions but you won't know that because the programs won't tell you.
  1. You need to load all the appropriate modules for your driver, also ircomm_tty irtty_sir sir_dev.
  2. Then you need to activate the network interface irda0: ifconfig irda0 up.
  3. You should now be ready to establish a connection (as root).
I've made this script, which lets me connect a Siemens M65 to the Acer Extensa 5220:
#reprobe irda kernel module
rmmod nsc-ircc
modprobe nsc-ircc dma=3 io=0x02F8 irq=3 # these are standard settings for the 5220. they might work for you, too.

# activate interface
ifconfig irda0 up
# enable discovery
echo 1 > /proc/sys/net/irda/discovery
#wait for results
sleep 2
#check results
cat /proc/net/irda/discovery

#attach irda stack
irattach irda0 -s

#you should now be able to watch the transfer stats with irdadump

# for mobile phone connectivity problems I need to reduce the connection speed
echo 9600 > /proc/sys/net/irda/max_baud_rate
Notes
  • cat /proc/net/irda/* shows you some information about the irda devices.
  • Be aware that the connection device is /dev/ircomm0.
  • You should first try everything as user root. Otherwise it might fail just because of missing permissions. Then in a second step when it works, try to use it as a user.
  • obexftp claims it doesn't need the -i parameter for irda. Well, it does, though.
  • I still haven't been able to get ppp over GPRS to work with Linux.
  • Irda currently works only after rebooting into Linux from Windows.

Memory Usage - Pidgin vs. Kopete

The GTalk outage gave me some time to run another test of pidgin vs. kopete in memory consumption. Pidgin used to always win this competition, which is - next to the then better working file transfers - why I use pidgin.

I tested it again today and this time the Kopete coming with KDE 4.1.1 in Kubuntu won!

  • Kopete used about 18 MB ram
  • Pidgin used 23 MB ram

These results and the differences were reproducible. They were tested with "free" in the console. I started one program, then the other and in between ran free in the shell - several times.

Of course these results apply only if you're running a KDE 4.1.1 desktop. If you're a gnome user, pidgin is very likely to use less memory for you.

Also reproducible was that Kopete ate a lot of memory when opening the - currently very slow - configuration dialogue.

There seems to be a bug somewhere, as this memory is not freed until after you restart kopete. So after configuring something in Kopete 0.60.1 make sure you quit and restart it.

Feel free to test it yourself and post your results. Make sure to include what distribution, program versions and desktop environment you use and that you have the same amout of accounts active in each program.

Google Server Problem

Google wasn't especially known for server problems so far. But it seems recently there have been outages or slow service in Gmail and other Google online services. So if your Google Talk account doesn't work today don't worry - you're not the only one.

Google Chrome under Linux with WINE

It turns out the guys at WineHQ already figured out how to run Google Chrome within WINE. Heres a really easy quick guide for you:

  1. Get a current wine version (1.1.3+)
  2. Download the Chrome offline installer.
  3. Install normally, best with a fresh wine installation.
  4. Go into the install directory (e.g. #cd ".wine/drive_c/windows/profiles//Local Settings/Application Data/Google/Chrome/Application") NOTE: this path is not exactly the same for everyone
  5. Start chrome like this: wine chrome.exe --new-http --no-sandbox
To get some privacy you should also
  1. Disable URL typo correction.
  2. Disable website suggestions.
  3. Disable Google Ad cookies.
  4. Quit Chrome. Then change the browser's unique identifier in "User Data/Local State" to the values from Google Chrome Portable to (hopefully) prevent Google from identifying your personal browser copy:
"client_id": "FA7069F6-ACF8-4E92-805E-2AEBC67F45E0",
"client_id_timestamp": "1220449017",

And now finally enjoy your privacy-enhanced Google Chrome browser! :)

Unfortunately there's no guarantee that Google hasn't hidden even more spying features in this otherwise pretty neat little browser.

Strip Mining of Open Source

Two people, one idea. Richard Hillesley from IT PRO also writes about companies who don't give back to the open source community, like Apple.

It makes for an interesting read and I think his article is much better researched than my own I posted here recently. And showing the dangers of some open source licenses he concludes developers should be careful in their choice of open source licenses.

The GPL, he concludes, not only protects from "strip mining" companies, but also (though IMO less well reasoned) from fragmentation and forking of the code.

It seems Hillesley's article is a response to an article by Fleury.

Power Save Script

I wrote a little powersave script that quickly executes a few commands to improve battery life, esp. on notebooks. You can put it in /etc/acpi/battery.d/20-powersave.sh to start automatically when the computer runs on battery.


#!/bin/bash

SUDO=`which sudo`
SU=`which su`
EXEC="$SUDO $SU -c"

echo Activating power saving mode...

# Automatically suspend USB -- How to automatize?
# usbcore.autosuspend=1 to kernel cmdline didnt work
$EXEC "echo 1 > /sys/module/usbcore/parameters/autosuspend"

# Disable CD autodetection by hal
# sudo hal-disable-polling --device /dev/scd0

$EXEC "ethtool -s eth0 wol d"

# reduce disk writes
$EXEC "echo 1500 > /proc/sys/vm/dirty_writeback_centisecs"

# SATA powersaving mode
$EXEC "echo min_power > /sys/class/scsi_host/host0/link_power_management_policy"

# AC97 power saving
$EXEC "echo 1 > /sys/module/snd_ac97_codec/parameters/power_save"

# Intel-HDA power saving
$EXEC "echo 1 > /sys/module/snd_hda_intel/parameters/power_save"

# optimize scheduling for dual-core cpus
$EXEC "echo 1 > /sys/devices/system/cpu/sched_mc_power_savings"

# Remove fixed network adapter, intel watchdog
sudo rmmod iTCO_wdt iTCO_vendor_support tg3

# set minimum frequency
#$EXEC "echo 866664 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq"

sudo killall guidance-power-manager.py

xrandr --output TV --off

for i in /sys/bus/usb/devices/%s/power/autosuspend; do $EXEC "echo 1 > $i"; done

$SUDO iwconfig wlan0 power on



Actually I think a part of the script might be from someone else...

Reducing Power Consumption for Linux Laptop

Besides tuning your system with powertop, there are a lot of things you can do to minimize the power consumption of your Linux laptop in order to maximize the battery life.

Thinkwiki is a great Wiki with lots of power saving information I recommend.

Second Thoughts on Google Chrome

The problems with Google Chrome are that it
  1. is not (yet) available for Linux
  2. spies what webpages you visit
  3. has a unique browser identifier
  4. can be crashed completely by a single webpage
  5. has some (so far minor) security issues.
And of course it might extend Google's web monopoly even further.

Open Source Donation Center

Reading a news update on Phoronix I had a nice idea: Why isn't there a place to make a spread donation to open source projects. You get everything for free on Linux, but you'd like to give some money for improving the software you use.

Imagine there's a simple single place where you can donate to different software projects and for different purposes. They could of course also offer memberships, bounties and support contract models, mascots, licenses etc. And the software projects wouldn't have to deal with the legal and financial issues involved but just get the money.

Especially Xorg needs more support and I guess a couple paid employees wouldn't hurt. Situations like that could be sought out and dealt with by a Linux task force. I guess someone like the Linux Foundation might be a good starting point.

(Not) Giving Back to the Community

Open source software is not only a great chance for software projects to make better software. It is also a great Chance for the community and companies to quickly create new products or assemble them to new products.

Among the current examples of using free software are many big names
  • Apple's OS X operating system
  • the Safari browser
  • Google's Servers (Linux-based)
  • Google's new Chrome browser
  • AnchorFree's Hotspotshield software.
The problem is, though, that many companies use code from other projects themselves, but fail to give back code to the community.

Apple only publishes the changes made to the Darwin operating system every once in a while, only that few people really care. Of course Apple doesn't want people to be able to run Mac OS X on normal PC hardware and thus does everthing to discourage too active community involvement here.

But you can only wonder how come the Safari browser, based on KDE's Konqueror KHTML engine, is still not available for Linux. Even worse, most of the enhancements made by Apple are never incorporated back into KDE. And Apple even managed to draw developers away from developing KHTML to working only on Safari. (I know, this is a big debate and flate-prown.)

Google claims to give back much more to the community than it would have to and proudly states that Chrome is made open source. But it's not like it really was their free choice. Chrome is based upon Firefox and KHTML and both are open source and at least HTML is GPL-licensed and may thus not be published as a closed source software. And most other Google software products are closed source: Google Desktop, Picasa, etc.

And one has to wonder about the big picture. If companies do not return code enhancements and help to the open source projects, the result will not only be a major frustration in the projects, but also a financial detriment for the global economy. Because only if the project members are encouraged to write free software and not only used, they will enjoy working in their free time. In their work they help to prevent a constant reinventing of the wheel in different areas of software development and fix many bugs.

In the end good open source collaboration can free up many resources and enable programmers everywhere to create new, better software much more quickly, dynamically and freely. This is something a company must consider when getting involved with open source projects and keep in mind to provide help back to the projects in terms of a significant part of the employee time, code and money they saved.

Google Chrome is Out

Everybody's writing about it. I've got a direct download link for you, in case the people at Google keep taking it off just like today:
Try either http://www.google.com/chrome/eula.html or http://dl.google.com/update2/installers/ChromeSetup.exe.

Or the Offline installer: http://dl.google.com/chrome/install/149.27/chrome_installer.exe

(not verified backup: http://rapidshare.com/files/142199853/chrome_installer.exe)

Backup Partitions to a Bootable Partimage DVD

Looking for exactly that I found a nice quick little howto, which is written for Windows, but only uses Linux tools: http://ping.windowsdream.com/ping/doc-2.01/bootiso.html

Beware of the Paypal

I recently had a cancelled transaction with paypal. I payed, an hour later the shop told me they don't have the product available. The payment was cancelled.

And then paypal froze the money in my account: "money withheld". 13 days after the transaction the money is finally back on my bank account and I think to myself: Avoid paypal, especially for large sums of money.

Of course Paypal loves to get an involuntary free two week credit from me and work my money without giving me anything back. And that they just freeze my money just shows you what kind of company paypal is.

If you, too, live in Europe and get into trouble with Paypal, don't hesitate but contact FIN-NET, the european bank complaint network:
http://ec.europa.eu/internal_market/finservices-retail/finnet/index_en.htm
The more people complain, the more paypal will have to behave itself.