Harsh but fair

Open source chicanery and the battle with my inner geek

Archive for the 'Kubuntu' Category


Kubuntu Hardy Heron Upgrade

Posted by raetsel on April 28, 2008

On Friday afternoon I upgraded my desktop PC to the KDE4 version Kubuntu Hardy Heron from the KDE 3.5 version of Gutsy Gibbon

Overall I have to say the process was very smooth and by far the most trouble free upgrade I have done. There were one or two funnies and these are outlined below.

Note: I decided to upgrade by downloading the alternate CD images and doing a cdromupgrade rather than doing an upgrade over the ‘net. I did this as I thought the Kubuntu sites might be a bit busy still, it being only one day after Hardy was released.

Overall the process took just 40 minutes including one false start.

Allow upgrades from the network hung

One of the options at the start of the CD ROM upgrade is to allow the system to connect to the ‘net to get the latest downloads. I decided to allow this figuring there wouldn’t be many updates to get. However maybe it was because the site was busy but the upgrade just seemed to hang. So after 10 minutes I cancelled and restarted it and chose not to get the upgrades from the net.

This restart initially hung with an error saying it could not get the lock file:

/var/lib/apt/lists/lock

This was because the aborted upgrade had left the lock file behind. I deleted this file with

sudo rm /var/lib/apt/lists/lock

The upgrade process then started itself automatically without me having to go back out.

Remove the CD before rebooting

At the end of the upgrade the systems says it is going to reboot once you press OK. However I didn’t notice any warning to remove the CD before doing this. As my system is set to boot from CD ROM first the result was my system started the live CD on reboot and asked me to select a language.

I ejected the CD and rebooted my machine and all was fine.

KDE4 Not Installed when upgrading from KDE 3.5

After the upgrade was complete and the login screen came up I checked the available sessions and only KDE was listed. There was no option for KDE4 so I thought maybe it will automatically login to KDE4 and there is no KDE3.5 option.

However when I logged in all I saw was the KDE 3.5.9 desktop ( upgraded from 3.5.8 ).

Thinking about this, it kind of makes sense. Although I was using the KDE4 CD the system is an upgrade and since I’ve never had KDE4 on this machine before it just upgraded what was there.

I was able to easily solve the problem by using adept to install the package kubuntu-kde4-desktop, from the command line the same can be achieved with.

sudo apt-get install kubuntu-kde4-desktop

The upgrade took about 10 minutes and interestingly used the alternate CD ( which I had re-instered after the reboot ). I was fully expecting to to start pulling down the package from the ‘net but it didn’t.

This just leaves me with the lingering doubt that I’m not going to get updates for KDE4 over the ‘net. I need to check my sources.list to see if there is anything else I should be adding in there to get the KDE4 updates.

The installation of kubuntu-kde4-desktop asked me what login manager I wanted to use, KDM or KDE4-KDM. I chose the KDE4-KDM version.

Once the kubuntu-kde4-desktop package was installed I logged out and back in again and under the options for sessions I had KDE and KDE4.

Choosing KDE4 did exactly what it says on the tin.

No Sound

In both KDE 3.5.9 and KDE4 initially I had no sound at all. After a couple of dead ends with installing the pulse audio server the problem turned out to be the channel to my speakers was muted in kmix.

I had to choose Kmix from the Multimedia menu and then click on the speaker icon that appeared in the status bar and choose “mixer” to bring up the full mixer panel. For some reason there were two “Front” channels showing and one of them was muted. Un-muting this gave me my sound back. (Click the pic below to embiggen)

The second Front channel was initially muted

No Sound in Firefox for Realplayer plugin

Although sound was now working in KDE4 in general in Firefox the BBC Radio Player was going through the motions of playing but not producing any sound using Realplayer. This turned out to be the fact that the plugins directory had changed for firefox3 and I had to copy in the relevant plugins from /usr/lib/mozilla/plugins to /usr/lib/firefox-3.0b5/plugins

sudo cp /usr/lib/mozilla/plugins/nphelix* /usr/lib/firefox-3.0b5/plugins

NB: This is a bit of a sloppy way of doing this I should really use softlinks to the orginal plugin files rather than making a copy. Also it should be possible to set this up in your home directory .mozilla directory rather than the global /usr/lib

Virtual Box

I use VirtualBox to run an XP virtual machine for connecting to the VPN and work. When I fired this up after the upgrade I got an error message about the VirtualBox kernel drivers not being loaded. The new version of the main Linux kernel was the reason.

Cleverly the error message told you exactly what to do, run “/etc/init.d/vbdrv setup” as root so for Kubuntu this just meant:-

sudo /etc/init.d/vbdrv setup

I really like VirtualBox and much prefer it to VMWare server. The way it handled this error message just confirms it’s the best choice for me for running a VM.

Hotkeys not loaded by KDE Autostart

The hotkeys application I use to set up my multimedia keys was not loaded when I logged in to KDE4. This was because the Autostart directory for KDE4 is in a different place to KDE3.5

In KDE3.5 is it ~/.Kde/Autostart but for KDE4 it is ~/.kde4/Autostart

So all I had to do was recreate my soft links:

cd ~/.kde4/Autostart

ln -s /usr/bin/hotkeys  hotkeys

I am not sure if .kde4 is the official directory for KDE4 files or if this has been set up by Kubuntu because they are allowing you to run both KDE3.5 and KDE4

Skype Not Working

This is the only issue I have yet to resolve. After the upgrade Skype was completely uninstalled. I tried installing it from apt-get but this gave an error saying there was no valid install candidate.

I still had the .deb package I had downloaded from the Skype website so I just re-installed this using dpkg -i

This gave me Skype back on the menu and it ran ok but whenever I try to make a call it just fails.

I suspect this might be something to do with the sound system and the fact in fixing my lack of volume I installed the pulse audio server.

I will try un-installing pulse audio and see if it makes any difference. Though I would like to use pulse audio to see what it is like and what all the fuss is about.

Posted in Kubuntu, Technical, Uncategorized | Tagged: , | 3 Comments »

KDE4 Save Current Session - DBUS to the Rescue

Posted by raetsel on April 25, 2008

Executive Summary

To cut to the chase, if you want to save your current sessions in KDE4 run the following command from a command line ( or put it in a script that you can call from a desktop shortcut ):

dbus-send --dest=org.kde.ksmserver /KSMServer org.kde.KSMServerInterface.saveCurrentSession

The Details

Now for how I got here in the first place:

I’ve just upgraded to Kubuntu Hardy Heron and decided to give KDE4 a go. I’ll be posting about the upgrade process and KDE4 in general over the coming days but one thing that has kept me “amused” today is the lack of a “Save Current Session” button in KDE4

Rather than have the desktop returned to how it was when I last logged out ( “Restore Previous Session” under KControl ) I like to return to a standard set of applications so I use the “Restore Manually Saved Session” option under KDE 3.5.

In KDE4 KControl there are the same options for the session manager. The snag is that there is no button anywhere to actually save the session when you want to. Thus choosing this option effectively logs you back in to a blank session. This has been reported as a bug in KDE but does not seem to be making any progress.

Flushed with my success with dcop recently I was hoping I could use it with the ksmserver object ( the session manager ) but in KDE4 dcop is not used and the dbus interface is used instead which is a bit more complicated to use.

There is a tool you can install called kdbus that does a similar job to kdcop but I found a much better tool called qdbusviewer along with a useful overview of KDE and dbus here.

To use qdbusviewer you need to install the package qt4-dev-tools then run qdbusviewer from a command line:-

sudo apt-get install qt4-dev-tools

qdbusviewer

You can use qdbusviewer to browser what objects are available and execute methods on them just like kdcop and kdbus ( but kdbus is rather slower )

Posted in Kubuntu, Technical | Tagged: , , | 7 Comments »

dtox, dos2unix, tofrodos

Posted by raetsel on May 29, 2007

One of the joys of working in both the *nix and Windows worlds is that from time to time I get a text file in DOS format i.e. with a CR/LF in each line instead of just an LF. This means I get a Ctrl-M (^M) character at the end of each line and if it is supposed to be an executable script it will give some very strange errors.

There are a number of utilities on various Unix variants to convert these file and they are called things like dtox, dos2unix but on my Kubuntu system it took a bit of tracking down.

The package is called tofrodos so

sudo apt-get install tofrodos

will install the utilities for you. The utilities are called fromdos and todos and do exactly what they say on the tin.

One thing I like about these variants is they work on a file “in situ” so rather than having to do something like

dos2unix file1.txt > file2.txt

A simple

fromdos file1.txt

is all you need.

Posted in Kubuntu, Technical | 3 Comments »

Kopete Bug? What Kopete Bug?

Posted by raetsel on February 2, 2007

Back in October I posted an entry about a bug I had found with the kopete-meanwhile plug in for kopete that allows it to talk to a Lotus Sametime server that I use at work.

Well the other day I got an update on the bug posted at Kubuntu. It said the bug was rejected as kopete-meanwhile was no longer in the archive. I don’t get what this means. I’ll have to check at work where I have a dapper machine but I have edgy at home and that has kopete-meanwhile still as a valid package and I’m pretty sure it is still there in dapper.

I know that kopete-meanwhile is in the “universe” repository so not in the definite core of what the long term support of Dapper is al about but even so it’s a bit disappointing if a tool for talking to a corporate system really has been removed from the archive for Dapper.

Meanwhile (pun intended) the original bug languishes unloved in the KDE bug tracking system.

If I get chance I’ll check the repositories on my dapper machine on Monday and report back.

Posted in Kubuntu, Technical | No Comments »

Cyrillic Russian Keyboard and Fonts

Posted by raetsel on January 11, 2007

Well for once a post with questions but no answers. I’ve been spamming a few forums and sites with the following:-

When I am not playing with my Kubuntu system one of my other hobbies is learning Russian.

In attempt to combine the two I have bought a bi-lingual keyboard QWERTY and Cyrillic (ЙЦУКЕН) I’ve installed the ru localisation for KDE and set up the keyboard variants. As you can see it works fine in Russian mode. Я говорю по-русски (I speak Rusian) but as a student I need to know where the stress goes in a word and this is usually done by adding acute accent above the stressed vowel. Then I can put them in applications like KWordQuiz the vocab trainer.

The only way I have found to do that so far is to type the word in Open Office Writer then use the insert special symbol option and choose the accent from the Combining Diacritical marks, then I can cut and paste in to KWordQuiz or any other KDE app. (Interestingly pasting into google mail in firefox strips out the stress marks, I have just discovered, but it works here although the accent is a little off to the right Я говорю́ по-ру́сски )

I believe I should be able to just add these accents from the keyboard using either a “dead key” or a compose key setting but so far I have been unable to do this.

Any ideas what I need to do?

In case it is of relevance the keyboard was bought from a trader on ebay details here

This certainly makes me realise how much I take for granted using English on a keyboard in a computing context.

Posted in Biographical, Kubuntu, Technical | 1 Comment »

Laptop Build: Getting xhost + to work

Posted by raetsel on November 8, 2006

For most of the servers I have to connect to at work I just use telnet or ssh but sometimes I need to run X clients locally such as for the Oracle Universal Installer.

I found that I had to configure KDM in Kubuntu to listen on the network to accept connections to run X. Simply setting the DISPLAY variable on the remote system, typing xhost + on the local system and then running the X application on the remote system would not work.

The key file is /etc/kde3/kdm/kdmrc

In there is a line that says:-

ServerArgsLocal=-nolisten tcp

Just comment this out by putting a # in front of the line and restart X by logging out and back in again. Now you can run remote X clients on your local machine as long as you have run xhost + or to be a bit more secure xhost remotehost where remotehost is the name or IP address of the remote host you are working with. (See man xhost for more details).
Bear in mind that there are some security risks to removeing the -nolisten tcp from KDM and if possible you should look at using X Forwarding over ssh, but then like me you may have systems where this isn’t possible.

Posted in Kubuntu, Laptop Build, Technical | 3 Comments »

Laptop Build: apt-get behind a proxy

Posted by raetsel on October 29, 2006

We have a Netcache webproxy in use at work and so to get the various apt-get and adept commands to work it is necesary to do some configuration.

There are a few posts on the web about how to do this some, saying you just need to set the environment variable http_proxy, others that you must specify the proxy settings in the file /etc/apt/apt.conf.d/70debconf . For my Kubuntu install I found a mixture of the two was required, more of which anon.

Firstly a word about what the url for your proxy should be: If it is a proxy that requires authentication then it will need to be of the form “http://username:password@proxy.blah.com:8080″ using your username, password and the dns name or ip address of the proxy itself and whatever port number your proxy listens on at the end.

N.B. If your password ever expires and/or gets changed then you will need to update the proxy url wherever you set it.

Following is a summary of my findings and what needs to be set where.

  • Adding a line
    export http_proxy=”http://username:password@proxy.blah.com”

    in /etc/bash.bashrc works fine for using apt-get commands from the command line but the graphical tool adept does not appear to read this file or somehow ignores the http_proxy environment variable.
  • For adept to work you must remove the line Acquire::http::proxy “false”; from /etc/apt/apt.conf to get any other apt.conf.d file settings to work.
  • Add in the line
    Acquire::http::proxy “http://username:password@proxy.blah.com:8080″;

    to the end of /etc/apt/apt.conf.d/70debconf (this file seems to be the “traditional place” to put this setting.)

This got me up and running. I also found the command apt-config dump very useful for displaying the settings that apt-get is going to use. Bear in mind however that for command line apt-get usage the http_proxy environment variable, if it is set, appears to overule whatever Acquire::http::proxy settings you may have in apt.conf.d files.

You can just set the Acquire::http::proxy setting and apt-get from the command line will use this in the same way as adept does but as I like to use wget for fetching the odd file from the ‘net I needed http_proxy set anyway.

Clear as mud? That’s got that sorted then.

Posted in Kubuntu, Laptop Build, Technical | 3 Comments »

Laptop Build: NTFS Resize, First Clean Your Windows

Posted by raetsel on October 22, 2006

I needed to be able to dual boot my laptop as the VPN client we use “Aventail” is only available for Windows and I would need to be able to log on from home when I am doing out of hours support. The Kubuntu Dapper install caters for this and offers to resize your Windows partition for you.

However when I tried that it failed saying it was unable to resize. I got a similar result when I tried a manual resize using the qtparted partition manager tool.

The reason was when that I had been using the laptop booted in Windows and surprise, surprise it had had some problems shutting down so I had to do a forced power off. This however left the NTFS partition in a non-clean state. As soon as I booted back into Windows and did a full shutdown then the installer resized the Windoww partition no problem. The moral of the story: First clean your Windows.

Posted in Kubuntu, Laptop Build | 3 Comments »

Practise what you preach….and write it down

Posted by raetsel on October 21, 2006

Over the last couple of months or so I’ve been using Kubuntu on my laptop at work. I thought it would be a good way to find out if Kubuntu can really hack it in a commercial environment specifically an almost completely proprietary Microsoft one. I administer HP-UX servers so I connect to Unix systems all the time and aside from anything else it is just easier to manage that connectivity from a Linux based system.

So while no-one was looking I set up my Toshiba Tecra P4 256MB 40GB system to be dual boot with Kubuntu Dapper. I encountered quite a few little hurdles to overcome to get the system doing everything I could when it was booted in Windows XP but was able to sort them all out. I had the idea of write a series of posts on what I had to do to tweak Kubuntu so other people could perhaps find the answers easier and quicker than I did and of course it would be a handy reference for me whenever I wanted to do this again.

Well you know how it goes one thing came up then another and I never got to writing stuff down; and serves me write too. When I got my new company laptop, a Dell Latitude 520 Intel Core Duo 1GB 40GB, I found I was floundering around to work out how I did some of the stuff I did before.

So this time I’ve made notes of all the steps I’ve taken to get Kubuntu working how I want and I’m going to post them here over the coming days and/or weeks. In an unusual attempt at brevity I’ll do a separate post for each item. Watch this space………

Posted in Biographical, Kubuntu, Laptop Build, Technical | No Comments »