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
General blog entries

Radio silence

Visitors dwindling to my site, I decided it was time to write something again after 3 months. Its not that I stopped working with computers but rather that my attention moved from working with computers to studying Computer Science. Something that is hard to combine if you are making a dash to the finish line.

In other words: I am finishing my last courses in the coming days and will begin on my thesis. I haven’t decided yet if I will post things from my thesis yet (as extra content). Not so much because of the extra time but also because not everything is interesting and some information is classified – making other things inexplicable or incomplete if I were to post it online.

On to more important things: KDE 4.4 is about to hit the virtual shelves! Besides more polishing and some other features, it finally comes with a full blogging client (as part of the base system).

“What”, you say, “they fixed KBlogger?” Heck no, KBlogger is still dead as a door nail and as buggy as it has been forever. It seems that someone got the bright idea to actually replace KBlogger altogether with Bilbo – the tool I talked about before. One of the major issues Bilbo had, was that fact that nobody knew it. Personally, I think this comes from the name: Bilbo – as it is also the name from one of Tolkiens books. If you now think “Lord of the Rings”, you should be ashamed: Bilbo is part of the story *before* LOTR, he just happens to be alive in the epic story afterwards…

But I digress.

The fact remains that finding the program (even if you know that it exists) becomes hard because all search engines will refer you to hits about the wrong topic. Also, as you might imagine, some folks (*cough*copyright holders*cough*) might have issues with the naming. So it was renamed from Bilbo to Blogilo a while back and as such can now be part of the whole KDE experience. Hurray!

Next time I will probably explain about a project (formal model checker, based on the Promela language) I have been working on and the surprisingly bad hash functions I found on the internet…

Categories
Linux / Gentoo Linux

KDE4: Launching screensaver from commandline or shortcut

Remember the good old days of KDE3? It was so easy to start your favorite screensaver by hand: simply invoke dcop and there we go. But since the dcop framework is no longer part of KDE4 I found myself without a hint of how to create a shortcut to trigger the screensaver.

Until now… use the following commands to lock the screen with the screensaver running or display the screensaver without locking:

qdbus org.freedesktop.ScreenSaver /ScreenSaver Lock

qdbus org.freedesktop.ScreenSaver /ScreenSaver SetActive 1

I hope this helps others as it took me too long to find this…

Categories
General blog entries

Bilbo, the new blogging program for KDE4

The experimental ebuild for Gentoo worked like a charm: I am typing this on Bilbo. The editor seems to Just Work ™, the previews are functioning (both rich text and the website preview) and the account creation worked out of the box.

The only thing that took some time to figure out is the fact that the auto-config option did not configure my site. In fact it started looking for a xmlrpc.php file to talk to, which results in a 404 as Joomla! does not have a file but rather a folder with that name. So after setting it to the correct location and switching to the metaWeblog API in the Advanced settings I hit ‘Fetch blog ID’ and voila, we are up and running.

Well, kind of: the plugin I use to provide the blog API on the site is incomplete. I have been tweaking it for months now, adding missing functions as I went. So when I wanted to select a category, I got an error stating that the XMLRPC function was not found.

After enabling the debug info on my server, I saw that Bilbo tried to access metaWeblog.getCategories – which is unimplemented in the original version of the plugin. So after adding the missing function, everything came to live and here we are…

Now if you excuse me, I have a virtual machine to dispose of as I can retire Windows Live Writer now ^^

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

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
General blog entries

KBlogger moved to KDE 4.3

And yet another epic fail for KBlogger, the new blogging tool that was supposed to be in KDE 4.0. After KDE-PIM was not ready for the 4.0 launch, it was postponed to KDE 4.1 – understandable but as anyone running a blog and a PC using KDE4 knows, we don’t have any decent blogging tool on linux.

After an early alpha (which was a step in the right direction) is became very quiet around KBlogger. So when KDE 4.1 was released I was surprised to see the lack of info about the new blogging tool.

When I found KBlogger on the KDE 4.2 release schedule I sighed – another half year to wait on a decent replacement for Windows Live Writer (which is still – in my opinion – one of the best blogging tool out there, even when used in VirtualBox).

Now, at the dawn of 2009 and the coming of KDE 4.2 I found it weird that the beta of 4.2 lacked a preview of KBlogger.

I just found these mail conversations on the KDE mailing list pushing KBlogger to KDE 4.3…. which is supposed to come out end 2009. Once again a huge let down for the KDE fans.

Despite the statements that KDE 4 is feature complete it keeps lacking vital programs: KDE PIM has a screwed up Kitchsync support (which in itself is half broken if you ask me), power management just arrived in 4.2 (Powerdevil) and KBlogger is still not here (even though its core component KBlog – a WYSIWYG editor – is working pretty well for some time now). I am still using KDE 4.x but so far the thrill has become quiet the waiting game. Yay for open source I suppose…