Marooned in KDE and Lovin’ It
I hadn’t much of a thought of KDE before. When I first started Linux I did as most people did and tried Ubuntu, and I was in love. Gnome did just about everything I needed to do and was endlessly customizable. I heard braggarts before yarn about KDE but I thought, “why bother?” I had tried KDE before, oh, it must have been 10 years ago. It seemed like a rock to me then, nothing much I could do with it, too much like Windows. I had also tried Gnome when it wasn’t much more than a panel, and gave up Linux. Now, when I installed KDE 4.1 on this computer is wasn’t by any desire to try KDE, it’s just Gnome wasn’t available. There’s a problem in Gentoo land that Gnome 2.24 hasn’t quite hit the treeyet. Some problem with gnome-session and a good enough problem that developers are working on a proper fix. So I needed a desktop and went and installed KDE.
After installing my initial thought was, “WTF!!!… where is my desktop!” I had no desktop anymore! I had always used my desktop to organize projects before. What was KDE doing ruining all this space? Then I learned about plasmoids.
I had offhandedly heard of plasmoids somewhere and forgot it as the concept just sounded odd. Well plasmoids can be best defined as desktop tools, Mac OS X users would call them widgets. I learned that there is a folder plasmoid that I was able to add to the desktop. And it does it so in a nice organized way:

KDE4 has some nice features like support built into the application for adding new themes, icons, wallpapers from kde-look.org. KDE’s program menu far surpasses Gnome’s in ease of use and program design (i.e. don’t have to wait 10 seconds for it to open). Amarok does rock, though Amarok is still in it’s early stages from being ported from KDE 3.5. I like the System Settings program that puts all the setting in one window like Mac OS X. And KDE sessions behave and save sessions like you’d expect them too and are not broken like Gnome’s.
KDE Tips
A few tips to those willing to try KDE 4.
Emerge KDE-what?
To try KDE 4 I’d recommend using the “kdebase-meta” package. There’s a kdebase light package (kdebase-startkde) that will pretty much just be a desktop and a kde mega package (kde-meta) that installs every possible kde 4 app possible. I found that kdebase-meta was a good comprimise along with adding:
kdeplasma-addons kcalc ark - file-roller for KDE amarok gwenview - image viewer okular - pdf viewing kontact - personal information manager kopete - instant messaging client koffice kmail akregator ksnapshot kmix - mixer for sound kompare - kde diff utility kgpg - needed for several KDE admin tasks kcolorchooser kdeartwork-kscreensaver
Link Wallpaper Folder
To add downloaded wallpapers to KDE4 best to create a link to them:
ln -s ~/.kde4/share/wallpapers/ ~/My\ Wallpapers
To Fix a Broken Saved Session
rm ~/.kde4/share/config/session/*
Setup Keyboard Volume Keys
emerge kmix
Open System Settings and goto “Keyboard and Mice > Keyboard Shortcuts”.
In “KDE component” select Kmix then the component you wish to change followed by the custom button.
Tired of 22 uh minus 12=
To have a non-military time clock, open System Settings > Regional & Language > Time and Dates Tab and select time to: pH:MM:SS AMPM.
Mounting Devices
Though external media should just be loaded on insert in KDE 4 this did not happen. Having installed kdebase-meta I just assumed that it would include a device mounter but I could get no devices to mount. Reading an old Gentoo bug/request that suggested kdebase-kioslaves (part of kdebase-meta) required pmount to mount devices. Through a lengthy argument at the time, it was decided pmount was needed and added as a dependency. However between here and there it got decided that it is again not needed. So if desiring automatic device mounting, add pmount:
emerge sys-apps/pmount
NTFS Read/Write Support
If needing to read and write to an Windows NTFS file system use the NTFS-3g userspace driver.
Note: FUSE will need to be enabled in the kernel: File Systems > Filesystem in Userspace support.
emerge ntfs3g
Add Applications to Load on Boot
ln -s /usr/share/applications/kde4/dolphin.desktop ~/.kde4/Autostart/
KDE Hmm’s
KDE 4’s new UI, widgets and QT framework has a professionalism to it and brings a new maturity to lead all of Linux’s desktop environments. KDE’s weakness has nothing to to with it’s framework but rather the lacking of necessary tools that in Gnome could be taken for granted.
KDE needs a mail-notification program. Yeah, I can awkwardly configure Gnome’s mail-notification to work or try the 3.5 version of kbiff but neither are good alternatives. Yes there’s kmail but who uses ISP mail these days? A real back breaker was I couldn’t find a good program like Tomboy or Zim to take notes on. I have tons of notes used by both these programs that I need immediate access to but neither Tomboy of Zim will run in KDE. I looked at Basket Notes but it wasn’t the same thing. And there are others programs that I can’t remember at the time.
I’d still say that KDE 4 is in a beta state. I’ve had three good crashes, one that required creating an all new ~/.kde4, another that required I create a whole new user, new user enter KDE, logout, login normal user to fix, and another where “Plasa Workspace crashed”. To fix:
mv ~/.kde4/share/config/plasma-appletsrc ~/.kde4/share/config/plasma-appletsrc.old
These all happened in the first two weeks and I haven’t seen one since.
I’m glad I’ve tried KDE. It’s a good desktop and I’ve enjoyed it quite a bit. When Gnome returns I’m going to have a tough decision, but for now, I’m happy where I’m at.
References
Creating a Unique Device Node
Creating a unique device node may be needed because the kernel assigns device nodes names, for some devices, in a non-static manner. When the kernel adds a device node, naming can appear random (i.e. /dev/sda1, /dev/sdb1…) each time the device is plugged in – particularly with dynamic hardware. Hardware can range from USB flash drives, hard drives, cameras, but can include non-usb devices as well. Rules can be created with udev that can assign unique device nodes to each device.
Benefits of Unique Device Nodes
Having unique device nodes is particularly useful for bash scripts to backup to a specific external hard drive, or copy mp3 files to an mp3 player. It also can make using UUID’s in fstab unnecessary – see Getting Gnome Volume Manager to Play Nice.
Getting the Kernel Device Node for USB Devices
For USB storage devices (memory sticks, external drives, mp3 players…) find the kernel device node by plugging it in and running:
$ fdisk -l ... Device Boot Start End Blocks Id System /dev/sdb1 * 1 2010 996944+ 6 FAT16
Omitting the partition number, the kernel defined device node for this storage device is /dev/sdb. Looking at the tail end of ‘dmesg‘ may give the device node. To get USB printer kernel defined device nodes look in the /dev directory for ‘/dev/lpX‘ entries.
Getting Info from the Device
Use udevadm to get information about the device. With this information, a udev rule can be created to give the device a unique id (device-node).
udevadm info -a -p `udevadm info -q path -n /dev/sda`
In the ouput of ‘udevadm‘ look for unique keys in the section for the device. The example here is for an mp3-player:
ATTRS{manufacturer}=="SanDisk Corporation"
ATTRS{product}=="U3 Cruzer Micro"
ATTRS{serial}=="0000176C6960E789"
All devices will be different, if these keys don’t exist, look for idVendor and idProduct.
Creating a udev Rule
With these keys it’s easy to create a unique rule that applies to the device. Udev keeps it’s rules in /etc/udev/rules.d/. New rules are to be put in /etc/udev/rules.d/10-local.rules (create the file if it doesn’t already exist).
sudo vim /etc/udev/rules.d/10-local.rules # /etc/udev/rules.d/10-local.rules # # udev rules for local
Rules are in the form of:
key, [key,...] NAME [, SYMLINK]
All thats needed is a single unique key followed by the name wanted for the device node (‘NAME=""‘). ‘SYMLINK is optional but can be used to create an extra node (e.g. printers/hp_220). It’s a good idea to have ‘NAME=""‘ as the kernel named device node as some programs look for it. Also it’s a good idea to have a key defining the parent device (BUS=="usb" below) to help Gnome and KDE volume managers.
In defining the rule use double equal mark for compare keys and a single equal mark to assign values. I like to use product and serial keys:
# SanDisk U3 Cruzer Micro - 1 GB Flash Drive
BUS=="usb", ATTRS{product}=="U3 Cruzer Micro", \
ATTRS{serial}=="0000176C6960E789", \
NAME="%k", SYMLINK="sandisk_u3_cruzer_micro"
For older versions of udev “SYSFS” is used in place of “ATTRS“.
Notice the use of ‘%k‘ for the ‘NAME=""‘ value. Using ‘%k‘ designates to use the kernel named device node. Another key to use if “udevadm info...” doesn’t give much info is KERNEL=="". Define the kernel device node generically with KERNEL=="sd*" or whatever the kernel device node begins with.
With the udev rule, programs can also be told to run a script or program with RUN+="".
# SanDisk U3 Cruzer Micro - 1 GB Flash Drive
BUS=="usb", ATTRS{product}=="U3 Cruzer Micro", \
ATTRS{serial}=="0000176C6960E789", \
NAME="%k", SYMLINK="sandisk_u3_cruzer_micro" \
RUN+="/home/dirk/.bin/configuration-backup"
To test if the device node is created, save the file, unplug the device and plug it back in.
Easy Method of Creating a Device Node for a USB Device
From Gentoo Wiki Archives.
emerge sys-apps/usbutils
Output devices using USB:
lsusb idVendor:idProduct Bus 001 Device 005: ID 0781:7400 SanDisk Corp. Bus 001 Device 001: ID 1d6b:0002 Bus 002 Device 004: ID 046d:c03d Logitech, Inc. Bus 002 Device 001: ID 1d6b:0001
‘lsusb‘ displays “idVendor” and “idProduct” keys. Using these two keys together will create a unique enough rule:
sudo vim /etc/udev/rules.d/10-local.rules
# SanDisk Sansa m240 mp3 player
BUS=="usb", ATTRS{idVendor}=="0781", ATTRS{idProduct}=="7400", \
NAME="sandisk_sansa_m240"
/etc/fstab
Remember to add the new device nodes to the fstab file.
References:

