Author Archives: DelGurth

About DelGurth

Just your average nerd, trying to share his knowledge

AMD64 and 32 bits applications

I wanted Skype on my laptop, stupid me thought it was nice to have 64 bit linux. Many applications don’t seem to be 64 bit ready, one of them is Skype. Good thing there is a –force-architecture flag in dpkg, but still not all applications work that way. Skype is one of them. But I found a good script called getlibs that helps installing the required libraries, once more on the ubuntu forums.

But even though these type of scripts can be found, I’m still going to switch my Desktop back to 32 bits. The support for 64 bits is not good enough, yet. And well, since I’m not using > 4 Gb’s of memory, I don’t really need 64 bits.

Debian Etch Postfix + Sasl2

Some time ago I had some problems sending mail to one of our clients, something with their primary mailserver not accepting connections and a non-existent secondary mailserver. So I wanted to enable authenticated mail sending on my own mailserver.

It was quite easy to get it working, after finding some articles which I could use. The biggest problem was the jail Postfix was in so it couldn’t talk with saslauthd direcly.

I added the following in my main.cf

#SMTP Auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = smtpd
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unknown_recipient_domain

And I created directory sasl and placed a smtpd.conf in there containing:

pwcheck_method: saslauthd
mech_list: plain login

And I changed /etc/default/saslauthd to use the suggested option (suggested in comment in the file itself):

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"

Used articles:

Update 2008-05-15:
Today I ran into a problem after I did a package upgrade. I got the warning:

SASL authentication failure: cannot connect to saslauthd server: Permission denied

Seems some permissions where incorrect. I did a:

sudo chgrp sasl /var/spool/postfix/var/run/saslauthd
sudo passwd postfix sasl
sudo /etc/init.d/postfix restart

and that solved it. Why I didn’t get this before I don’t know, but well, this fixed it. Thanks to Jimmy who blogged about Debian and SASL as well.

Dual screen with docking station using xrandr

A colleague of mine uses the same laptop as I’ve. But he didn’t like the fact that the build-in display is not used when it’s docked in the docking station. He wants to use his laptop LCD as secondary display when he’s at work.

Unfortunately I’m still on Feisty, but once more Prevu came to the rescue. I found a post about the order in which to build the packages to get xrandr 1.2 (the required version to get the thing to work properly).

And then I used this ubuntu forum post to configure my xorg.conf.

I added:

Viewport 1680 0
Virtual 3360 1050

to the “Screen” Section of my xorg.conf (SubSection “Display”), restarted X and could use the following command to get my display to be a second display and not just a clone:

xrandr --output TMDS-1 --right-of LVDS --mode 1680x1050

To switch back to the clone I use:

xrandr --output TMDS-1 --same-as LVDS --mode 1680x1050

Or you can just restart X again.

This was all.

P.s. If anyone knows how you can dock the D830 on Ubuntu while running, please drop a comment. It kinda hangs when I try to do that and the only thing left for me to do is a hard reset.

Creating your own debian package for non-source applications

For magproductions I needed a debian package of our “own version” of Eclipse (latest Eclipse with certain plugins pre-installed).

At first I was told to look at checkinstall, but since I didn’t have a makefile, that was not the answer. In the end I used the debian-administration guide to create my own package.

I changed the install into a few mkdir -p and cp -r commando’s and the clean into a rm -r command. That’s basically it. I didn’t think it would be that simple.

Nokia E65 VOIP

I’ve bought a Nokia E65 because I wanted a navigation system (I spend 30 minutes looking for directions in Hilversum, after I found the correct one-way road..) and a TomTom on a phone seemed the best idea. I was up for a phone-subscription renewal anyways and thought that buying a TomTom capable phone would be the cheapest solution. This was not true in the end, but well… I’m happy anyways. The TomTom works and the phone, even though it’s a Nokia, is a nice one.

One of the nice features of this phone is that it’s able to use my XS4ALL VOIP account when I’m connected to a WLAN. This is quite useful, for example for free calls from the wife at home, and being able to be reachable on a dutch number even when I’m in, for example, Germany.

But it has one problem. I’ve selected Internet calling as default and when there is no WLAN in reach, it gives me an annoying message about making a mobile call, but only when I’m voice dialing. And well, I do voice dialing in the car, so I don’t want to have to answer yes every time…

I tried to disable that message with the setting “Internet call alert”, but that has as result that I could not be called on my Internet number. If someone called me, it only said: 1 missed call. Which is quite annoying, if you don’t know what causes it.
Just had to get that off my chest :-)

Dell Latitude D830 and Ubuntu Feisty (64 bit)

I recently got a Dell Latitude D830 to work on, since I’ll be travelling quite a lot and for that it’s useful to have your development environment with you on the road. The disadvantage is that you can have your development environment with you all the time.

To get Ubuntu, the development environment we use at magproductions, working on it I had to use the Alternative install, since the Feisty live CD didn’t work. The new Gutsy live CD does work though. Only with that one there is a sound issue, see this ubuntu wiki page for a way to solve that. And well, I’ll wait till Gusty is used in the wild a bit longer before I’m going to upgrade.

Anyway, finally I’ve got it working with my docking station. There was an annoying bug in the intel linux driver which made it impossible for me to work with Ubuntu using the docking station. But a while ago that was fixed in the Gutsy version of the xserver-xorg-video-intel package.
I had to use Prevu to get the display working properly. Good thing the ubuntu forums have a lot of information. I just wish information would be placed together, that’s why I’m making this post now.

For Prevu I first had to understand how that worked. If you get an python exception while tying to build a package you need to look for dependencies. And then you need to build the dependency using Prevu first, before you continue. After building the dependency I had to run prevu-update, so Prevu knew that the dependency was available.

In the end I’ve the following Prevu packages installed:

libgl1-mesa-dri
libgl1-mesa-glx
libglu1-mesa
mesa-utils
prevu
x11-common
xbase-clients
xorg
xprint
xprint-common
xserver-xorg
xserver-xorg-core
xserver-xorg-input-all
xserver-xorg-video-intel
xutils

I also tweaked the touchpad a bit, for example I don’t like it to respond on my thumb when I’m typing. And the default speed is just horrible. For that I used the defaults from another ubuntu forums post. I ended up with

Section "InputDevice"
Identifier      "Synaptics Touchpad"
Driver          "synaptics"
Option          "SendCoreEvents"        "true"
Option          "Device"                "/dev/psaux"
Option          "Protocol"              "auto-dev"
Option          "HorizScrollDelta"      "0"
Option          "SHMConfig"             "1"
Option          "FingerLow"             "30"
Option          "FingerHigh"            "40"
Option          "MaxTapMove"            "100"
Option          "TapButton1"            "1"
Option          "TapButton2"            "3"
Option          "TapButton3"            "2"
Option          "MinSpeed"              "0.15"
Option          "MaxSpeed"              "0.90"
Option          "AccelFactor"           "0.10"
Option          "VertScrollDelta"       "25"
Option          "HorizScrollDelta"      "30"
EndSection

Another problem was that the CDRom drive was not detected. I used yet another site to fix that. Update, that site doesn’t really show that information (anymore?), but this site describes the fix.

Now a list of helpful sites:

Calling methods with parameters using JSTL

I was quite annoyed by the fact that you can’t just call a method with certain parameters using JSTL. Lucky me, google gave me a result where I could see how this is done (using JSP 2.0).

The thing is, you need to create a static method with the required parameters and then you need to define a TLD to be able to call the function. This process can probably be simplified by using a tool like XDoclet so your TLD is generated automatically, but I didn’t look into that, yet.

Another way to do it is described by Lucas Jellema on the AMIS blog. But I don’t call this a real solution, just a very dirty hack. I respect him for his posts on Oracle, but I don’t like this solution at all.

WordPress privacy concerns

I was told by a colleague that WordPress was being discussed on the privacy subject. Now I don’t want to go into that discussion, but I encountered a post by Ryan Finnie about $_SERVER variables being send to the Akismet server.

If you plan to use HTTP authentication and use Akismet it’s a wise idea to patch your Akismet with the patch provided Ryan Finnie. This because otherwise your login data is send to the Akismet server every time it checks the comment post. True, having both Akismet and HTTP authentication is a bit strange, but I think it’s better to remove such data then to have it transferred to Akismet.

I hope Matt will accept this bug as being valid.

I also found some other items about the need to send $_SERVER in total. Certinately the enhanced akismet plugin sounds like a good alternative.

svn move multiple directories with confirm

I had to rearrange multiple directories, but not all, in a svn tree to make a project more compatible with Eclipse. For this I used the following one-liner so I could do this more easily.

for file in `find -maxdepth 1 -type d`; do \
echo -n $file "[y/n] "; \
read -n 1 shouldMove ; \
if [ "$shouldMove" == "y" ]; \
then \
svn mv `basename $file` WebContent/`basename $file`; \
fi; \
done

This way I was sure all directories I wanted to move were moved (since a svn mv does not remove the directory right away, it does that on commit).

I hate blogging already….

So. I was writing a post about some one-liner I wrote to move a lot (but not all) directories in a svn repository to another directory. Because the one-liner was getting lengthy I added slashes to it so it was better readable. But on saving I lost my slashes?!

This seems to be caused by a 2 year old bug in wordpress. I hope that with the fix I posted this bug will be resolved soon. For now I’ll just patch my version of WordPress.