Categories
How-To's

New phonon-vlc backend for KDE 4

According to the devs of Amarok, the new VLC based backend for Phonon delivers better sound quality than the Xine backend. Something like this just begs to be explored of course and the instructions below are based on the generic ones but specifically for Gentoo. Please note that the backend is alpha: it is incomplete and changes daily.

Install VLC 1.1 pre by installing the live version (note that VLC 1.1 is about to be released any time now so this might be available by the time you read this). Note that I had to disable the Gentoo patches in the vlc-9999 ebuild as they prevent VLC from compiling.

ACCEPT_KEYWORDS=** emerge =vlc-9999

Note to self: add the keywords to the /etc/portage/package.keywords file. 😉

Next, fetch the Phonon-VLC backend from GIT. Note that is should become ‘stable’ soonish (it said somewhere it should be moving to kdereview in the near future) so it should be safe to assume it sort of works.

cyberwizzard@cyberxps ~ $ mkdir kde
cyberwizzard@cyberxps ~ $ cd kde
cyberwizzard@cyberxps ~/kde $ mkdir src
cyberwizzard@cyberxps ~/kde $ cd src
cyberwizzard@cyberxps ~/kde/src $ git clone git://gitorious.org/phonon/phonon-vlc.git

Initialized empty Git repository in /home/cyberwizzard/kde/src/phonon-vlc/.git/
remote: Counting objects: 483, done.
remote: Compressing objects: 100% (400/400), done.
remote: Total 483 (delta 330), reused 116 (delta 66)
Receiving objects: 100% (483/483), 102.22 KiB, done.
Resolving deltas: 100% (330/330), done.

cyberwizzard@cyberxps ~/kde/src $ cd phonon-vlc/
cyberwizzard@cyberxps ~/kde/src/phonon-vlc $ cmake -DCMAKE_BUILD_TYPE=debugfull -DCMAKE_INSTALL_PREFIX=/usr $HOME/kde/src/phonon-vlc/

...configure here...

cyberwizzard@cyberxps ~/kde/src/phonon-vlc $ make

...wait a bit more...

cyberwizzard@cyberxps ~/kde/src/phonon-vlc $ su -c "make install"
Password:

[100%] Built target phonon_vlc
Install the project...
-- Install configuration: "debugfull"
-- Installing: /usr/lib/kde4/plugins/phonon_backend/phonon_vlc.so
-- Set runtime path of "/usr/lib/kde4/plugins/phonon_backend/phonon_vlc.so" to "/usr/lib:/usr/lib64/qt4"
-- Installing: /usr/share/kde4/services/phononbackends/vlc.desktop

cyberwizzard@cyberxps ~/kde/src/phonon-vlc $ su -c "kbuildsycoca4 --noincremental"
...password and lot of output here...

And thats it! Just fire up Amarok -> Settings -> Configure Amarok -> Playback -> Configure Phonon (or go through System Settings in KDE) and select the VLC backend (currently shows up as version 0.2).

Categories
How-To's

Multi-monitor with KDE 4 and XRandR

One of the annoyances I’ve had with *nix so far was the apparent lack of multi-monitor control from the GUI. I’ve have experience with TwinView using xorg.conf, which worked fine but was quite a hassle to set up.

A side effect of this is the fact that once set up, I never touched the configuration again. For a computer with 2 screens hooked up permanently, this is fine. For a laptop which is dragged along and connected to beamers, TVs and monitors – not so much.

The good news is that I run a modern linux distro which led me to believe that the multi-monitor stuff should be enabled by default. However, I am not using Kubuntu (which would probably auto-enable all new toys for me) but rather I am using Gentoo. So it took some digging to figure out what is going on these days and how to use it. On a side note: you could use nvidia-settings instead after plugging something in but I’d rather use the automatic method.

First a word of warning: the binary NVidia drivers do not support RandR 1.2. I have the 195.xx drivers installed and NVidia expressed back in 2007 that RandR 1.2 support was a ‘priority’ feature. One that apparently needed more than 3 years to be released. This means that using the binary ‘nvidia’ driver will give you RandR 1.1 which does not support the on-the-fly hotplug for displays. Instead you are forced to use TwinView, define meta-modes for every possible configuration and switch to those using ‘xrandr’ (or use the nvidia-settings tool each time).

Since this sort of defies having RandR 1.2 support altogether in Xorg, I decided to ditch the binary nvidia driver in favor of ‘nouveau’: the open-source replacement for ‘nv’ with decent 2D acceleration support (although I couldn’t resist and enabled the highly experimental Gallium3D support as well).

To start off: trim down your Xorg configuration to a minimum, note that a recent Xorg is needed (I have 7.4 at the time of writing). This is needed to enable the auto-detection of many things or rather: manually specifying properties will override auto-detected settings and cripple Xorg’s ability to handle everything on its own. As an example, I have included my own xorg.conf below.

Section "ServerLayout"
  Identifier "Default Layout"
  Screen 0 "Screen0"
EndSection

Section "ServerFlags"
  Option "AutoAddDevices" "true"
  Option "AutoEnableDevices" "true"
EndSection

Section "Device"
  Identifier "nVidia_8600M_GS_nouveau"
  Driver "nouveau"
  Boardname "GeForce 8600M GS"
EndSection

Section "Screen"
  Identifier "Screen 0"
  Device "nVidia_8600M_GS_nouveau"
  Monitor "Monitor 0"
  SubSection "Display"
    Modes "1680x1050"
  EndSubSection
EndSection

Section "Monitor"
  Identifier "Monitor 0"
  VendorName "Primary Monitor"
  Option "DPMS"
EndSection

Section "Extensions"
  Option "Composite" "Enable"
EndSection

The ‘ServerFlags’ section is pretty simple: use every auto-detection known in Xorg to hotplug devices. This means both monitors and input devices like mouses and keyboards.

Next up are the 2 sections for my NVidia display card. Since I am using ‘nouveau’ instead of ‘nvidia’, make sure you are not loading ‘glx’ somewhere (if you were using ‘nvidia’ in the past like me, you most likely have that somewhere).

The last 2 sections are fairly simple as well but note that I do specify the native resolution of my LCD screen as the preferred resolution.

Thats it! Restart your X server and run xrandr so see the result. I plugged a VGA monitor in my notebook and this is the result:

cyberwizzard@cyberxps ~ $ xrandr
Screen 0: minimum 320 x 200, current 2960 x 1050, maximum 8192 x 8192
LVDS-1 connected 1680x1050+0+0 (normal left inverted right x axis y axis) 331mm x 207mm
1680x1050      60.0*+   60.0
1400x1050      60.0
1280x1024      59.9
1280x960       59.9
1152x864       60.0
1024x768       59.9
800x600        59.9
640x480        59.4
720x400        59.6
640x400        60.0
640x350        59.8
HDMI-1 disconnected (normal left inverted right x axis y axis)
VGA-1 connected 1280x1024+1680+0 (normal left inverted right x axis y axis) 312mm x 234mm
1680x1050      74.9 +   60.0
1280x1024      85.0*+   75.0     60.0
1792x1344      60.0
1920x1200      59.9
1600x1200      75.0     70.0     65.0     60.0
1400x1050      85.0     74.9     60.0
1440x900       84.8     75.0     59.9
1280x960       85.0     60.0
1360x768       60.0
1280x800       84.9     74.9     59.8
1152x864       75.0
1280x768       84.8     74.9     59.9
1024x768      100.0     85.0     75.1     75.0     70.1     60.0     43.5     43.5
832x624        74.6
800x600        85.1     72.2     75.0     60.3     56.2
848x480        60.0
640x480        85.0     75.0     72.8     72.8     66.7     60.0     59.9
720x400        85.0     87.8     70.1
640x400        85.1
640x350        85.1
Categories
Linux / Gentoo Linux

Fixing Midnight Commander Locale errors

If you have a pretty recent Linux system like I have, you most likely have had the pleasure or the following message when starting mcedit:

Chosen display charset or source codeset does not match one set via locale.

You can then “Fix” it or “Skip” and choose to remember it. For me, fixing or skipping the dialog does not seem to do anything but that is most likely because I don’t use the charset completely (no ‘weird’ characters in my text files). Even worse, if you find it to do something — chances are you want to use the Fix option — and tick “Do not ask again”, the next time the file is broken again! This is because the tick box does not respect your choice but rather takes it as “Skip any problem detection in the future”…

Annoying as it may be, the real cause is the fact that you are most likely not using the correct character encoding on your system by default. Chances are, when you update your system you get this annoying “Generating code page” message a million times over. If so, you just generated support to view every text encoding known to man — good for you!

I on the other hand, will only view UTF-8 files and I’m not really interested in anything else. So I decided to reduce codepage support to 2 languages: Dutch and English. Note that the Dutch support in this case tends to translate messages in programs (ugh) but it also adds support for the Euro sign: ‘€’

Open up /etc/locale.gen and add the following lines:

1
2
3
4
5
en_GB ISO-8859-1
en_GB.UTF-8 UTF-8
nl_NL UTF-8
nl_NL@euro UTF-8
nl_NL.utf8 UTF-8

I cheated a bit by replacing the default ISO-8859-1 or ISO-8859-15 character mapping for Dutch with the UTF-8 one. It seems this choice is allowed and gives me proper UTF-8 support with the nl_NL locale.

Save the file and run locale-gen:

cyberxps ~ # locale-gen
* Generating 5 locales (this might take a while) with 1 jobs
*  (1/5) Generating en_GB.ISO-8859-1...   [ ok ]
*  (2/5) Generating en_GB.UTF-8...   [ ok ]
*  (3/5) Generating nl_NL.UTF-8...   [ ok ]
*  (4/5) Generating nl_NL.UTF-8@euro...   [ ok ]
*  (5/5) Generating nl_NL.UTF-8...   [ ok ]
* Generation complete

Looks familiar? Yes that is the dreaded locale generation but this time it only created the locales we will use meaning it completes in a second instead of 10 minutes… Run locale -a to make sure you got what you wanted:

cyberxps ~ # locale -a
C
en_GB
en_GB.iso88591
en_GB.utf8
nl_NL
nl_NL@euro
nl_NL.utf8
nl_NL.utf8@euro
POSIX

Now open up /etc/env.d/02locale and put the locale selection in and reload afterwards:

cyberxps ~ # echo 'LANG="nl_NL.utf8@euro"' >> /etc/env.d/02locale
cyberxps ~ # env-update >> source /etc/profile
>>> Regenerating /etc/ld.so.cache...
cyberxps ~ # export | grep LANG
declare -x LANG="nl_NL.utf8@euro"

All done, we switched to the new locale and mcedit can stop complaining now. As an added bonus each file you edit will be created in UTF-8.

Categories
Linux / Gentoo Linux

Growing LVM storage

After adding some new storage to the backup system at work, I needed a way to transfer the roughly 400GB of backups to the new installation – without the use of a USB disk or another server (would take way too long). So after installing CentOS 5.3 with LVM2 enabled, I dedicated the better part of 1TB to the new backup storage on the new hard drive.

After mounting the old storage, I copied the old archives to the new LVM storage and did the following.

Prepping partition for LVM

Use fdisk to change the partition type to ‘Linux LVM’, hex code ‘8e’: fdisk /dev/sdb

Then create the structure needed for use with LVM on the new partition: pvcreate /dev/sdb1

Finally, add the new LVM partition to the LVM caches by letting the automated scan picking it up: vgscan

Now to actually append the new partition to the storage pool: vgextend VolGroup00 /dev/sdb1

Adding to LVM

If you run vgdisplay, you should now see the space you just added as free space in the LVM storage pool.

You can now add the free space to one or more storage volumes that need it: lvextend -L +353.5G /dev/VolGroup00/LogVolBackups

Finally, let the filesystem on the drive resize to fill the new space: resize2fs /dev/VolGroup00/LogVolBackups

And there we go, 353.5GiB added to the LVM2 storage. Now next time I won’t think twice to use LVM2.

Categories
Linux / Gentoo Linux

Bilbo: Finally a decent blogging program for KDE?

Bilbo interface While the development on KBlogger has somewhat picked up and some features have been pushed back to allow for a semi-working release, I just found a little gem hidden on the big wide web.

In a mailing list post on the development on KDE, someone is suggesting to take a look at Bilbo instead of KBlogger for the ‘extra-gear’ package. Of course, I was expecting a simple blog editor similar to all the other projects out there that never quite made it. Boy, was I in for a surprise!

Bilbo has the features I need in a blogging program (similar to the Windows Live Writer interface) and even better, it should be in working order!

I will report back once I get it to install on KDE 4.3 using Gentoo.

Categories
Linux / Gentoo Linux

Kblogger coming to KDE 4.3

In a previous article I wrote about KBlogger and its nomination for a vapor-ware award. Most of the commits up until then seemed like KDE global search and replace changes, rather than actual work on the KBlogger application itself.

On the Kblogger page on kde-apps, an anouncement was made that the 3rd alpha was released in Febuari 2009. After installing and playing around for a bit, it felt more like a working blogging tool than it did before.

The downside was the numerous features which didn’t work:

  • Settings autodetection leaves you hanging and makes setting up a blog account more of a guess than anything else
  • If kwallet is not installed or activated (the service needs to run), kblogger crashes
  • If you try to read the category list on a Moveable Type API site, you get a ‘Method not supported’ error
  • Reading previously posted articles works (sort of) unless you have media attached in which case it crashes

The biggest problem is not the continuous crashing of the application but rather that I haven’t been able to post one article on any of my sites using Kblogger – it truely is an alpha quality application, if that.

It seems like the development is still going, even if the kde-apps page and homepage seem to be dead. Hopefully, they will work out the crashes and get it going in some form before KDE 4.3 ships out in June 2009.

Because of the current state this seems doubtful but according to the plans, it is still a part of KDE 4.3 PIM-libs – although it was on the schedule for 4.0, 4.1 and 4.2 as well.

In a desperate attempt to make the KDE 4.3 deadline, the current Kblogger feature plan seems to have dropped support for media management. This means that a lot of the current issues become a problem for later on and the core of the program (the blogging engine) is the only thing that needs to be fixed.

Lets hope this June we get a pleasant surprise but I am currently putting my money on KDE 4.4 or even KDE 4.5 as a release platform. On the bright side, perhaps the SVN versions become stable enough to use in the mean time.

On a side note, I am still looking for a blogging program for KDE 🙂

 

 

Categories
Gentoo Linux

QuickCam Communicate STX on Linux

Looking for instructions to get your latest Logitech webcam to work on linux? Your in the right place! Need a replacement for gspcav1 or spca5xx? Have no clue what I just said but you need a new webcam driver? Please, read on…

Categories
Gentoo Linux

KDE 4 random crashes (when launching Konsole)

After upgrading my laptop to the latest of the latest and even recompiling pretty much the whole system after that, I was still facing a whacky system which crashed on me on seemingly random times.

After a while I noticed that when I log in, hit alt+F2 and fire up ‘konsole’, the whole X server comes down crashing on me. Resulting in a few seconds of dark terror and a fresh login panel.

After running konsole from a text terminal, I spotted the following errors:

 kdeinit4: preparing to launch /usr/bin/konsole konsole(2671): Attempt to use QAction "change-profile" with KXMLGUIFactory!  Undecodable sequence \001b(hex)[?1034h

Because any attempt to trace the program failed, I started to search for other people and their solutions.

I’ve read things about people reinstalling parts of Xorg (namely libX11 as 1.1.5 seems to have some quirks) and parts of Qt 4.5 which should be unstable as well. None of these things worked for me and after restoring the system in the unmodified state, I found someone claiming that removing ‘tweaks’ in the xorg.conf file for the nVidia driver did the trick.

Although I indeed upgraded the nvidia-drivers package, I thought this was one of the bogus stories (like people solvin mounting problems by unplugging printers on the other side of the globe) – but at this point I had nothing to lose.

To my sheer terror I must admit that it actually worked!

I’ve had one occasion where konsole started but the window rendering was all screwed up (white or no background or no window decorations) but I hadn’t linked it to the display driver itself.

For now, everything is stable so I assume that I found the culprit. Please note that one or more of the following will make your KDE 4.2.2 desktop crash randomly:

  • TrippleBuffer
  • BackingStore
    • I have 2 options left in my configuration which are there for a while now and which still seems to be perfectly safe:

      • AddARGBVisuals
      • OnDemandVBlankInterrupts
        • Hopefully this post will safe someone a lot of grey hairs and a couple of precious hours spent on a goose hunt…

Categories
Linux / Gentoo Linux

KNetworkConf in KDE4 and Gentoo Baselayout-2

For a while now, I wondered why they ship KNetworkConf with KDE4 if its not working at all. The GUI shows up fine but none of the interfaces actually show up (making it pretty hard to configure them).

Today I found out why: the configuration panel is not incomplete, it is incompatible. You see, Gentoo is starting to switch to baselayout-2, a new and improved system layout which should solve a million quirks that have been part of the system for years now.

According to this bug report on kde.org, this is because the network listing is no longer the way it was: it is now a new kind of array (bash compatible or something).

Marvelous as this may be, it breaks knetworkconf in KDE 4.2.2 and older. Lets just hope that the new (service) release fixes this ‘ minor’ glitch.

Categories
Linux / Gentoo Linux

Getting Evolution to go native on KDE4

Right now I’m trying to get Evolution to work and fill the void that the removal of KitchenSync from KDE 4.2 has caused: the possibility to synchronize your phone, PDA, calendar, contacts and email using one central point.

Installing Evolution is only the start and please note that I am running Gentoo so if you are on another linux distributions things might turn out different.

We start with the basics: when you try to install synce and you have the ‘kde’ use flag – it will try to pull in ‘synce-kio-rapip-0.10-r1’ or similar. If you are truly running KDE 4 (and ditched KDE 3 and Qt3 – like me) the ebuild will fail because it needs KDE 3. There is a new package called ‘kde4-kio-rapip’ (currently at version 0.2) which should work for KDE 4. I decided I don’t want the deprecated KIO slaves and should I need direct access to my Windows Mobile 2003 PDA I will rather install the FUSE driver for it.

To make Evolution look like the KDE applications you need to get GTK2 to use the Qt4 engine – which will theme everything like the rest of KDE. There are 2 or 3 choices at the moment but ‘x11-themes/gtk-engines-qt‘ is currently your best bet (at version 1.1-r1 right now).

After installing it, open up System Settings -> Appearance -> GTK Styles and Fonts and select "Use my KDE style…" and "Use my KDE fonts…" and hit apply. Now log out and back in and Firefox, Thunderbird, Evolution and any other GTK program should look like KDE applications.

The next obstacle was the fact that Evolution is missing its icons despite that the theming of the interface itself is working. This is because the normal parts of the program interface are rendered by Qt4 but the icons are not a part of the standard Qt4 theme. To fix this we need to tell GTK which native theme it should use. Not to skin the program but to provide the icons.

Unfortunately I can not figure out what is going wrong as some icons are picked up and others are not while the console of Evolution stays quiet. Running the program itself from a console shows these messages:

Bonobo-WARNING **: Could not find GNOME pixmap file (null)

Because reinstalling seems to do nothing I might try to downgrade Evolution to see if that works…