Articles

Nice looking fonts in GTK applications on openSUSE 11.4

Submitted by gunnar on Sun, 06/12/2011 - 20:20

When I installed Open SuSE 11.4 yesterday I thought that the fonts used in GTK applications like Firefox and Thunderbird were really ugly. In my KDE settings I have specified that I want it to use my KDE fonts in GTK applications but this setting seems to have no effect. To fix this I installed gnome-control-center from the repository and changed the fonts to 8 point Liberation Sans and Liberation Mono. Now the GTK applications look just as good as the KDE ones.

Why do my Linux Samba share show underscores in file names when viewed on a Samba client?

Submitted by gunnar on Tue, 12/21/2010 - 08:51
Question

When a Samba client, Windows or Linux doesn't matter, connect to any of my shared directories all national characters in file and directory names are shown as underscores. Why?

Answer

Probably the directory character encoding used on your server doesn't match the setting unix charset in the [global] section of /etc/samba/smb.conf. If you don't use UTF-8 you need to specify the character encoding with this setting.

Running the BitNami LAMP stack with the system MySQL

Submitted by admin on Tue, 10/06/2009 - 09:36

The excellent BitNami LAMP stack contains its own MySQL, which is started automatically and used by PHP. If you for some reason want to use the MySQL that is installed in your host system you can do the following changes to your stack configuration:

Step 1 - Prevent the stack control script from starting MySQL

Edit the file ctlscript.sh in your LAMP stack root directory. and change the line

MYSQL_SCRIPT=$INSTALLDIR/mysql/scripts/ctl.sh

to

Cherry Linux keyboard and Java

Submitted by gunnar on Tue, 05/13/2008 - 19:04

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:

Preventing remote access to datasources

Submitted by gunnar on Fri, 05/09/2008 - 08:19

When you define a JDBC connection pool in Glassfish (AKA Sun Java System Application Server 9) and JDBC resources for it, you usually include a user name and password as pool properties.  You may think that this information is available only to deployed applications, but in fact anyone with IP access to the servers ORB port (3700 by default) can fetch the entire datasource definition using a simple JNDI lookup. If the database server is also accessible, then you have a security problem.

Editing crontab for QNAP, and making it stick

Submitted by gunnar on Sat, 05/03/2008 - 18:50

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:

Using Apache as a proxy to access a J2EE web application

Submitted by gunnar on Tue, 09/11/2007 - 09:43

OK, you have created a great web application and now you want to expose it to the world, or perhaps a limited subset of it. You probably don't want to allow full access to your application server so you need a proxy.

The apache proxy module (mod_proxy) can be used with a simple configuration like below:

<IfModule mod_proxy.c>

<Proxy *>
  Order allow,deny
  Allow from all
  SSLRequireSSL
</Proxy>

Mailing files from Konqueror

Submitted by gunnar on Tue, 05/22/2007 - 15:16
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