Saturday, February 7, 2009

Burning video DVDs

Burning a data DVD under Ubuntu: easy. Brasero has a relatively straightforward interface. Burning a data DVD under KDE3: easy. K3b's interface is probably even more straightforward. Burning a data DVD under KD4: less easy. K3b has not yet been ported to the KDE4 framework. K3b does currently work on this computer, but it meant installing KDE3 libs. Good luck doing that on, say, Fedora, which I'm told no longer makes KDE3 packages available in their repos.

Burning a video DVD under any version of Linux: hard. Neither Brasero nor K3b offers an obvious way of doing it. There is a menu option in K3b called "new video DVD project", but it isn't obvious to me that it does what I want it to do: convert miscellaneous types of video files into something that will play on a regular DVD player, and burn each individual video as a separate chapter on the DVD.

Fortunately there is a not-nearly-as-intimidating-as-it-looks guide to doing it all using command line tools. For bonus points, it lets you create a menu for the video DVD as well. It's the tovid suite of tools, and instructions for using them are available here.

HOWEVER, be warned. The tovid package for Ubuntu does not put the commands "makemenu", "makexml" and "makedvd" in locations that are in your $PATH (ie they will not be run if you type their names at the command line the way the linked instructions tell you to do). They are stored in the directory /usr/share/tovid/ instead. This was apparently done deliberately by the package maintainers. See post 8 on this thread at the Ubuntu forums:
This is not a bug.

These utilities were diverted because they're low-level utilities and most users aren't interested in them. Moreover, the names are too generic, resulting in namespace pollution. "makemenu"? "makexml"?

The result is slightly annoying, but not a showstopper once you understand the problem. You just have to remember to call the commands by their full path. For example, instead of typing "makemenu" you type "/usr/share/tovid/makemenu". The Ubuntu thread linked above has instructions about how to stop having to always do that if it gets too annoying.

Touchpad Configuration and some sudo issues

The documentation for configuring a Touchpad under Ubuntu was most helpful, but didn't quite go far enough. I don't much like touchpads. Maybe it's just me but I could never get used to the whole "tapping can act like a mouse-click" part. The usual effect of it was that I would inadvertently tap the touchpad when moving the cursor, causing the computer to believe I'd "clicked the mouse" at times when that was the last thing I wanted to do.

GNOME's configuration had an easy way to turn off the behaviour. But it only worked in GNOME. The instructions linked above about enabling SHMConfig in a configuration file and then using the gsynaptics application to configure the touchpad was effective enough - once. Unfortunately gsynaptics didn't keep a permanent record of my changes, which meant that I had to manually disable the "touchpad tap" thingy each and every time I booted up anew.

I forget where I read the solution - I think it was an Ubuntu forum - but there is a way of ensuring that the "touchpad tap" is permanently disabled via the same configuration file used to enable SHMConfig. The resulting contents of the file /etc/hal/fdi/policy/shmconfig.fdi looks like this on my system:

<?xml version="1.0" encoding="ISO-8859-1"?>
<deviceinfo version="0.2">:
<device>
<match key="input.x11_driver" string="synaptics">
<merge key="input.x11_options.SHMConfig" type="string">True</merge>
<merge key="input.x11_options.MaxTapTime" type="string">0</merge>
</match>
</device>
</deviceinfo>

All I've done is add an extra line to the recommended contents of the file used to enable SHMConfig: setting the "MaxTapTime" value to zero, which disables the tap.

Sidepoint: while gksudo is the preferred method in GNOME for starting graphical applications with super-user privileges from the commandline, a KDE version also exists called "kdesudo". It's used in the same way, so creating and editing the file "/etc/hal/fdi/policy/shmconfig.fdi" using KDE's text editor (named "Kate") would be done with the following command:
kdesudo kate /etc/hal/fdi/policy/shmconfig.fdi

Link

For an overall guide to the subsystem that manages and configures the keyboard on modern day Linux desktops: An Unreliable Guide to XKB Configuration. More an overview of the X Keyboard Extension (XKB) itself than any kind of how-to manual for specific tasks, please note.

Monday, February 2, 2009

Keyboard fixed

Well that was easy. I just had to change the keyboard layout from pc104 to pc102 (the international version), and now I'm typing apostrophes and "quotation marks" properly.

The command "kcmshell4 keyboard_layout" brought up a window to let me easily configure it: select "Enable Keyboard Layouts" and hit the "Apply button". I then switched from the "Generic 104-key pc" option that I apparently selected at start-up to "Generic 102-key (intl) PC". If I read it right then it configures the keyboard for all X sessions, not just when I'm running KDE.

The keyboard_layout module lists the command it's using at the bottom of the window, in a linebox appropriately named "Command". The actual command that I ran, called setxkbmap, is, I believe, the keyboard configuration utility for the X server. I basically used a graphical tool to run the terminal command "setxkbmap -model pc102 -layout us -variant". Crude, but effective. I'm sure the manpage will provide helpful details on what all those options actually do now that I know they exist.

Hmmm...the apostrophe key was previously letting me do stuff like type the letter o with an umlaut. I wonder where that functionality has gone now? I vaguely recall something about a "compose" key to allow input beyond what appears on a standard anglo keyboard. Which key is the compose key now that my apostrophe key is not?

Discovery: kcmshell4

I just discovered the command line tool kcmshell4. This would appear to be a configuration utility for KDE4 that goes beyond that provided by its ¨System Settings" graphical tool. Or perhaps the two are related somehow, I don´t know.

In any case, if you type ¨kcmshell 4 --list¨ at the command line, you get a quite extensive list of what look to be more advanced configuration options.

Hmm....¨kcmshell4 standard_actions" brought up the configuration window that appears by going to K->System Settings->Keyboard & Mouse->Standard Keyboard Shortcuts¨. I´m guessing kcmshell4 is the configuration utility and System Settings is the front-end.

I found this out because I was trying to use a utility called Kxkb, but it wasn´t coming up when I called it by name. The Kxkb help page said that you could access Kxkb using the command ¨kcmshell4 keyboard_layout¨ from the terminal, which did work for me, and led me to discover this useful-looking little tool.

Curious that there are configuration options that don´t (yet) appear in the graphical frontend to the configurator thingy. I wonder what all those other options do?

I also wonder if the Kxkb functionality will fix the problem I´m having with the apostrophe key. I don´t know for sure, but I think I´m on the right track (I´m assuming a Dell Inspiron 1525 doesn´t necessarily use the default 104-key pc keyboard layout. I also have a sneaking suspicion that the option to change the keyboard layout was more visible in GNOME than it was in KDE, but this exercise is about discovery, not taking the easy path).

Intro

I´ve found my way back to Linux after a long time away. A lot has changed, and I was never what you´d call a ¨power user¨ to begin with, so there´s a lot to learn. I thought I´d keep a blog to document things I find as I go along.

This isn´t going to be any kind of user guide, although I do sort of hope that any solutions to problems that I find will appear in a Google search for someone else having that problem. Basically I´m interested in trying to give even a little bit back to the Free Software/Open Source world that has given me so much.

I start this blog with Kubuntu already installed on a Dell Inspiron 1525 laptop. I have also used the repository at ppa.launchpad.net to install experimental debs of KDE4.2. So far, so good.

Next up...well, my blogging has always been a bit lackadaisical, so it could be one of two things, depending on which one I get around to first: documenting how I set my laptop´s touchpad how I wanted it, or anything I find on figuring out why my apostrophe key seems to be behaving strangely.

Some people might find such quirks annoying. I find them to be an interesting problem, and a convenient excuse to peak under the hood. I am genuinely interested in learning how things like HAL and D-BUS actually work.