One of the Arch Linux systems I maintain is still running KDE 3 from the KDEmod repositories. We're talking about KDE 3.5.10 here. Unfortunately, there's a bug in the audio CD ripping process. When you drag a (virtual) MP3 file/folder from the audiocd:// KIO-slave, it produces only MP3 files with white noise. Unless your audio CD contains white noise only, there's no problem of course, in other cases you might like to fix this.
Okular, het KDE-programma om PDF-bestanden mee te bekijken, slaat metadata op over documenten die ermee zijn geopend. Het slaat bijvoorbeeld de positie op van wanneer je een document hebt gesloten, of de aantekeningen die je gemaakt hebt bij het doornemen van een document.
Helaas wordt deze metadata niet automatisch opgeruimd, wat tot het gevolg heeft dat er veel gegevens rond blijven slingeren over bestanden die je al een hele tijd geleden hebt verwijderd. Het onderstaande scriptje schoont alle metadata op van bestanden die niet meer bestaan. Het is aan te bevelen dat je het in een wekelijkse cron-job plaatst zodat je er verder nooit meer over hoeft na te denken.
# (C) 2009 Bram Schoenmakers <bramschoenmakers@kde.nl>
cd "$(kde4-config --localprefix)/share/apps/okular/docdata"
for A in *.xml; do
B=`sed -ne 's/^<documentInfo .*url="\(.\+\)".*>$/\1/p' "$A"`
[ -f "$B" ] || rm -f "$A"
done
Okular, the PDF viewer for KDE, stores some metadata for the documents you have opened in the past. For example, it stores the position within the document whenever you close it, or the annotations you've made while auditing a document.
However, this metadata is not cleaned up automatically. This results in many files in the Okular data folder about files you have removed a long time ago. The following little script cleans all metadata of non-existent files for you. It is recommended to put this in a weekly cron job, so you never have to think of it again.
Een poosje geleden is er een nieuwe Arch Linux live-CD beschikbaar, onder de nogal spiritueel getinte naam Chakra. Dit project is opgezet door de mensen achter KDEmod, de alternatieve KDE-repository voor Arch Linux. Even een grote dikke waarschuwing vooraf: het project bevindt zich nog in alpha-fase.
By default, KDE comes with a number of programs which may come in handy from time to time in the shell. It is possible to embed some KDE technology inside a script. This articles shows 5 commands which you will not encounter in your application menu: kdialog, kioclient, ktrash, kquitapp and kdebugdialog.
This is more or less a follow-up on my previous article, but this time we focus on how to communicate with KDE applications from the commandline. This is done with D-Bus and for that we'll use the qdbus command. For example, it's possible to request the current track information in Amraok, or you could set your Kopete status on Away.
Een beetje als vervolg op m'n vorige artikel wordt in dit artikel uitgelegd hoe je met KDE-programma's kan interacteren vanaf de commandoprompt. Dit gaat met behulp van D-Bus en we gebruiken hiervoor het commando qdbus. Hiermee kan je bijvoorbeeld de titel van het huidige nummer in Amarok opvragen, of kan je jezelf op afwezig zetten in Kopete.
Bij een standaard installatie van KDE wordt een aantal programma's meegeleverd die zo nu en dan van pas kunnen komen vanaf de shell. Het is daardoor mogelijk om bepaalde KDE-technologieën vanuit een shell-script te kunnen gebruiken. In dit artikel laat ik een vijftal programma's zien die je niet in het programmamenu zult aantreffen: kdialog, kioclient, ktrash, kquitapp en kdebugdialog.