Vitavonni

Phoronix GNOME user survey

While not everybody likes Phoronix (common complaints include tabloid journalism), they are doing a GNOME user survey again this year. If you are concerned about Linux on the desktop, you might want to participate; it is not particularly long.
Unfortunately, "the GNOME Foundation still isn't interested in having a user survey", and may again ignore the results; and already last year you could see a lot of articles along the lines of The Survey That GNOME Would Rather Ignore. One more reason to fill it out.
2012-11-21 09:30 — Categories: English LinuxPermaLink & Comments

Migrating from GNOME3 to XFCE

I have been a GNOME fan for years. I actually liked the switch from 1.x to 2.x, and at some point switched to 3.x when it became somewhat usable. At some point, I even started some small Gnome projects, one even was uploaded to the Gnome repositories. But I didn't have much time for my Linux hobby anymore back then.
However, I am now switching to XFCE. And for all I can tell, I am about the last one to make that switch. Everybody I know hates the new Gnome.
My reason is not emotional. It's simple: I have systems that don't work well with OpenGL, and thus don't work well with Gnome shell. Up to now, I can live fine with "Fallback mode" (aka: Gnome classic). It works really good for me, and does exactly what I need. But it has been all over the media: Gnome 3.8 will drop 'fallback' mode.
Now the choice is obvious: instead of switching to shell, I go to XFCE. Which is much closer to the original Gnome experience, and very productivity oriented.
There are tons of rants on GNOME 3 (for one of the most detailed ones, see Gnome rotting in threes, going through various issues). Something must be very wrong about what they are doing to receive this many sh*tstorms all the time. Every project receives some. I've even received a share of the Gnome 2 storms when Galeon (an early Gnome browser) made the move and started dropping some of the hard-to-explain and barely used options that would break with every other Mozilla release. And Mozilla embedding was a major pain these days. Yet, for every feature there would be some user somewhere that loved it, and as Debian maintainer of Galeon, I got to see all the complaints (and at the same time was well aware of the bugs caused by the feature overload).
Yet with Gnome 3, things are IMHO a lot different. In Gnome 2, it was a lot about making things more usable as they are, a bit cleaner and more efficient. With Gnome 3, it seems to be about experimenting with new stuff. Which is why it keeps on breaking APIs all the time. For example themeing GTK 3 is constantly broken; most of the themes available just don't work. Similar Gnome Shell extensions - most of them work with exactly one version of Gnome Shell (doesn't this indicate the author has abandoned Gnome shell?).
But the one thing that was really sticking out was when my I updated the PC of my dad. Apart from some glitches, he could not even shutdown his PC with Gnome-shell. Because you needed to press the Alt button to actually get a shutdown option.
This is indicative of where Gnome is heading: something undefined inbetween of PCs, tablets, media centers and mobile phones. They just decided that users don't need to shutdown anymore, so they could as well drop that option.
But the worst thing about the current state of GNOME is: They happily live with it. They don't care that they are losing users by the dozens. Because to them, these are just "complainers". Of cousre there is some truth in "Complainers gonna complain and haters gonna hate". But what Gnome is receiving is way above average. At some point, they should listen. 200 posts long comment chains from dozens of peopls on LWN are not just your average "complaints". It's an indicator that a key user base is unhappy with the software. In 2010 GNOME 2 had 45% market share in the LinuxQuestions poll, XFCE had 15%. In 2011, GNOME 3 had 19%, and XFCE jumped to 28%. And I wouldn't be surprised if GNOME 3 shell (not counting fallback mode) would clock at less than 10% in 2012 - despite being default.
Don't get me wrong: there is a lot on Gnome that I really like. But as they decided to drop my preferred UI, I am of course looking for alternatives. In particular, as I can get lots of the Gnome 3 benefits with XFCE. There is a lot in the Gnome ecosystem that I value, and that IMHO is driving Linux forward. Network-manager, Poppler, Pulseaudio, Clutter just to name a few. Usually, the stuff that is modular is really good. And in fact I have been a happy user of the "fallback" mode, too. Yet, the overall "desktop" Gnome 3 goals are in my opinion targeting the wrong user group. Gnome might need to target linux developers more again, to keep a healthy development community around. Frequently triggering sh*tstorms by high-profile people such as Linux Torvalds is not going to strengthen the community. There is nothing wrong in the FL/OSS community to encourage people to use XFCE. But these are developers that Gnome might need at some point.
On a backend / technical level (away from the Shell/UI stuff that most of the rants are about), my main concern about the Gnome future is GTK3. GTK2 was a good toolkit for cross-platform development. GTK3 as of now is not, but is largely a Linux/Unix only toolkit - in particular, because there apparently is no up to date Win32 port. With GTK 3.4 it was said that they are now working on Windows - but as of GTK 3.6 they are still nowhere to be found. So if you want to develop cross-platform, as of now, you better stay away from GTK 3. If this doesn't change soon, GTK might sooner or later lose the API battle to more portable libraries.
Update: Some people at reddit seem to read this as if I am switching out of protest. This is incorrect. As "fallback" mode is now officially discontinued, I switch to the next best choice for me: XFCE. And I do this switch before things start breaking with some random upgrade. I know that XFCE is a good choice, so why not switch early? In fact, I've right now only given XFCE a test drive, but it already feels right, and maybe even slightly better than fallback mode.
2012-11-13 14:14 — Categories: English Linux CodingPermaLink & Comments

Changing Gnome 3 colors

One thing that many people dislike about Gnome 3, in my opinion is that the authors/maintainers impose a lot of decisions on you. They are in fact not really hard coded, but I found documentation to be really inaccessble on how to change them.
For example colors. I found it extremely badly documented on how to customize GTK colors. And at the same time, a lot of the themes do not work reliably across different Gnome versions. For example the unico engine in Debian experimental is currently incompatible with the main GTK version there (and even worse, GTK does not realize this and refuse to load the incompatible engine). A lot of the themes you can get on gnome-look.org for example use unico. So it's pretty easy to get stuck with a non-working GTK 3, this really should not happen that easily. (I do not blame the Debian maintainers to not have worked around this using package conflicts yet - it's in experimental after all. But upstream should know when they are breaking APIs!)
For my work on the ELKI data mining framework I do a lot of work in Eclipse. And here GTK3 really is annoying, in particular the default theme. Next to unusable, actually, as code documentation tooltips show up black-on-black.
Recently, Gnome seems to be mostly driven by a mix of design and visual motivation. Gnome shell is a good example. No classic Linux user I've met likes it, even my dad immediately asked me how to get the classic panels back. It is only the designers that seem to love it. I'm concerned that they are totally off on their audience, they seem to target the mac OSX users instead of the Linux users. This is a pity, and probably much more a reason why Gnome so far does not succeed on the Desktop: it keeps on forgetting the users it already has. They by now seem to move to XFCE and LXDE because neither the KDE nor the Gnome crowd care about classic Linux users in the hunt for copying OSX & Co.
Anyway, enough ranting. Here is a simple workaround -- that hopefully is more stable across GTK/Gnome versions than all those themes out there -- that just slightly adjusts the default theme:
$ gsettings set \
org.gnome.desktop.interface gtk-color-scheme '
os_chrome_fg_color:black;
os_chrome_bg_color:#FED;
os_chrome_selected_fg_color:black;
os_chrome_selected_bg_color:#f5a089;
selected_fg_color:white;
selected_bg_color:#c50039;
theme_selected_fg_color:black;
theme_selected_bg_color:#c50039;
tooltip_fg_color:black;
tooltip_bg_color:#FFC;
'
This will turn your panel from a designer-hip black back to a regular grayish work panel. If you are working a lot with Eclipse, you'll love the last two options. That part makes the tooltips readable again! Isn't that great? Instead of caring about what is the latest hipster colors, we now have readable tooltips for developers again instead of all that fancy-schmanzy designer orgasms!
Alternatively, you can use dconf-editor to set and edit the value. The tricky part was to find out which variables to set. The (undocumented?) os_chrome stuff seems to be responsible for the panel. Feel free to change the colors to whatever you prefer!
GTK is quite customizable. And the gsettings mechanism actually is quite nice for this. It just seems to be really badly documented. The Adwaita theme in particular seems to have quite some hard-coded relationships also for the colors. And I havn't found a way (without doing a complete new theme) to just reduce padding, for example. In particular, as there probably are a hundred of CSS parameters that one would need to override to get it into everywhere (and with the next Gnome, there will be again two dozen to add?)
Above method just seems to be the best way to tweak the looks. At least the colors, since that is all that you can do this way. If you want to customize more, you probably have to do a complete theme. At which point, you probably have to redo this at every new version. And to pick on Miguel de Icaza: the kernel APIs are extremely stable, in particular compared to the mess that Gnome has been across versions. And at every new iteration, they manage to offend a lot of their existing users (and end up looking more and more like Apple - maybe we should copy more from where we are good at, instead of copying OSX and .NET?).
2012-10-22 17:31 — Categories: English LinuxPermaLink & Comments

Class management system

Dear Lazyweb.
A friend of mine is looking for a small web application to manage tiny classes (as in course, not as in computing). They usually span just four dates, and people will often sign up for the next class then. Usually 10-20 people per class, although some might not sign up via internet.
We deliberately don't want to require them to fully register for the web site and go through all that registration, email verification etc. trouble. Anything that takes more than filling out the obviously required form will just cause trouble.
At first it sounded like this is a common task, but in essence all the systems I've seen so far are totally overpowered for this. There are no grades, no working groups, no "customer relationship management". There isn't much more needed than the ability to easily configure the classes, have people book them, and get the list of singed up users into a spreadsheet easily (CSV will do).
It must be able to run on the typical PHP+MySQL web hoster and be open source.
Any recommendations? Drop me a comment or email at erich () debian org Thank you.
2011-10-09 15:04 — Categories: English LinuxPermaLink & Comments

Pyroman IPv6 support

I've added IPv6 support to my firewall tool Pyroman, and uploaded a package to experimental. But of course you can just checkout the source code from Subversion and call it as bin/pyroman without installation.
Pyroman will try to produce a consistent set of rules for IPv4 and IPv6. Originally it was designed for complex firewalls with multiple interfaces, various rules and NAT. I have so far only tested this version on my single-host setup at home, in particular NAT might break.
Pyroman has extensive debug functions. You can try --print-verbose to see why it produced which rules. By invoking pyroman safe you will tell it to revert any changes unless you type OK at the prompt.
And if it fails to compute firewall rules, or there is some iptables error, it will also restore the previous state.
So you have plenty of options to give it a try without risking to produce a mess. Just start with configuring it to the point where you like the "--print" output. Then give the "safe" mode a try next.
Check the Pyroman homepage for the features. There is more. Pyroman is a lot faster than most other firewall tools, because it does not perform hundreds of iptables invocations but uses iptables-restore to bulk load them. This is the fastest way to bring the firewall from one configured state into another. For the 0.6 version of pyroman I plan to offer precomputing the firewall rules, and use a single iptables-restore call at bootup to setup your firewall, with dependency tracking to see if the precomputed file is still up to date.
2011-08-17 20:54 — Categories: Linux Debian CodingPermaLink & Comments

Restricting Skype via iptables

Whenever I launch Skype on my computer, it gets banned from the university network within a few minutes; the ban expires again after a few minutes when I close Skype. This is likely due to the aggresive nature of Skype, maybe the firewalls think it is trying to do a DDoS attack. One of the known big issues of using Skype.
For Windows users, there are some known workaround to limit Skype that usually involve registry editing. These are however not available on Linux, unfortunately.
Therefore, I decided to play around with advanced iptables functionality. While you cannot match the originating process reliably (the owner match module seemed to include such functionality at some point, but it was deemed unreliable on multi-core systems). However, there are other and more efficient methods of achieving the same.
Here's my setup:
# Add a system group for Skype
addgroup --system skype
# Override permissions of skype (assuming Debian package!)
dpkg-statoverride --update --add root skype 2755 `which skype`
And these are the iptables rules I use:
iptables -I OUTPUT -p tcp -m owner --gid-owner skype \
    -m multiport ! --dports 80,443 -j REJECT
iptables -I OUTPUT -p udp -m owner --gid-owner skype -j REJECT
They allow outgoing connections by Skype only on ports 80 and 443, which supposedly do not trigger the firewall (in fact, this filter is recommended by our network administration for Skype).
Or wrapped as pyroman (my firewall configuration tool; aptitude install pyroman) module:
"""
Skype restriction to avoid firewall block.

Raw iptables commands.
"""
iptables(Firewall.output, "-p tcp -m owner --gid-owner skype -m multiport ! --dports 80,443 -j %s" % Firewall.reject)
iptables(Firewall.output, "-p udp -m owner --gid-owner skype -j %s" % Firewall.reject)
which I've put just after the conntrack default module, as 05_skype.py
2011-07-26 18:45 — Categories: English LinuxPermaLink & Comments

Managing user configuration files

Dear Lazyweb,
How do you manage your user configuration files? I have around four home directories I frequently use. They are sufficiently well enough in sync, but I have been considering to actually use some file management to synchronize them better. I'm talking about files such as shell config, ssh config, .vimrc etc.
I had some discussions about this before, and the consensus had been that some version control system probably is best. Git seemed to be a good candidate; I remember having read about things like this a dozen years ago when CVS was still common and Subversion was new.
So dear lazyweb, what are your experiences with managing your user configuration? What setup would you recommend?
Update: See vcs-home for various related links and at least five different ways of doing this. mr, a multi-repository VCS wrapper seems particularly well at this.
2011-06-02 16:33 — Categories: English LinuxPermaLink & Comments

AMD64 broken on Debian unstable - avoid libc6 2.13-3

Beware from upgrading on AMD64. Make sure to avoid version 2.1.3-3, as this will render your system unbootable and unusable. As simple as the reason is (a missing link) as severe.
Bug report with instructions on how to recover. If you are lucky you have a root shell open to restore the missing link. Otherwise, you need to reboot with parameters break=init rw, recover the link with cd root; ln -s lib lib64, sync, unmount, reboot. It's not really hard to do when you know how. But it is a lot easier to avoid upgrading to this version. My i386 mirror already has the fixed upload (but i386 is not affected anyway). So by tomorrow, it should be safe again (depening on your mirrors delay).
2011-05-12 20:39 — Categories: English Linux DebianPermaLink & Comments

Finding packages for deinstallation

On my netbook, I try to keep the amount of installed software limited. Aptitudes "automatically installed" markers are very helpful here, since they allow you to differentiate between packages that were deliberately installed and packages that were manually marked for installation. I quite often browse through the list of installed packages and recheck those that are not marked as "A".
However, packages that are "suggested" by some other package (but not "required") will be kept even when marked as automatically. This is quite sensible: when you deinstall the package that "suggested" them, they will be removed. So this is nice for having optional software also automatically removed.
However sometimes you need the core package but not this optional functionality. Aptitude can help you there, too. Here's an aptitude filter I used to find some packages for removal:
!?reverse-depends(~i) ~M !?essential
It will display only packages with no direct dependency from another installed package and that are marked as automatically installed (so they must be kept installed because of a weaker dependency.
Some examples of "suggested but not required" packages:
  • Accessibility extensions of Gnome
  • Spelling dictionaries
  • Optional functionality / extensions
Depending on your requirements, you might want to keep some of these and remove others.

Here is also a filter to find packages that you can put on "automatically installed":
~i !~M ?reverse-depends(~i) !?essential
This will catch "installed but not automatically installed packages, that another installed package depends on". Note that you should not blindly put all of these to "automatic" mode. For example "logrotate" depends on "cron | anacron | fcron". If you have both cron and anacron installed, aptitude will consider anacron to be unnecessary (it is - on a system with 24h uptime). So review this list, and see what happens when you set packages to "A", and reconsider your intentions. If it is a software you want for sure, leave it on manual.
2011-03-15 14:04 — Categories: English Debian LinuxPermaLink & Comments

GNOME3 in Debian experimental - python and dconf

As GNOME3 slowly enters Debian experimental, things become a bit ... experimental.
The file manager can be set to still draw icons on the desktop, but that doesn't entirely work yet (it will also open folders as desktop then...)
One machine had lost the keyboard settings. I could not set the fonts I wanted...
There is a tool called dconf-editor that will allow you to manually tweak some settings such as the fonts. But it doesn't seem to have support for value lists yet - and the keyboard mappings setting is a string list.
So here's sample python code to modify such a value:
from gi.repository import Gio
s = Gio.Settings.new("org.gnome.libgnomekbd.keyboard")
s.set_strv("layouts", ["de"])
Update: you could also install the optional libglib2.0-bin and use the gsettings command.
2011-03-15 00:41 — Categories: English Linux Debian GnomePermaLink & Comments

Joerg Schilling stilly spreading FUD

Jörg Schilling is still spreading FUD (currently on an openSuSE list):
There is a social issue with Debian that attacks OSS projects _because_ they use the GPL. Please do not follow these attacks without asking a lawyer.
The removal of cdrecord has been the best reaction to these issues, since apparently working with him is impossible. In this thread, he again manages to accuse everybody else of lying and being incompetent. This clearly shows that you cannot work with him, and the only viable way is ignoring him as far as possible.
It also speaks of a hurt ego in a probably narcisstic person (after all, he seems to think everybody else is incompetent and lying - but I am not a psychologist, so this is not a diagnosis!).
Let me just point out one fact:
By not shipping his current cdrecord, we can obviously not violate any even just potentially invalid license. The way Debian is dealing with this issue is legally undoubtedly correct: obviously, we are not oblieged to include his software.
On the long run, I assume that Debian will also get rid of cdrkit/wodim. In my opinion, this is just a legacy code until we can switch to libburnia entirely, and we should now try to drop cdrkit/wodim as well in order to ship "wheezy" without it.
Since we cannot work with Jörg, the only sane way is to try to completely remove any code he wrote from our systems so we have no reason whatsoever to communicate with him.
cdrecord is dead, long live libburnia.
I expect to see lots of FUD from him in the post comments any time soon ... but I do not care: I don't use his software. My current laptop doesn't even have a CD drive ... and despite his claims, the Debian versions of cdrecord and wodim worked perfectly for me when I was still burning CDs.
My only advice to you is to ignore him as far as possible. It will not get you anywhere, it is just a waste of time. In fact, I shouldn't have wasted the time it took me to write this blog post.
2011-02-12 14:19 — Categories: English Linux DebianPermaLink & Comments

Debian Squeeze released!

Debian GNU/Linux 6.0 "squeeze" has been released today.
Congratulations to everyone involved in ironing the last few bugs out.
(My own involvement had been a bit limited recently, but I at least kept my few remaining packages in a ready-to-release state and helped with the occasional bug report and patch.)
Some people think that Ubuntu is the better Debian - I do NOT. Debian is a fun place, has great people working on it and is true to its aims at creating a truly free and high-quality distribution. The long release cycles of Debian are a feature, not a bug. Stable is for production systems, not toy projects.
The proper way of attributing Debian stable is conservative and sustainable, but not outdated. It actually can do everything you need - and will do so in 10 years.
If you have been using Open Source for as long as me (say 15+ years) you will probably have seen software hypes come and go. The one thing that has been always the same was Debian: dead reliable. There was a time when everyone was crazy about enlightement for it's shiny pretty UI. Almost like Compiz-Beryl just two years ago. It came, as a matter of fact Debian also had it, but it also went.
I also remember how people complained that Debian didn't ship Xgl back in 2006 when this was the latest hype (there was no Debian release in 2006). Well, Xgl died in 2008. The features remained, but done in a much nicer way, and also found their way into Debian. In fact, I also ran Xgl at least once, on Debian, but just not on "stable". One could say that Xgl never was quite "stable", was it?
Debian stable is good the way it is: an administrators choice. Of course, developers might have different needs, but there also is testing, unstable and experimental. Just make sure to align your choice with your needs. And sometimes, also rethink your needs: there is no "latest beta versions" and "stable platform" at the same time.
2011-02-06 11:10 — Categories: English Debian LinuxPermaLink & Comments

Is Oracle trying to break up with Open Source?

It seems like Oracle is trying to break up with all developer communities that supported and promoted their products for years. Here are some recent developments I've read about in the media:
  • OpenSolaris community breakup (forked to IllumOS)
  • Solaris losing e.g. Bryan Cantrill (Dtrace author), Mike Shapiro (ZFS), Jeff Bonwick (ZFS, slab allocator, LZJB)
  • Apache Foundation leaves the Java Community Process EC
  • Java also losing James Gosling (the father of the Java language), Simon Phipps and Chris Melissinos
  • OpenOffice (forking to LibreOffice, and many key contributors being forced to leave OpenOffice by ORACLE)
  • MySQL losing Brian Aker
  • ... and many more
So what will they break next?
Will the next free JVM still have all the features, or will we have to abandon Java unless we pay for their premium JVM?
P.S. here is blog post about a still unfixed java security issue from 2008. As much as I have been using Java lately and like Eclipse, I'm not sure if I'd use Java for any new project, since it appears to be quite dead sometimes. Lots of unfixed bugs, key developers leaving, ...
2010-12-17 16:06 — Categories: English LinuxPermaLink & Comments

New netbook - ASUS EeePC 1016P

I have a new netbook, from work. This model wasn't my choice, but it is a really good choice by our system administrator. The design is plain, dark but nice (brushed aluminium), the size is a true netbook. I also like the keyboard, despite the small size.
Installing Debian squeeze worked like a charm. Essentially, I needed to build an installer USB stick with the netinstall image, then I could use the switched LAN connection to a local Debian mirror at the university network. However you should know that the WLAN connection requires a non-free firmware, so if you plan to install with WLAN only, you need to get the package on your install thumbdrive.
The rest worked out of the box, and I directly went to unstable + some stuff from experimental. The only thing not working I've found so far are some special buttons (presentation mode, but also toggle wireless!) - but they are already reported by the kernel als "unknown key", so this will eventually be added.
As for battery life, GNOME currently says I'll get around 8 hours of use with wireless, medium (but good) brightness and "blog" use. Charts indicate I'm at around 6 Watt. (Unless using some OpenGL screensaver, which seems to cost more than 1 Watt extra!)
So here's my current summary:
  • + well supported by Linux
  • + 2 GB of RAM
  • + battery life, low power consumption
  • + wireless much better than on my old laptop
  • + good display (gloss free, good brightness, 1024x600)
  • - the webcam is dead weight, it's completely useless (crappy quality)
  • - there is no UMTS, which many business people will complain about
  • - screen resolution could be higher; I really like high resolutions!
  • - Intel IGP can't do FullHD, but I have a FullHD external monitor
The one thing I really don't get about this laptop is why they added this ridiciulously bad webcam.
15.12.2010 22:34 — Categories: Deutsch Linux DebianPermaLink & Comments

Partial subversion mirror

Does anyone know how to setup a partial subversion mirror?

Essentially we have a source code tree, containing various subdirectories, including doc, test, src/tld/domain and src/experimentalcode/usernames.
We'd like to allow public access to the main source subtree, while not exposing the various user directories to the web server (the master subversion is separate anyway; since I want to use Trac I need a local SVN copy!)

I'm currently trying to setup "tailor" to do this, but it is not trivial: it seems easy at first to just ignore any change in a particular folder. But when you encounter "move" aka "rename" operations that rename a file from the non-exposed folder to the exposed folder, they will obviously fail on the "stripped" repository. So they need to be mapped to an "add" operation there!

Any hints? I might have it working using some hacks in tailor, but I'd like to know any simple solution, if there is any ...

2010-11-11 17:32 — Categories: English Linux CodingPermaLink & Comments

Gnome panel applet alignment

Dear Gnome people. Is there a reliable way to right-attach panel applets? May laptop screen and my external monitor have different resolutions, and I havn't found a reliable way (except making two panels) of getting some of my applets to stick to the right. I usually keep my launchers on the left, while vairous system status icons on the right part. But when switching to a higher resolution, at most one will move to the right end of the panel at the new resolition, while the others just stay in place (i.e. left-attached at a given pixel position).

There are so many smart layout managers, GTK pretty much always uses flexible layout managers, why is the Gnome panel relying pixel offsets?

It has been suggested to me a couple of times that I could achieve this via gconf. However, since the gconf changes are not reflected at runtime but frequently overwritten I did not get this to work reliably even just for two applets.

Thank you. If you have any comments, please email me via erich () debian org.

On a side note, this is also the first true post to my new blog. :-)

2010-10-22 15:27 — Categories: English Linux GnomePermaLink & Comments

Random background python script

I use the following python script to choose a random background on login:

#!/usr/bin/python
import os, os.path, random, gconf
startdir="PUT YOUR FOLDER HERE"
gkey="/desktop/gnome/background/picture_filename"

imgs=[]
for root, dirs, files in os.walk(startdir):
  for file in files:
    base, ext = os.path.splitext(file)
    if ext.lower() in [".jpg", ".png", ".svg"]:
      imgs.append(os.path.join(root, file))

img = random.choice(imgs)

gconf.client_get_default().set_string(gkey, img)

It's fairly simple, but shows the power of the python libraries. It "walks" the directory tree, collects all files of the given extensions, chooses one at random, then updates the gconf key for the Gnome background image.

P.S. Yes, I know a couple of ways to do that in a shell script, too. However, then one I used failed with whitespace in file names, so I decided to rewrite it in a much more sane language ... the random involved was also a hack.

2010-09-17 11:28 — Categories: English Linux GnomePermaLink & Comments

Beware of the "startpar" bug!

UPDATE: the bug is already fixed after a few hours, and only affected a minority of users (of a now deprecated, experimental option in the 'unstable' distribution, and only users that rebooted with the affected version).

The sysvinit version that hit unstable today has a grave bug if you have been running "startpar" or maybe "shell" style parallel booting. Read this bug report, if you have been using these (they were not enabled by default, so unless you've been giving parallel boot a try before, you should be ok.)

How to check if you are affected:

grep CONCURRENCY /etc/default/rcS

If this command says "startpar", then you ARE affected. If it says "shell" you MIGHT be affected. If you have not set CONCURRENCY or if it's "none" or "makefile", then you should be ok (according to the bug).

The workaround is as simple: just put either "none" or "makefile" in there, these are the only two values that are still distinct.

How to recover a broken system:

  1. Boot recovery mode aka "single-user". At some point you should be asked for the root password. Login.
  2. Run mount -o remount,rw / to enable write mode on your disk.
  3. $EDITOR /etc/default/rcS and change the value of "CUNCURRENCY"
  4. reboot

You should have a working system again.

I can only confirm that changing "startpar" to "none" helped me. I havn't tried "makefile" yet, and "none" seemed more likely to fix things.

2010-05-15 22:40 — Categories: English Linux DebianPermaLink & Comments

Removing modlogan

Unless someone drops in as new maintainer, I'll file for removal of ModLogAn from Debian soon.

The software has been abandoned upstream for, well, a couple of years. It still works okayish (just the patterns need refreshing), and in fact I'm still running it. But there is plenty of software to replace it, and it seems as if many people go the Google Analytics way today.

Please speak up quickly if you care about ModLogAn, otherwise it's gone from Debian soon.

2010-04-12 02:11 — Categories: English Linux DebianPermaLink & Comments

Sun Java - happy 9th birthday, user-affecting rendering bug.

It seems that Sun doesn't care much about getting bugs fixed in Java.

This bug for example causes rendering artifacts in Apache Batik, and is very visible with many SVG files. It causes circles to be rendered as approximated diamonds. It has been reported 9 years ago (the first time, there duplicates).

I understand that there are both more important bugs, and that one must avoid introducing new bugs when fixing bugs. But there should be little dependencies on a broken circle rendering routine, so please just fix this cosmetic bug, too. One of the reports is even staged "Fix understood" ...

A more important issue with Sun Java (known since 2005) is this bug, which effectively breaks Java IPv4 networking on Debian unstable now (which recently changed the IPv6-to-IPv4 fallback behaviour). So far, Sun has rated this as "request for enhancement". WTF?

Sure, you can work around the bug easily - change /etc/sysctl.d/bindv6only.conf to use the value of 0 instead to re-enable IPv4 fallback - but after all, IPv4 networking is pretty much an essential Java feature.

2010-01-22 18:00 — Categories: English LinuxPermaLink & Comments

Enigma in Debian

Enigma

is a great game, with a unique mixture of puzzles with mouse skills and action. If you know the discontinued game Oxyd originally on the Atari ST in the 90s (also on Amiga and one version on DOS), then you know the principle of Enigma. Except that it has tons of more levels and is Open Source.

Some weeks ago, I uploaded a 1.10 pre-release (approximately milestone 5) to Debian experimental. This is the soon-to-be-released new version, using a new level file format (with a much extended API to make level development even easier, ~50% less code per level now), new levels (of course), updated graphics (including support for new graphics modes), ...

Unstable still contains version 1.01; the reason is simple that I knew there would be another 1.01 maintainance release coming. However I believe it doesn't offer much against the current unstable version; it largely marks an upstream release containing patches already in the Debian package (since communication with upstream is really good).

So I have now two choices: refreshing the Debian unstable package to the "probably last" 1.01 release upstream, or going straight for the 1.10 milestones to give enigma some extra testing.

2009-12-28 16:54 — Categories: English Linux DebianPermaLink & Comments

Media Players

Somehow, I'm still lacking the optimal media player application. Many popular ones are totally overloaded (e.g. amarok). Others like totem seems to be just a minimalistic frontend for a particular backend.

My current choice:

  • Single-shot playback: to view a random song or video I usually open them with Totem (the GNOME default) and that works okay
  • Library: I use MPD as player because it just seems to be rock stable. As UI I currently use Sonata, but I don't use it for much more than choosing a song from the currentl playlist.
  • Editing: ExFalso seems to have the best ID3v4 support, in particular it also allows multiple genre fields. (Note that Vorbis even suggests you should use multiple artist fields instead of the common "Arist A & Artist B" way of filling the fields)

However, there is one thing I'm really not satisfied with: when putting together a CD compilation for friends (say, as Christmas present), they are quite useless. A key issue here is the total playlist length. Guess what, I want to make sure it fits on a single CD. So I really need to know the total playlist length. Why do so many media players (e.g. totem, alsa-player-gtk, xfmedia4, vlc, mplayer, ...) not show you the total playlist length? They did read all the files to get artist and title. Many even have the individual song lengths, just not the total sum.

In the past I've been using old XMMS1 to check for the total length, or a CD burning application like K3B by repeatedly importing my current folder.

Right now, I'm using Quod Libet (since I like the tag-editing component exfalso a lot) to arrange the playlist. It also gives me the total length, albeit I belive I've had incorrect song lengths in it before (broken VBR files?), and it's not perfect, too: being database-driven it has really long startup times for occasional users (because of updating the database) and is much more heavyweight. I also believe I've lost some playlists because I had moved my files around once ... so I'm a bit sceptical.

Anyway, there are still hundreds of media players I havn't looked at. Don't bother me to send me an email about one I havn't mentioned!

But if you are developing a media player, please consider the use case of putting together a music CD for your friends. In particular, for users that do not use your player all day.

2009-12-25 15:59 — Categories: English LinuxPermaLink & Comments

Making pyroman IPv6 capable

I'd like to make pyroman IPv6 capable. That is actually the one big thing before calling it a version "1.0".

I must admit that I havn't been very active on Pyroman (or Debian in general) the last years. This goes even so far as that "pyroman" was considered "abandoned" by Fedora or so. It is not; I use it on all my servers. It's still in use at the network I developed it for (after all there is not that much benefit for a workstation setup, where a 10 line iptables script will do the job just perfectly.).

Anyway, I'd like to get IPv6 support into pyroman, but there is one big issue here: I don't have any machine using IPv6, so I havn't used ip6tables myself yet, so I don't know about all the magic involved ...

So if you use IPv6, it would be very cool if someone would jump in to get full IPv6 support into pyroman. Madduck had already done some preliminary stuff, but I didn't get around to have a look at the integration or completeness yet.

The '--no-act' and '--print' modes of pyroman should even allow development without any IPv6 support or root permissions in the system.

Other things remaining on my pyroman wishlist:

  • Fully automatic iptables firewall visualization
  • Keeping traffic counters over firewall reloads
  • Configuration UI
  • A fancy 'arsonist' icon and a web page design

2009-12-06 19:38 — Categories: English LinuxPermaLink & Comments

Lost an ext3 filesystem

These days, something happened to one of my external USB drives that I so far only knew from ReiserFS (which I since called ReisswolFS, German word play on "shredder" ...). But, it's not ext3 which I blame.

Short story what happened:

  • Resumed the system from 'suspend'.
  • I copied some files onto the first file system.
  • I copied the same files to a second external disk (dual backup...)
  • I copied some files from the first disk, which caused an access-beyond-end-of-disk, mounting the filesystem read only
  • Unmounted the filesystem, started e2fsck
  • Started copying the files from the secondary filesystem
  • Got the same error on the second disk.
  • Cancelled e2fsck doing more damage to the first disk.
  • Shutdown and reboot
  • Memcheck, three iterations. Nothing.
  • Checked second disk, no errors in filesystem (!), copied the files I had issues accessing just fine.
  • Filesystem on disk #1 seriously trashed.
  • Had ext2fsck try to recover filesystem on disk #1
  • Pretty much all data on disk #1 is now in lost+found, it seems as if all major folders were corrupted. Lots of corrupted file entries (character devices with random permissions and numbers) there, too.

What I will do now:

  • Reformat disk #1, and restore it from the other backup (Extra backup for teh win! I also have a 3rd copy of about 2 months ago off-site)

As you can see, something was wrong with the system, not with the file system.

I have a strong suspect to have caused this. In case you wondered why I included "resumed from suspend" above: I've been having system stability issues with resume ever since upgrading to the Intel driver 2.9.0 and KMS (Debian unstable+testing) with kernels up to 2.6.31. In about 1 out of 5 resumes, I get a Xorg or system lockup after anything from 1 to 60 minutes. Sometimes I also experience video corruption after a few minutes, trashing some terminal emulation until the next redraw. Just before writing this email I had a typical lockup: when scrolling the terminal emulator. This has been a typical trigger for lockups. On contrast I havn't seen any such crashes (or screen corruption) on a fresh boot.

Freedesktop bug reporting the same issue closed as "not our bug, blame it on the kernel".

Note that 2.6.32 release candidate Changelog contain many changes for the intel DRI kernel driver. So the bug might already be fixed in the RC kernels.

Same report in Kernel Bugzilla is still 'NEW' though.

Related bug report in Debian, blaming it on KMS.

[Update: I've disabled KMS and upgraded to 2.6.32-rc8 and not had such a crash since. But I can't pinpoint it to one or the other yet.]

[Update: just tried another external harddisk ...

[305032.148616] EXT3-fs: mounted filesystem with ordered data mode.
[305066.061708] usb 1-8.3.3: reset high speed USB device using ehci_hcd and address 27
[305081.132471] usb 1-8.3.3: device descriptor read/64, error -110
...
[305147.468857] sd 4:0:0:0: Device offlined - not ready after error recovery
[305147.468880] sd 4:0:0:0: [sdb] Unhandled error code
[305147.468886] sd 4:0:0:0: [sdb] Result: hostbyte=DID_ABORT driverbyte=DRIVER_OK
...
[305147.473500] WARNING: at /build/buildd-linux-2.6_2.6.32~rc8-1~experimental.1-i386-g1b8iG/linux-2.6-2.6.32~rc8/debian/build/source_i386_none/fs/buffer.c:1159 mark_buffer_dirty+0x20/0x7a()

It seems as if the USB disk stack still doesn't really survive suspends? Let me try on a fresh boot later on.

2009-11-25 22:39 — Categories: English LinuxPermaLink & Comments

Google Summer of Code 2009

Just a short reminder that the application phase for the Google Summer of Code 2009 is running.

GSoC 2009 logo

So far, we have quite few applications. Deadline is April 3rd, 19:00 UTC. Usually applications arrive rather late, but still I have the impression that we have much less than the previous years. But less copy & paste, too.

If you are interested in doing a GSoC project at Debian:

  • Check the Debian Wiki which has all kind of relevant information.
  • Talk to Debian people
  • Make sure it's related to Debian (and not just "runs on Linux")
  • Talk to Debian people
  • Make sure your application shows your genuine interest and has some original ideas, copy & paste will not be sufficient
  • Talk to Debian people

I hope to see more applications - and good luck that we get enough slots for all of you!

P.S. as far as I can tell, current Debian Developers can be eligible as well, although it has also always been a goal of the project to get new contributors involved.

2009-03-30 14:43 — Categories: English Linux DebianPermaLink & Comments

Congratulations, Debian

Debian Lenny Banner

Congratulations to all developers (DDs or not, we have sponsored uploads, Debian contributors and such, too!) who contributed to the release of Debian GNU/Linux "lenny" 5.0. I must admit that I've been largely inactive recently, I just managed to keep the bugs on my remaining packages low. Funnily, just the day lenny was released I learned about a bug in Enigma on AMD64 that is probably worth fixing through proposed updates ...

2009-02-16 18:33 — Categories: English Linux DebianPermaLink & Comments

Flash on Linux

... is almost as bad as ever before.

On my Core 1 Duo system (32 bit), official Adobe Flash crashes my browser when I close a tab which had a Flash plugin running. Going to a blank page then closing the tab usually helps, but it seems that sometimes Flash continues to run in the background (sound doesn't stop either) and then will still crash.

On my AMD64 system, the official Adobe plugin crashes my browser. There are reports at Adobe that link it to Gmail. So here, the Adobe flash is unusable. The 32 bit version via nspluginwrapper did not have sound for me, probably some issue with Pulseaudio.

So I'm now trying out Gnash. First thing I noticed: it has FlashBlock built in, all those stupid Flash things won't auto-run but I'll always have the nice play button to enable them when I want them to run. And while Gnash is working pretty well on most sites, every now and then something just does not work. Like some YouTube movies not playing (usually very short ones - maybe it will only start playing a video when the buffer was completely filled, and a video which is smaller than the buffer will thus not play?) etc.

Some wishlist items:

  • Add a 'auto run whitelist' to Gnash, when I go to YouTube I usually want to actually run the video.
  • Provide some 'fall through' option, so if the Flash doesn't work right in Gnash I can pass it on to the Adobe plugin if I really need to.

I know that the latter won't be easy, but isn't nspluginwrapper doing something like that?

2009-01-30 13:12 — Categories: English LinuxPermaLink & Comments

Enumerating audio devices in GStreamer

Since it took me more than one hour to figure out (and the documentation wasn't too helpful), here's how to enumerate audio devices in GStreamer:

import gst
sink=gst.element_factory_make("pulsesink","mysink")

sink.probe_property_name("device")
devs = sink.probe_get_values_name("device")

Note that for some drivers (such as pulse) you explicitely need to call probe first, before you can get values. Also note that the ALSA module apparently only enumerates hardware devices, which probably is a bug in the module (according to Lennart's blog, you should use snd_device_name_hint which seems to be the only function to get all the ALSA devices, including software devices such as dmix or the pulse linking module).

2008-12-28 11:37 — Categories: English LinuxPermaLink & Comments

PyGTK on OS X?

Can anybody point me to a beginners tutorial for running PyGTK on OS X?

I've written this little BPM tap program in PyGTK, that gives you a speed plot and confidence interval, works well for me.

A friend of mine would like to use it, but is running OS X, and doesn't know much about computers. I know next to nothing about OS X. I know it already has Python2.5 installed, and that's about it.

So anyone got a tutorial that doesn't require previous knowlege about using fink, ports or whatever? Something that I can point a real novice user to?

Via email please, my blog intentionally doesn't have comments. Erich AT Debian DOT org.

[Update: so far, I've only had requests about my bpm toy and about the same kind of instructions, but no links to refer people to...]

2008-12-26 14:16 — Categories: English LinuxPermaLink & Comments

On Java Generics and subclassing

Due to their implementation by erasure, they face certain limitations.

For example, the following constructor for a class with both compile time and runtime type checking:

class BagOf<T> {
  BagOf(Class<T> restrictionClass);
}

is not satisfiable when T is a generic class itself (since there is no ArraySet<Double>.class syntax, for example). The best work-around I know is to drop the T subclassing restriction for restrictionClass:

class BagOf<T> {
  BagOf(Class<?> restrictionClass);
}

The cost is low (obviously no difference at runtime) - you just don't assert that the developer using your class specifies a restriction class derived from the class T used in the generics. That won't prevent certain programming errors such as this anymore

BagOf<Integer> bar = BagOf<Integer>(Double.class)

but these shouldn't be too hard to find/fix anyway.

Before submitting too clever suggestions, please make sure you've tested them. For example "if (obj instanceof T)" is not valid java code: since generics are implemented by erasure, T cannot be referenced in runtime statements.

P.S. It would obviously be nice if the Java syntax would allow Foo<Bar>.class (which at runtime would be the same as Foo.class, and at complie time would have the result type Class<Foo<Bar>>), but currently it does not for all I know.

P.P.S. I'm not looking for "Class<? extends T>", that is a different situation. The difficult case is when T is a Generic itself, not a subclass.

Update: JM Ibanez pointed me to Neal Gafter's Super Type Tokens, which apparently are the same as TypeLiteral in Google Guice. Thanks!

2008-09-15 14:07 — Categories: English LinuxPermaLink & Comments