Category Archives: Debian/Ubuntu

Debian Etch Samba printing from Windows XP

For a while I was not able to print from Windows XP via Samba with my Brother HL 2030 laser printer which is connected to one of my servers. I’m running debian Etch there and had upgraded some packages, including samba. The printer was listed in my SWAT samba status, but on windows I couldn’t find it.

In the end it seems that I was missing one statement in my smb.conf:

[printers]
comment = All Printers
path = /var/spool/samba
create mask = 0700
guest ok = Yes
printable = Yes
read only = No

The odd thing is, that when I look at the documentation, setting printable = Yes should have been enough. At least, that’s how I read it. But I guess I’m wrong since the read only = No helps (although you can’t set this parameter for a printer share using SWAT).

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.

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: