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.