Enabling Media Keys on the Saitek Eclipse II Keyboard (Ubuntu 8.04 and most other Linux distros)
Monday, June 23, 2008
One of the few problems I experienced in my recent fresh install of Ubuntu 8.04 (Hardy Heron) was the non-functionality of the media keys on my Saitek Eclipse II keyboard. This problem came as quite the odd surprise, seeing as the keys worked great in 7.04 and 7.10. It has always been puzzling to me that a new release can actually take a step backwards in terms of device compatibility... but what do I know? I don't code it, so it must be harder than it looks.
Either way, I soon set out to find a solution for this irksome issue I had on my hands. Who would have guessed that salvation came in the form of a Gentoo wiki page? Nice eh? Well, if you have explored that link a bit, you may note that it is quite lengthy and perhaps just a tad confusing for the Linux newbie. So... I bring you my simplified version! I have taken only the essential steps that were required to get the media keys on my Saitek Eclipse II keyboard working. I am sure that the guide works for other keyboards as well.
The first step of this process is find the raw scancodes that the kernel spits out and X interprets when a key is pressed. To do this in a nice, simple fasion, issue the following command and press the keys you would like to configure in an order that you can remember:
Close the window when you are done. There should be an out put left that looks somewhat like so:
The first line isn't actually a media key, so just ignore/ delete it.
Now, we must set up xmodmap to recognize the keys and assign them their proper keysyms. In your home directory, create a file named .Xmodmap. In this file, you will enter the appropriate keysysm to match the media key. My file ended up looking like this:
You can find all possible keysyms listed in the following file on Ubuntu: /usr/share/X11/XKeysymDB.
This should now all be automatically loaded at startup. If it doesn't... try:
Now that we have the keys properly identified and configured, we can assign them to the actions of our choice. I like to have my keys set up in Amarok, so I set the to their respective functions under Settings > Configure Global Shortcuts. You can also set the keys through gnome by going to System > Preferences > Keyboard Shortcuts. However, in the past, I have noted that this can cause conflict with Amarok, so I usually just leave the keys disabled in the Keyboard Shortcuts dialog (Amarok will handle them just fine that way).
If all went well, that should get you full support for you mutlimedia keys in Ubuntu and Amarok. If it doesn't work, then take a look around the wiki page... maybe you will find something that fixs the issue or (even better) inspires you to come up with your own hacks and workarounds :D
Have fun!
Note from the Nerd: Many thanks to the people who contributed to the Gentoo wiki page I have so extensively referenced in this post!
Either way, I soon set out to find a solution for this irksome issue I had on my hands. Who would have guessed that salvation came in the form of a Gentoo wiki page? Nice eh? Well, if you have explored that link a bit, you may note that it is quite lengthy and perhaps just a tad confusing for the Linux newbie. So... I bring you my simplified version! I have taken only the essential steps that were required to get the media keys on my Saitek Eclipse II keyboard working. I am sure that the guide works for other keyboards as well.
The first step of this process is find the raw scancodes that the kernel spits out and X interprets when a key is pressed. To do this in a nice, simple fasion, issue the following command and press the keys you would like to configure in an order that you can remember:
xev | sed -n s/"^.*keycode *\([0-9]\+\).*$"/"keycode \1 = "/p | uniq
Close the window when you are done. There should be an out put left that looks somewhat like so:
keycode 36 =
keycode 144 =
keycode 162 =
keycode 164 =
The first line isn't actually a media key, so just ignore/ delete it.
Now, we must set up xmodmap to recognize the keys and assign them their proper keysyms. In your home directory, create a file named .Xmodmap. In this file, you will enter the appropriate keysysm to match the media key. My file ended up looking like this:
keycode 162 = XF86AudioPlay
keycode 164 = XF86AudioStop
keycode 144 = XF86AudioPrev
keycode 153 = XF86AudioNext
You can find all possible keysyms listed in the following file on Ubuntu: /usr/share/X11/XKeysymDB.
This should now all be automatically loaded at startup. If it doesn't... try:
/usr/bin/xmodmap $HOME/.Xmodmap
Now that we have the keys properly identified and configured, we can assign them to the actions of our choice. I like to have my keys set up in Amarok, so I set the to their respective functions under Settings > Configure Global Shortcuts. You can also set the keys through gnome by going to System > Preferences > Keyboard Shortcuts. However, in the past, I have noted that this can cause conflict with Amarok, so I usually just leave the keys disabled in the Keyboard Shortcuts dialog (Amarok will handle them just fine that way).
If all went well, that should get you full support for you mutlimedia keys in Ubuntu and Amarok. If it doesn't work, then take a look around the wiki page... maybe you will find something that fixs the issue or (even better) inspires you to come up with your own hacks and workarounds :D
Have fun!
Note from the Nerd: Many thanks to the people who contributed to the Gentoo wiki page I have so extensively referenced in this post!
A Look at the Latest Ubuntu (8.04 "Hardy Heron")
Hello all! I start this summer's posting off with a review of the topic that is on everyone's mind... of course... the new Ubuntu release! Or rather, it was on everyone's minds. Seeing as I just didn't have the time to crank out a review during the entire post-release-blog-all-you-can-about-Ubuntu hype fest, I bring you my review now and hope that it reaches just a few of you out there. Let's get started.
Installation
What can I say, I love Ubuntu installations! As with most previous releases, Hardy Heron comes on a nice LiveCD through which you can dip your toes into Linux and decide whether or not to take the plunge. As for me, I've done my fair share of dabbling, so I tend to just boot up the CD to see if the preliminaries work (wifi, sound, video(ish), etc). With Ubuntu, there is a great probability that a large percentage of your hardware will be detected (if not, as in many cases, all) and configured properly right off the bat.
On loading the CD, you have the choice to try the "Try Ubuntu Without Making Any Changes to Your System", go straight to the install, boot normally, check the CD for defects, or test memory. Choosing the "Try Ubuntu Without Making Any Changes to Your System" will get you into the nice LiveCD mode. From there, you can test out your internet connectivity and check and see if your basic hardware has been detected. Clicking the installer icon on the desktop will start the installer.
The installer is excellent as usual, and even the unassuming Linux newbie can figure out what to do. Most of the process consists of the standard language/ time/ user/ password setup. The installer also features an assistant to help import your bookmarks and other preferences from older versions of Ubuntu or other operating systems. My favorite part of Ubuntu's installer continues to be the integration of the nice gparted disk partitioner GUI. It really makes a difference seeing how the hard drive is layed out. Other distributions like openSUSE don't have this nice visual aid and can be confusing. Ubuntu really has it figured out.
In its entiretity, the install was amazingly simple. The total install time on my AMD 3700+ system was about half an hour (about 10 min of which were spent messing w/ my partition scheme).
First Impressions and Usability
Usually, this is the time when I grip about how ugly Ubuntu looks... but honestly.. why bother? I can theme it all I like, and quite seriously, Ubuntu has a much more refined look than any other distribution I have ever come across. I'm actually kinda warming up to the whole brown-orange theme. In Hardy Heron especially, I find it to be tastefully done and altogether not all too obtrusive.
Ubuntu scores big again on hardware support in Hardy Heron. All my devices worked and required practically zero configuration. The exceptions to this are my wireless connection (rate set at 1MB/s on startup) and the media keys on my Saitek Eclipse II keyboard. I'll discuss my solutions to these problems in upcoming posts.
Media support is great again too. The helpful codec installer gets you all the plugins and codecs you need to jam to your favorite mp3s and ogle at your beloved DVDs. I immediately installed Amarok, seeing as it is the single best media player in existence and greatest thing since pre-compiled kernels (aka good stuff).
Not sure what else to say... everything just worked :-) Compiz can be simply enabled after installing the nvidia driver through the restricted driver manager and provides several levels of desktop-effects goodness.
Overall
Overall, Ubuntu 8.04 (Hardy Heron ) is another great release in the Ubuntu line, and surely deserves the prestigious "LTS" (Long Term Support) title that accompanies it.
So, this hasn't been quite as inclusive as some of my other reviews, but I'll be churning out a few other posts to explain my fixes for my keyboard and wireless issues. I'll also update the review as I see fit (hoping that some more inspiration will randomly come to me). Hope you enjoyed what I did have :-) I'm slowly getting back into the blogging world, so give me some time to re-adjust.
Peace out everyone! And remember, have some fun with Linux this summer!
Installation
What can I say, I love Ubuntu installations! As with most previous releases, Hardy Heron comes on a nice LiveCD through which you can dip your toes into Linux and decide whether or not to take the plunge. As for me, I've done my fair share of dabbling, so I tend to just boot up the CD to see if the preliminaries work (wifi, sound, video(ish), etc). With Ubuntu, there is a great probability that a large percentage of your hardware will be detected (if not, as in many cases, all) and configured properly right off the bat.
On loading the CD, you have the choice to try the "Try Ubuntu Without Making Any Changes to Your System", go straight to the install, boot normally, check the CD for defects, or test memory. Choosing the "Try Ubuntu Without Making Any Changes to Your System" will get you into the nice LiveCD mode. From there, you can test out your internet connectivity and check and see if your basic hardware has been detected. Clicking the installer icon on the desktop will start the installer.
The installer is excellent as usual, and even the unassuming Linux newbie can figure out what to do. Most of the process consists of the standard language/ time/ user/ password setup. The installer also features an assistant to help import your bookmarks and other preferences from older versions of Ubuntu or other operating systems. My favorite part of Ubuntu's installer continues to be the integration of the nice gparted disk partitioner GUI. It really makes a difference seeing how the hard drive is layed out. Other distributions like openSUSE don't have this nice visual aid and can be confusing. Ubuntu really has it figured out.
In its entiretity, the install was amazingly simple. The total install time on my AMD 3700+ system was about half an hour (about 10 min of which were spent messing w/ my partition scheme).
First Impressions and Usability
Usually, this is the time when I grip about how ugly Ubuntu looks... but honestly.. why bother? I can theme it all I like, and quite seriously, Ubuntu has a much more refined look than any other distribution I have ever come across. I'm actually kinda warming up to the whole brown-orange theme. In Hardy Heron especially, I find it to be tastefully done and altogether not all too obtrusive.
Ubuntu scores big again on hardware support in Hardy Heron. All my devices worked and required practically zero configuration. The exceptions to this are my wireless connection (rate set at 1MB/s on startup) and the media keys on my Saitek Eclipse II keyboard. I'll discuss my solutions to these problems in upcoming posts.
Media support is great again too. The helpful codec installer gets you all the plugins and codecs you need to jam to your favorite mp3s and ogle at your beloved DVDs. I immediately installed Amarok, seeing as it is the single best media player in existence and greatest thing since pre-compiled kernels (aka good stuff).
Not sure what else to say... everything just worked :-) Compiz can be simply enabled after installing the nvidia driver through the restricted driver manager and provides several levels of desktop-effects goodness.
Overall
Overall, Ubuntu 8.04 (Hardy Heron ) is another great release in the Ubuntu line, and surely deserves the prestigious "LTS" (Long Term Support) title that accompanies it.
So, this hasn't been quite as inclusive as some of my other reviews, but I'll be churning out a few other posts to explain my fixes for my keyboard and wireless issues. I'll also update the review as I see fit (hoping that some more inspiration will randomly come to me). Hope you enjoyed what I did have :-) I'm slowly getting back into the blogging world, so give me some time to re-adjust.
Peace out everyone! And remember, have some fun with Linux this summer!