28/02/2009

Spring cleaning: Find big directories

Update 2023: ncdu is a text-based disk usage analyser that does all the below and more.
KDirStat hasn't been maintained for ages: baobab (Gnome) and filelight (KDE) are the current fancy GUIs, but they failed to map my NTFS data partition for some reason.

du is a tool listing directory tree sizes. Simple du produces tons of console output, so we reduce the search depth (anything below is summed up anyway), run it through grep to exclude small dirs and pipe it to a file.

du -h --max-depth=2 | grep '^[5-9][0-9]\{2\}M\|[0-9]G' > listfile.txt
  • -h for human: lists sizes in G, M, and K. Important for grep search. Change the max. search depth to your liking.
  • Grep string: searches for 500-999M at the beginning of the line or anything containing a number and 'G', thus anything over 500MB. See this link for grep reg. expressions. "\|" is the grep "or" operator, btw.
  • If you want a graphical tool, try KDirStat (it's also in the openSuSE main repo). It's a bit old, but works well on KDE 3 and 4.

No microphone recording with Skype (and elsewhere)

I had made several not very earnest attempts to place Skype calls from openSuSE, which failed on three different machines (a Samsung R55, an ASRock and an Asus board) as the microphone was not recording anything. Sound output worked. Three things to check:

24/02/2009

Even Macbooks do crash


A friend of mine brought her 2-year-old Macbook with the hard disk in a sorry state and asked us to salvage some files she hadn't backed up yet.
Lots of things to learn:

13/02/2009

KDE surprises

On my desktop I keep a slightly experimental system (no SuSE 11.1 though, due to Compiz issues), including KDE Factory. Last night Xanthippe greeted me with a noticeable KDE makeover - hiding icons in the system tray, button grouping in the task bar and a pretty transparent copying progress dialog. At that point I grew suspicious and checked my KDE version, which was in fact KDE 4.2.0, which has been released on Jan 27. Lots of features I am itching to try out: integrated power management, more and improved desktop effects, a configuration makeover, revamped Dolphin and file dialogs, a new krunner… check out the visual guide.

We seem to have a case of the old KDE4/openSuSE dilemma (compare the 4.0 to 4.1 switch): Major new KDE versions are shipped with new OS releases and are kept in Factory (unsupported) more or less up to the release date. While this is very reasonable from a developer's point of view, it's a bit hard on the user: at the moment, every KDE release is significantly more stable and complete than its predecessor, while the KDE and openSuSE release cycles are shifted by half a year. At the moment, KDE4:Factory provides a nice and apparently stable KDE 4.2 at the price of a few resolvable package conflicts, but you have to keep in mind that it's still a development snapshot and might land you with 4.1.3 beta at some point in the future.
Understandably, the developers wouldn't want to move the whole community to an unsupported KDE 4.2 right now, but couldn't they copy the KDE 4.2 stable release from the Factory repo to a separate branch at this point?

12/02/2009

Catalyst 9.1 (fglrx 8.573) - I believe in miracles…

…and fairies…the Easter Bunny…Santa Claus…whatever. ATI has finally managed to release a graphics driver capable of running compiz and flicker-free video at the same time, well… most of the time. Same procedure as always (see this post), tested with openSuSE 11.0_x64, compiz 0.78, AIGLX and a Radeon X1300 card.
Kaffeine and the mplayerplug-in still have displaying troubles sometimes (video shifted, distorted, interspersed with GUI elements), but given a large choice of media players one usually finds one that works - and I haven't seen a system freeze yet.
ATI is teaching real Epicurean values here: keep your standards low, and you might get lots of pleasant surprises.

18/01/2009

Mplayerplug-in and Quicktime cause Firefox to segfault

I can't remember quite when the mplayerplug-in started to kill firefox when playing Quicktime movies (doesn't affect WMV, by the way). They haven't updated the plugin for ages, so I suspect either a firefox update, new Quicktime codecs or some general SuSE 11.1-ness. Setting full debug in /etc/mplayerplug-in.conf didn't help, as it crashed before generating a single line of debugging output.
Quick fix: switched to gecko-mediaplayer, which is also a mplayer front end, according to its YaST description still under heavy development, but seems to run stable enough for now.

It had to be just the right kind of Java…

More fun with JabRef and the AWT toolkit. Starting JabRef by java -jar JabRef-2.4.2.jar got me a string of errors and no GUI:
ERROR while starting or running JabRef:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit
The reason for this appears to be that openSuSE uses the non-proprietary OpenJDK Java runtime by default, while you need Sun's JRE for JabRef to work (available in the non-oss repo).
Check with java -version - if it says "OpenJDK" instead of "Java(TM)", you need to switch the packages in YaST or zypper.

17/01/2009

Insufficient CD/DVD drive permissions on openSuSE 11.1

One of those "I should have known..." posts. I just could not get my flu-addled brain to google the problem and, I am ashamed to confess, watched DVDs on Vista instead.
  • Audio CDs and video DVDs were displayed in Konqueror, but not played (and yes, I had all the codecs).
  • K3b warned me about not having a burner.
  • wodim --devices found nothing.
This has made the most-annoying-bug list on opensuse.org, and the developers keep bickering in the bugzilla comments. The most popular workaround seems to be to add your user to the disk group, which works, but poses an ugly security risk: disk members have raw access to all hard drives.
Pawel Stolowski on the bugzilla thread suggests changing the group ownership to cdrom for all optical drives in the udev rules:
  • add your user to the cdrom group in YaST->Users and Groups.
  • create (sudo) a file 99-my.rules in /etc/udev/rules.d/ containing this line:
    KERNEL=="sr*[0-9]", GROUP="cdrom", MODE="0660"
  • reboot
Worked for me. There seems to be an upcoming hal etc. patch by Danny Kukawa, which ought to sort out the problem. Oh, and other cynical bastards like me out there might derive some guilty amusement from the troll wars in the bug thread.