Linux

Cherry Linux keyboard and Java

Submitted by gunnar on

Since I couldn't get the KeyMan utility that came with my Cherry keyboard to work with SuSE 10.3 I had problems getting the Cut, Copy and Paste keys to work. I tried using the KDE KHotKey service instead, and by defining input actions that map these keys to Ctrl+X, Ctrl+C and Ctrl+V I could use them in most applications.

Starting with Java 1.6 though, this isn't enough. Seems like Java can't handle mappings made for KHotKeys. To get the keys to work with Java applications I had to do two things:

Editing crontab for QNAP, and making it stick

Submitted by gunnar on

If you have a QNAP you may want to run some scripts regularly. Editing the crontab seems to work but your changes don't survive a reboot. There is however a fairly simple solution:

During boot, the QNAP will mount the partition /dev/mtdblock5 in /tmp/config and execute the file autorun.sh in this directory, if it exists. The following steps show you how to create the file with the commands necessary to add a crontab entry:

First, mount the partition, cd into the config directory and edit or create the autorun.sh file:

Mailing files from Konqueror

Submitted by gunnar on
Question

I want to right click on one or more files in Konqueror and create a new mail with the files as attachments. Is this possible?

Answer

Yes, by creating a service menu entry.

In the directory .kde/share/apps/konqueror/servicemenus, relative to your home directory, create a file called sendto.desktop with the following contents:

[Desktop Entry]
Actions=SendToMailRcp
Encoding=UTF-8
ServiceTypes=all/allfiles
X-KDE-Priority=TopLevel
X-KDE-Submenu=Send To

[Desktop Action SendToMailRcp]
Name=Mail Recipient...
Exec=kmail --attach %F
Icon=kmail

Using KMail from Firefox

Submitted by gunnar on
Question

How do I get Firefox to open mailto-links with KMail and use KMail from Tools/New Message?

Answer

For some reason this IMO important configuration setting hasn't made it into the Preferences dialog but it is available:

  1. Open the "about:config" page.
  2. Type "mailto" in the filter field.

Specific NIC for bridged network

Submitted by gunnar on
Question

I have two NIC's and I don't want eth0 to be used for the bridged network. How do I specify which one to use?

Answer

Assuming you have already setup networking, run vmware-config to change your configuration. 

Eventually you will be asked if you want to keep or change your network setup. Below is a sequence of questions and answers that selects the NIC "lan" for bridged network: 

Fixed NIC names

Submitted by gunnar on
Question

I have two NIC's, one wired and one wireless. On each boot SuSE 9.3 seems to randomly assign eth0 to one of them and eth1 to the other. It doesn't matter that the wireless is disabled. How do I assign a fixed name to each NIC?

Answer

You need to assign a "persistent name" to each NIC.

In "/etc/sysconfig/network" you will find a file named ifcfg-something for each NIC. Edit the ones whose names end with MAC adresses and add the line

PERSISTENT_NAME=xxx

to one of them, and

PERSISTENT_NAME=yyy

to the other, then run

SuSEconfig

and

/etc/init.d/network restart.