KDE web shortcuts

There is a saying in Russia, that can be translated something like this: “Live for a century, learn for a century.” Some people go as far as add “And you’ll die a fool.”. Well, sometimes I feel that it’s true as nothing else. I’ve learned another bit about KDE today. It a simple, but very useful trick. It could have saved me tonnes of time. It will save me tonnes more.

If you ever browsed through menus of Konqueror (konqueror » Settings » Configure Konqueror » Web Shortcuts), KDE’s web browser and file manager, or went into all the million options that kcontrol (kcontrol » Internet & Network » Web Browser » Web Shortcuts) allows you to tweak, you might have seen something called “Web Shortcuts”. Web shortcuts is a feature that helps you save some typing when browsing the web. For example, instead of navigating Konqueror to http://www.google.com, than typing your search query, and pressing the submit button, you can simply type “gg:search query” in Konqueror’s address bar, and it will automatically take you to the Google’s results for “search query”. There are lots and lots of web shortcuts that come predefined with KDE and you can edit them, delete them, and define your own. This is an excellent feature, but the limitation of it for me always was that I am using Mozilla Firefox for browsing and not KDE’s Konqeuror.

Today I learned that this limitation is artificial and does actually exist. I can easily use it with Mozilla Firefox or any other browser (and not only browser) that I want. It turns out that these web shortcuts work separately from Konqueror. You can use them from the “Run Command” dialog in the Start Menu (or by pressing Alt+F2). Instead of the command just type “gg:search query” and you’ll get the result in your default browser.

If you did so, and still get Google results in Konqueror, it means that Konqueror is set to be your default browser. What you can do is edit KDE’s file associations. You can find all file associations in kcontrol » KDE Components » File Associations. For the web browser you basically need to change only application/xhtml+xml, text/html, and text/xml.

Suddenly, half of the Web is available to you at much shorter distance than before. There are shortcuts for virtually all search engines, several dictionaries, function references of a number of programming languages, quotation searches, encyclopedias, etc.

Have your breaks in time with KDE

I’ve already talked about KDialog and DCOP which are two magic KDE tools that could use more promotion. Today I came across another nice examlpe in this post.

#!/bin/bash

PROGRESS=$(kdialog --icon kalarm --title "Short rest" \
    --progressbar "Take a break..." 30)

if [ $PROGRESS ]; then
  for (( i=0; i<30; i++ )); do
    dcop $PROGRESS setProgress $i
    sleep 1
  done
  dcop $PROGRESS close
fi

This simple shell script will remind you to have timed 30 second breaks when executed at predefined intervals from KAlarm. You'll see a nice progress bar while having a break.

How to switch the go-around-desktops thingy in KDE

KDE is an excellent desktop with reasonable defaults. One of the defaults does not work for me though. It annoys me beyond limits that switching desktops wraps around. That is when I am at the left-most desktop and I press Ctrl+Left arrow, which is my key for switching one dekstop to the left, I find myself at the right-most desktop. With this behaviour I am getting lost pretty often and have to use the pager, which means that I have to take my eyes off that thing that I am currently doing and break my concentration.

But there is nothing to worry about. KDE can be very flexibly configured using several methods. Switching off mad desktop navigation is as easy as clicking a couple of times in kcontrol. The needed option is in Desktop » Window Behavior » Desktop navigation wraps around.

knoda – KDE’s front-end to databases

knoda is one of those cool looking and functionally promising projects. If you are still looking for graphical interface for database management, then try it out.

Its driver concept allows a uniform connection to different database servers (Dbase/Xbase, MS Access/Mdbtools, Mysql , Postgresql , SQLite or ODBC).

Did you notice that MS Access was mentioned? Well, here is a little more for you to know:

New test version knoda 0.7.4-test1 released. With its latest release knoda introduces a driver for MS Access databases (mdb files). Knoda is the first KDE based database frontend reading MS Access databases natively and so it is getting closer to its goal to be a full replacement for MS Access. The driver is based on Mdbtools.