Blogs

Bluetooth connection problems in linux with Sennheiser MM400

If you experience sudden disconnections immediately after connections with your Sennheiser MM400 headset in Linux, check out this entry within the Archlinux Wiki.

Gnome desktop interfering with KDE's desktop

Recently I ran into the problem that after resuming from standby and changing my display configuration my desktop seemed to be no longer displayed.

After a bit of searching, I found out that the KDE desktop was still running but my Gnome desktop installed in parallel was started and was covering it. For this reason, I saw an empty desktop. The problem is that somehow nautilus is started when using a KDE session. Nautilus is not only a file manager but also starts the desktop component which then can interfere with KDE's desktop.

In order to prevent nautilus from starting the desktop component, you can use gconf-editor to reconfigure nautilus. Start gconf-editor and navigate to apps/nautilus/preferences in its folder structure and uncheck "show desktop". After that the desktop will not be automatically started when nautilus is started.

As I am only using nautilus within KDE and not Gnome as a window manager this is of no problem for me. If you also use Gnome in a session you probably have to check if your Gnome session still behaves correctly with the same user.

KMail/Kontact 4.4 very slow after startup in Gentoo

I have got plenty to do at the moment. So please excuse the lack of updates. The pipeline is quite full though ;-).

So, just one short thing I found out: If you experience a strange slow down of KMail/Kontact 4.4.10 after a KDE upgrade in gentoo, reemerge kdepim related packages.

If you use eix you can easily find these packages by typing eix -I kdepim . I do not know if all packages are related but it does not hurt to rebuild them all after a kde update.

You can do this with one command like this:
emerge -1va `eix kdepim -I --only-names`

After that KMail/kontact worked again as expected.

Regards,
Phillip

Creating a DOS boot CD with custom data for BIOS updates with the help of K3B in Linux

A few months ago, I came across the problem of creating a DOS-based bootable CD-ROM with custom data on it. I needed the image to upgrade an old mainboard BIOS. Sadly the manufacturer did not provide a bootable CD by himself. It took me quite a long time to get the image working. Either the image would not boot or my custom data was not available. If you ever find yourself in the same situation and you are using a Desktop Linux for creating the images, I might have a nice solution for you.

In the following, I will describe how to create a bootable DOS based ISO with custom data on it with Linux command line tools and K3B. But first things first.

I will use the following programs/configurations in this post.

Prerequisites

  • Burning tool K3B - http://www.k3b.org/
  • Loop device mounting in kernel:
    -> Device Drivers 
        -> Block devices (BLK_DEV [=y])
            -> Loopback device Support (CONFIG_BLK_DEV_LOOP)
  • DOS Boot image drdos.img (drdosmin.zip from http://www.biosflash.com/e/bios-boot-cd.htm)
  • Prepared K3B project file - http://www.phillme.de/dl/burn-dos-iso.k3b
  • File structure: The K3B file provided assumes the following file structure:

    tmp
    ├── img/
    │   └── drdos.img # original/ extendable dos disk image
    ├── loop/             # mount point for extendable dos image
    └── dosimg.iso # created iso image with K3B

 

Preparing the disk image

  1. Download DOS boot image drdosmin.zip (see above) and extract drdos.img to folder /tmp/dos-iso/img
  2. Prepare the DOS files you want to access out of the running dos
  3. #mount DOS image with loop interface
    mount -o loop /tmp/dos-iso/img/drdos.img /tmp/dos-iso/loop/
  4. copy your DOS files to the mounted loop/ folder from the last step
  5. #unmount loop file
    umount /tmp/dos-iso/loop/ 

 

Writing the extended ISO Image

  1. Start K3B
  2. Open prepared K3B project from http://www.phillme.de/dl/burn-dos-iso.k3b
  3. Check if correct boot image was selected (default from K3B project "/tmp/dos-iso/img/drdos.img"), otherwise
    1. Click paper with pencil icon
    2. Click "new..."
    3. Select extended drdos.img with files
    4. Leave other options untouched
  4. "Burn" iso image to a file for testing it before burning. Default location with K3B file should be "/tmp/dos-iso/dosimg.iso"

 

Testing the created boot image

  1. Install kvm or other virtualisation software
  2. Start iso from commandline kvm -cdrom /tmp/dos-iso/dosimg.iso
  3. In the kvm window you should see something like "Starting Caldera DR-DOS..."
  4. Then you should get a commandline asking for the date (just hit enter)
  5. After that you should get a line looking like "A:\>_"
  6. Type in "dir" hit enter and check if you see all files from the drdos.img prepared before

If everything works... Congratulations! You can now burn the CD from the ISO image, start your computer with it and access your copied files out of a running DOS.

If it does not work for you or if you have any other suggestions, drop me a comment on this post.

Best Regards,
Phillip

 

TortoiseSVN 1.6.11 and "SSL handshake failed" issues

Hello folks,
I have discovered the issue with TortoiseSVN and a failing SSL handshake. After fiddling around for quite a long time, I found out, that the issue with the SSL handshake is not related to the SVN server but to the TortoiseSVN client version or in particular its linkage against different versions of Neon.

TortoiseSVN 1.6.11 links against Neon 0.29.4 whereas the working TortoiseSVN 1.6.10 links against Neon 0.29.3. The current development version of the 1.6. branch of TortoiseSVN also links against Neon 0.29.3 and works, too. Together with the fact that Neon announces "Fix GnuTLS handshakes failures with 'TLS warning alert' (Bryan Cain)" as a release note for Neon 0.29.5, I strongly suspect the linkage against the 0.29.4 version of Neon as the culprit for all the errors.

For all people using TortoiseSVN and experiencing these errors this means either to downgrade to TortoiseSVN 1.6.10 or to use the latest development version of the 1.6 branch until the issue is resolved.

Update: Bug is taken care of. See http://svn.haxx.se/tsvnusers/archive-2010-10/0340.shtml .

Best Regards,

Phillip


Additional Information

Problems with a stalling wicd 1.7.0 when scripts are set for a connection

Yesterday I updated to wicd -1.7.0 and experienced issues when connecting to my local wired network. I found out that the issue only comes up when using wicd-gtk. Wicd-curses manages to get a connection.

So I searched the web and found out that this problem only occurs when having (dis)connection scripts set. The issue is already filed at wicd's launchpad upstream with a working patch by Jonathan (Comment #17). As I use wicd every day, the fix for this issue is quite important to me.
Gentoo currently only has the 1.7.0 (1.6.2 worked flawlessly) version in its tree and so I made an ebuild which includes Jonathan's patch, fixes the issue and can be found in gentoo's bugzilla.

If you are experiencing the same issues in gentoo, check out the new ebuild and the patch.

Happy emerging
Regards,
Phillip

Automatische Vertragsverlängerung bei O2 und kostenlose Zusatzoptionen wie z.B. Frei-SMS

Heute kam meine neue Handyrechnung. Merkwürdigerweise war diese fast doppelt so hoch wie sonst. Da ich meine Telefonminuten und SMS über eine Monitoringanwendung konstant überwache und so Inklusive-SMS und Inklusiveminuten eigentlich nicht überschreiten kann, war ich doch verdutzt bis schockiert.

Ein Blick auf den Einzelverbindungsnachweis offenbarte mir dann, dass alle SMS kostenpflichtig abgerechnet worden waren.
Dazu muss gesagt werden, dass mein Vertrag einen Monat vorher ausgelaufen war und ich ihn nicht manuell verlängert hatte, da ich mit den Konditionen so zufrieden bin. Ich ging natürlich davon aus, dass alle meine Vertragsoptionen verlängert werden, wenn ich nicht explizit etwas anderes vereinbare. Etwas Abweichendes hatte mir die Frau bei der Vertragsverlängerungs (VVL)-Hotline bei meiner Verlängerung vor 2 Jahren auch nicht mitgeteilt.

Also Anruf bei O2. Dort teilt man mir mit, dass kostenlose Zusatzoptionen eben nicht mit verlängert werden und erzählt mir, dass das bei Abschluss ja auch immer gesagt wird. Nein! Bei mir wurde das am Telefon bei der VVL damals eben nicht mitgeteilt. Dessen bin ich mir hundertprozentig sicher, eben weil es damals eine ziemliche Anstrengung war und ich mich so noch an viele Details der zahlreichen Gespräche erinnern kann.
Der Mann bei O2 sagt mir nach Rücksprache mit seinem Chef dann, dass sie mir einen Anteil der Kosten als Gutschrift erlassen können und dass mehr als dieser Anteil nicht drin sei. Also keine komplette Erstattung. Wenn ich den Vertrag verlängere (24 Monate), was ich auch gleich tue, kann ich natürlich die Frei-SMS wieder haben.

Damit gebe ich mich erst mal zufrieden und recherchiere noch eine Weile im Internet und erinnere mich zurück an die VVL damals, um einen Fehler meinerseits auszuschließen. Ich finde mehrere Threads in diversen Foren, die sich mit dem Thema beschäftigen. Offensichtlich sind hier mehrere Leute etwas verunsichert. In den Threads in den Foren kann ich nur leider keine eindeutige Linie feststellen und die Tatsache, dass meine Vertragsinformationen im O2 Kundenportal nur sagen, dass ich einen O2-Tarif mit 100 Inklusivminuten habe und mich für alle Details an die VVL-Hotline verweisen, hilft mir dabei auch nicht weiter.
Zusammen mit der Gegebenheit, dass ich am Telefon bei der VVL damals definitiv nicht auf ein Auslaufen der Frei-SMS hingewiesen worden bin, frage ich mich langsam, wie ich denn hätte wissen sollen, dass die Frei-SMS auslaufen. Ich frage mich - inzwischen etwas gereizter - auch, warum ich für die mangelnde Informationspolitik von O2 Geld bezahlen soll.

Also rufe ich O2 erneut an, wo ich im Kundencenter zufälligerweise auf den gleichen verständnisvollen Mitarbeiter wie beim Vorgespräch treffe. Nach dem nun deutlich energischeren Darlegen der Argumente meinerseits, versichert mir dieser, sich erneut beim Chef für mich stark zu machen. Und siehe da! Nach kurzer Zeit in der Warteschleife werden alle meine Kosten übernommen. Zusammen mit diesem Blogpost hat mich das dann auch nur ca. 2,5h gekostet. Ist ja ein Klacks ;-).

Was hat mich das gelehrt, bzw. worauf ist bei kostenlosen Zusatzoptionen bei O2 zu achten?

  • kostenlose Zusatzoptionen wie Frei-SMS verlängern sich nicht bei einer automatischen VVL, nur gebuchte kostenpflichtige Optionen wie z.B. Internet-Packs werden dabei automatisch verlängert
  • Eine automatische VVL verlängert den Vertrag gewöhnlich um 12 Monate eine eigene Verlängerung für gewöhnlich um 24 Monate
  • VVL sind in einem Zeitraum von 5 Monaten bis kurz vor dem Ablauf (prinzipiell ein Tag vorher, besser 3 Tage) des alten Vertrages möglich. Kostenlose Zusatzoptionen müssen dabei durch den Kunden neuverhandelt werden.
  • Verträge müssen bis spätestens 3 Monate vor Ablauf des alten Vertrages gekündigt werden

Meiner Ansicht nach ist die Informationspolitik bei Vertragsverlängerungen bezüglich dieser Attribute bei O2 mangelhaft:

  • Im Kundencenter von O2 können kostenlose Zusatzoptionen (zumindest VVL ohne Handy) des aktuellen Vertrages nicht eingesehen werden.
  • Die Tatsache, dass kostenlose Zusatzoptionen sich nicht verlängern, kann nur in den aktuellen Tarifen bei O2 eingesehen werden. Ist ein über mehrere Jahre verlängerter Vertrag dort nicht mehr zu finden, schaut der Kunde in die Röhre und muss sich auf die Aussagen und Aufklärungen am Telefon verlassen.

Deswegen also immer manuell und persönlich den Vertrag in einem Zeitraum von fünf Monaten vor bis zum Vertragsende verlängern lassen, egal ob man mit den Konditionen zufrieden ist, oder nicht. Die automatische Verlängerung birgt leider zu viele Risiken.

Also schön die Call Center nerven
Grüße
Phillip

PS Die Angaben von Kündigungs- und Verlängerungsfristen sind nicht allgemein gültig, aber bei O2 normalerweise so üblich. Zur Sicherheit lieber nochmal nachfragen.

 

 

Dual head presentation of pdfs created with latex beamer class

I am using Latex for assignments, papers and presentations quite a long time. However, until recently, I did not know a solution for dual head presentation of pdfs created with the latex beamer class.
This changed with the finding of Impressive. So if you want to create a pdf with notes on the second screen you first have to set up your beamer class like this:

\documentclass{beamer}
 
\usepackage[utf8x]{inputenc}
\usepackage{default}
\usepackage{pgfpages} %This is needed for notes presentation!
\setbeameroption{show notes on second screen}
 
\begin{document}
 \begin{frame}
 \frametitle{Note Test}
   This is the frame text
  \note[item]{Note for a itemized note list}
  \note{Note for a continuous note text}
 \end{frame}
\end{document}

 

After that install impressives requirements and impressive itself. Then the following command will start the presentation on a beamer and notebook both with a 1024x768 resolution:

 ./impressive.py -g 2048x768 "pdfname.pdf"

Normally notes will be rendered on the right screen. So you have to set up the beamer as "left of" your notebook. With xrandr this can be accomplished like this or similar depending on your available outputs:

 xrandr --output VGA1 --left-of LVDS1 --output LVDS1 --mode 1024x768

Be sure to use the same aspect ratio and resolution on notebook and beamer. Otherwise you will get cropped slides and/or black borders.

Update: Someone pointed me to this useful article which achieved similar results by only using XrandR's scaling and positioning parameters.

Happy presenting!
Phillip

Gentoo major version KDE upgrade HOWTO

This HOWTO will show you how to upgrade from kde 4.3 to kde 4.4 (and possibly others) with as few problems as possible (It went through without errors for me). The whole process including merging will take 4 to 10 hours depending on your PC. Plan accordingly.

Before upgrading check if you use the latest packages. Additionally I will assume you have autounmask, eix and gentoolkit installed. Portage 2.2 might also come in handy because it can automatically resume builds of many packages (--keep-going) when only few of them fail.

emerge --sync
emerge -nva gentoolkit autounmask eix
eix-update

If you want to use your computer while updating KDE it is pretty neat to have an alternative login and windowmanager installed. I prefer gdm and enlightenment.

 emerge -nva eix gdm enlightenment

 

Preparing the upgrade

#create a working directory
mkdir /root/kde-upgrade
 
#save the list of your kde 4.3 packages
eix -I --slot 4.3 -C kde-base --only-names > /root/kde-upgrade/kde-old
#save the list of packages installed by which are also avalaible for kde 4.4
eix -I --slot 4.4 -C kde-base --only-names > /root/kde-upgrade/kde-new
#save the list of installed qt-packages
eix --slot 4 -C x11-libs --only-names -I qt > /root/kde-upgrade/qt-packages
#KDE 4.4 needs QT-4.6 that is why we create a list of all qt-packages and keyword them for later use. Be sure to change ~amd64 to your architecture
eix --slot 4 -C x11-libs --only-names -I qt | while read line; do echo "$line ~amd64" >> /root/kde-upgrade/qt-keywords; done

Copy the qt-keywords to your package.keywords directory

cp /root/kde-upgrade/qt-keywords /etc/portage/package.keywords/

Download and install kde-4.4 keywords

cd /root/kde-upgrade
wget -O kde-4.4-keywords "http://git.overlays.gentoo.org/gitweb/?p=proj/kde.git;a=blob_plain;f=Documentation/package.keywords/kde-4.4.keywords;hb=HEAD"
cp -p /root/kde-upgrade/kde-4.4-keywords /etc/portage/package.keywords/

 

Prepare your alternative Desktop environment

Now we are starting with the essential stuff. Log out from kde and shutdown kdm from one the Ctrl-ALT-Fx-Terminals and start your favorite alternative login manager.

/etc/init.d/xdm stop
#Start other login manager
gdm

After that you can login again on Ctrl-ALT-F7.


Upgrade QT and remove old KDE

Update your qt installation now because KDE 4.4 requires qt 4.6.

emerge -va `cat /root/kde-upgrade/qt-packages`

After that we are ready to remove the old KDE. Old KDE version's packages would be removed by an upgrade anyway. When we remove them before our installation we will save us a lot of hassle concerning package blocks etc.

I heard unmerging the old kde version is completely unnessessary now, as newer portage versions will handle softblocks by themselves. So it is completely ok to skip the unmerging.

emerge -C `cat /root/kde-upgrade/kde-old`

 

(While emerging qt) Check for keyworded packages

While QT ist emerging switch to another terminal and check if your following KDE merge has all its dependencies in place.

#try to
emerge -vau `cat /root/kde-upgrade/kde-new`

If you get an error about missing keywords on dependant packages, execute:

autounmask package_category/package_name-package_version

on the corresponding package (the package mentioned in "dependency required by"). Personally I had to autounmask phonon-kde, kopete, kdebase-runtime-meta, kaddressbook and libiodbc. Libiodbc-3.52.6 failed on ~amd64 so I installed the keyworded version which built normally.

 

(After emerging QT) Rebuild Qt dependant packages

Rebuild all qt-dependendant packages.

 emerge -1va sip PyQt4 qscintilla qscintilla-python

Apart from these packages you will have to rebuild all installed kde-themes in portage. After that remerge Phonon. I had to do this and for you it will not hurt ;-).

#emerge your new kde's phonon version
emerge -1va phonon

 

Emerge your new KDE

So sit back and relax. The biggest part of the work is done now. Emerging new KDE packages will take several hours depending on your CPU power. It is best to do this over night. If you peek at the following command you will see a --keep-going at the end. This tells Portage-2.2 to automatically resume the whole merge with packages not depending on the failed package when a package fails. If you use Portage-2.1 remove this option and beg that you will wake up with a fresh and shiny new version of KDE.

#DO!
emerge -va `cat /root/kde-upgrade/kde-new` --keep-going

 

Final work

After our work before kde should build without errors. At least it did for me... If there remain errors visit http://forums.gentoo.org in your spare desktop environment.

#revdep-rebuild to rebuild packages like e.g. digikam or similar
revdep-rebuild
#update your config files
etc-update
#read announcements generated during upgrade
eread

If all is done, you can log-out from your temporary desktop environment, kill your other login manager and start kdm again. Then log-in to your new shiny kde version and enjoy.

If you have suggestions or improvements let me know.
Hope this helps,
Phillip

Server Optimization

The last weeks I investigated server side optimization (not application optimization) issues further because our Joomla based web portal scales quite poorly. The server is still sufficient for our current load but I want to have some more resources for usage peaks and future development. I thought it would be nice to share my thoughts and experiences as appropriate tutorials are scattered all over the web. I will describe the main steps in brief and will link to further documentation at the web if possible and needed.

So far so good. Currently our application uses the following server software:

  • Joomla 1.5 as web application
  • PHP 5.2 with ZendOptimizer 3.3 as our only must have PHP extension
  • Apache httpd 2.2 as web server
  • Varnish 2 as reverse caching proxy for Java and PHP apps.
  • MySQL 5.0 as database management system
  • Gentoo Linux as server OS

Our website makes intensive use of Joomla extensions. Some of them were developed by our own IT department. The start page is news oriented and contains several extensions and also many images. Apart from that we have quite a few registered users which use interactive parts of the site like forums or lotteries. Additionally some content of the site is only available to privileged users.

With this information you should have a rough overview of our web site and the application comprehending my optimization efforts. The next part of the series will contain information about bringing MySQL to speed.

Comments are as always welcome
Phillip

Syndicate content