Geeks In Action

Life, the Universe and Everything

Browsing Posts tagged kde

I wanted to create a keyboard shortcut for locking the screen on my Fedora machine. I wasn’t sure what to do and my Google searches on what seemed the right terms weren’t too helpful either. It took some poking around but I finally put it together. If you are in the same boat, I’m hoping this will help you out and save you some leg work. (And by the time I need to do it again I’ll have probably forgotten some of it and need this too. :) Everything here was done on KDE 4.3.4, Fedora 11. Click on the little pictures for bigger pictures.

The place to start is System Settings. I have System Settings as one of my favorites in my application launcher, but thankfully it doesn’t matter where you have it. Just search for “System Settings” in your launcher and there it will be.

system_settings

There are two items in the Systems Settings that we’ll look at. They are “Input Actions” and “Keyboard & Mouse”. Which hopefully makes sense. Keyboard & Mouse is where we will go to see what keyboard shortcuts are in place. Input Actions is where we will go to create a new shortcut.

sysset_inputact sysset_keymouse

Opening Keyboard & Mouse, we can see a few items on the left side such as Keyboard, Mouse, Joystick, Standard Keyboard Shortcuts and Global Keyboard Shortcuts. We are of course interested in the keyboard shortcuts. It is worth taking the time to click on both and see what is already defined. Many in the Standard Keyboard Shortcuts should look familiar. There may be some you don’t know. They can be changed right here. Would you like copy to be ctrl+v and paste to be ctrl+c? Go ahead and switch them around. Some are not defined, you could do so if you like.

sysset_standard

Global Keyboard Shortcuts is set up a bit differently. The shortcuts are grouped by KDE Component. I am currently unaware of any way to view them (or search them) all at once. This is unfortunate, hopefully it will be corrected in the future, and may already be fixed. One of the reasons I love Fedora is the frequent updates. But back to global shortcuts, here are a couple assigned to the KDE Daemon for changing monitor brightness, not something I use with my desktop machine but a real must for laptops.

sysset_global

I have to confess, my expectation was that I would add what I wanted here, much like how I would change standard shortcuts here. That is not the case. To add global shortcuts we need to move back to System Settings and choose Input Actions. Then in the left panel, we need to right click to get a drop down menu. The options I used are New -> Global Shortcut -> D-Bus Command. This will immediately create a space to type in a name for the new shortcut. Oddly enough, I called mine “Lock Screen”. Here are both steps.

new_global_dbus Typing a new name for the global shortcut.

What remains is to fill in the three tabs on the right, “Comment”, “Trigger” and “Action”. The first two are drop dead easy. For the comment type in whatever comment you want to have. For the trigger, I just clicked on the little button with a wrench, and then pressed the keys I wanted to use. In this case it was Ctrl+Alt+Del, so that this matches what I do to lock a Windows machine.

new_global_comment new_global_trigger

The last part took just a touch longer to crack. As you may remember I’d chosen to make this shortcut a D-Bus Command. Well, here is where I tell it just which D-Bus command I want kicked off by this key combination. It took a bit of digging, but if you look to the bottom of the “Action” tab you’ll see two buttons. One says “Call” and the other “Launch D-Bus Browser”. Browser sounded good so I clicked on it and started browsing. There’s a ton of stuff in there and it was a bit overwhelming. Google helped sort things out. Here I will insert a word of caution. I learned that double clicking on an entry in “Methods” would fire it off. This could potentially be an issue, tread lightly. Why did I double click something? I was sort of hoping I could pick what I wanted, double click it and have the Action tab automagically populated. No such luck. Another great potential feature for this software. So once I found what I wanted, the method to lock the screen, I needed to figure out how to fill in the tabs. Fortunately the Call button let me test my attempts to get it right. Again, I’d be a bit careful here depending on what kind of stuff you are calling, but for locking the screen, I was good. I’ve got shots below of the blank form, the browser showing what method I wanted and then the action tab properly filled in for that method. After that it was just a matter of hitting “Apply” to make it stick. The last screen shot is back at Global Shortcuts under Keyboard & Mouse – showing that my Lock Screen shortcut has been added to the KDE Component khotkeys.

new_global_action_blank new_global_viewer new_global_viewer_filled done

It is possible to do this other ways. This is the one that I am most comfortable using, but if you are aware of an issue with how I’ve gone about this, please let me know. There’s a ton more available in Input Actions, like gestures and the ability to run a command or load a url. This is where one could connect special keys on a keyboard to their desired actions. Just click the wrench button on the trigger tab and hit the key you want. If your choice is already bound to some action, you should get a message box that pops up and lets you know. Maybe I’ll follow this up with some more ways to set up Input Actions. It’s a great utility that can really increase productivity.

Linux Mag says that KDE for Windows is in trouble due to a lack of participation and coordination between those who are active. I can’t say I’m surprised even though I’ve only looked at it from the user side.

I installed it, ran it for a bit and got rid of it. Too buggy. And the thing is, KDE runs great on my Fedora box without all those issues. Some hope it would be a gateway to Linux for Windows only folks (that’s my guess anyway) but I doubt it. Certainly not in its current state and it would take a ton of work to get it there.

KDE 4.1 Desktop

No comments

I’ve been messing with KDE 4.1 on my Fedora box for some time now. This is an older machine – so I don’t normally have special effects turned on. They work o.k. but things do get just a touch laggy and I don’t like that. With them off, things are snappy – which I think is pretty impressive. I’ll just throw a few screen shots below the jump. continue reading…

This is welcome news on the desktop front. KDE 4.0 was getting ripped pretty well, but I think people were premature to jump in that direction. I’m still running Fedora 7 at work – I’ll move that to 9 this week so I can update to KDE 4.1 and give it a spin.

Multimedia Keyboard

No comments

At work I use a Microsoft keyboard that has a bunch of keys up at the top for special functions. There is one for firing up a web browser, back and forward buttons, mail, search and some media player buttons for play/pause, and volume stuff. I’ve never really used them – but I was looking at them today and thought, “I should use those.” Now when I say that – I mean I should use them for my main work machine which is running the Fedora distribution of Linux. Getting them to work wasn’t hard – and didn’t take too much searching.

The key was finding the right keyboard layout for KDE. Getting to the layout was interesting. I opened up the KDE Control Center and there is a Peripherals section – but the keyboard item there just has a couple options that deal with repeat rate and numlock settings for startup. The stuff I wanted is under the Regional & Accessibility section in Control Center.

The section that was a little trick to get right is the Keyboard Layout. I clicked on that section and then on the layout tab checked the “Enable keyboard layouts” box. Once I did that then the Keyboard model dropdown box became available. I have a Microsoft Comfort Curve Keyboard 2000, according to the sticker on the bottom. There was no corresponding description. I tried a few Microsoft models but things didn’t seem to be lining up just right. Certain buttons would work but others wouldn’t. I got tired of shooting in the dark pretty quickly. So rather than keep on, I did a quick google on keyboard layouts for Linux. That took me to this very nice article on using multimedia keyboards with linux.

Now that article just bypasses the desktop stuff and deals with X. I still wanted to use KDE if I could and what was helpful here was seeing that xbindkeys had a mode where it would show just what a keypress was sending. Installing xbindkeys took about 10 seconds (yum install xbindkeys) and then I fired it up. I switched between control center and that program – switching through the various keyboard models and looking at the output. It just took a minute or two to realize that the keyboard model I wanted was “Microsoft Natural Keyboard Pro OEM”.

Once that was done, all my buttons on my keyboard were being sent. All that was left then was matching them up to what I wanted them to do. In some cases KDE already did this for me. The volume keys, the forward/back keys were set up automagically. Launching applications I needed to do, because it is up to me what apps will launch.

In the same part of the control center that handles the keyboard layout there is another section – Keyboard Shortcuts. That makes it easy to choose key strokes to fire off apps among other things. There is also a section, Input Actions, that can be used to set up mouse gestures and keyboard shortcuts. The gestures and shortcuts can be tied to launching apps or DCOP calls. Very nice stuff.

On a side note – and an appreciated bonus – once my model was right – synergy passed all keys correctly to my windows machine that I use at work. There was no setup needed for that. They just shoot right on over.

I’m not sure if I’ll use them much. I just like knowing I can if I want to.

Edit: I just redid this on a new Fedora 10 install – to get to the place to set the keyboard in KDE 4 it is now “System Settings” instead of Control Center. Everything else should be pretty much the same.