Wednesday, April 25, 2007

Controlling KDE applications from the shell

I came across this the other day on accident:

kfmclient --commands

You can do a rather fascinating number of things to KDE in the shell through kfmclient, including opening a new Konqueror window, opening a new tab in an existing Konqueror window, starting an application from its ".desktop" file, rearrange/refresh your desktop, copy and move files (I presume this would include copying to/from the various IOSlave protocols like fish://).

Try these, for example:

kfmclient newTab 'url'
kfmclient exec .

Since quotes work as well as ticks ( ' ), you could wrap this into a shell script like this:

kfmclient newTab "$somedest"

I haven't come up with any terrific uses for this yet, but it's promising.

Thursday, April 19, 2007

Revisiting the CPAN initial configuration screen

Recently I made a fresh install of Debian Etch from a NetBoot disk and started installing CPAN modules before I realized the compiler tools - make, gcc, automake, autoconf and friends - are not part of the default NetBoot minimal install (Ok, so I wasn't thinking. That's why it's called minimal, after all.)
Most of the CPAN packages would not compile, returning various make errors. I was stumped when they still would not make after installing make and the other tools, until I realized that CPAN was not able to find make in the PATH during it's initial configuration.
The may be a faster way to do this, but I decided to run the initial configuration again to CPAN would pickup make.
The way I found to do this is open CPAN:

perl -MCPAN -e shell

and then type:

o conf init

to reconfigure.

Tuesday, April 10, 2007

When a short sudo timeout drives you crazy . . .

I've recently discovered an easy configuration option for sudo to make the timeout a little longer.
Just add the following line to your /etc/sudoers config file:

Defaults:your_username_here timestamp_timeout=900

(using your actual system username instead of "your_username_here")
The number at the end is how many seconds you want sudo to wait before prompting for a password again.