Miscellaneous

On this page you will a collection of short notes about different pieces of
hardware I somewhere had the possibility to try out, on which there was no
documentation on the internet, and for which a short explanation is sufficient.

postgrey / postfix

If you want to add your own whitelist rules, put them (in Debian) to the file /etc/postgrey/whitelist_clients.local, one rule per line.
It will be read automatically, no need to add a paramter to /etc/default/postgrey.

There is information online that the filename is /etc/postfix/postgrey_whitelist_clients.local, this is wrong for Debian. This file is ignored by default (of course you can add a parameter to /etc/default/postgrey).

polipo on openwrt does not cache to disk

Searching for a workaround took me quite some time, so I write it down here to
remember it.

OpenWRT Chaos Calmer (15.05.1)
Polipo polipo_1.1.1-1_brcm47xx.ipk)

Problem:)
I added a USB SSD to my OpenWRT router to have it cache to disk for my whole
LAN instead of having to download everything for all clients or have a server
running permanently as proxy server. Since I am using the same websites on
different clients this should speed up things.)
)
In /etc/config/polipo I configured the cache section)
config polipo 'cache'
option cacheIsShared '1'
option maxDiskEntries '256'
option dontCacheRedirects 'true'
option chunkHighMark '10'
option diskCacheRoot '/data/var/cache/polipo/'

after an uci commit; /etc/init.d/polipo restart
I checked the cache directory, but there were no files in it.
After searching the internet for some time I came across this forum post.

There is a bug in polipo that the disk cache is only activated if the Webserver
(sic!) root directory is set.

Western Digital My Book World Edition II

The first problem was that the windows shares could not be accessed in windows.
I couldn't reach the NAS via ssh, so I had to switch it off hard. After
switching it back on I still couldn't access the shares and got the following
error in the webinterface.

I searched in google and only found descriptions to take out the hard disks,
connect them to another computer and try to save the data. I didn't want to
accept that fact, as long as I could ssh to the NAS and had a running Linux on
the box.

So here is how to solve the problem step by step (at least how it worked for
me):

Login as user root (not admin!). The default password is welc0me,
this is not changed when you change the password for the webinterface.

Obviously everything is OK there, so our only problem is that the data
partition cannot be mounted.

So we have to stop all services accessing /dev/md2 = /Data/Volume
so we can unmount it and check the filesystem. Although the mount was not
successful the system thinks it is mounted, although it cannot access the
partition.

After that it worked for me, setting the IP address of the phone by hand was
not necessary.

Debian lenny - problem with keyboard in X / with xserver

After my dist-upgrade to Debian lenny setting the keyboard layout in
/etc/X11/xorg.conf didn't work (on the console everything was fine). Probably
this is related to the upgrade of the xkb-data package.
The fastest and easiest work-around is to add the following line to your
.xinitrc / .Xsessionrc (of course adapting it to your correct keyboard layout):
setxkbmap -rules xfree86 -model pc105 -layout de -option nodeadkeys

Lexmark E210 GDI printer + Netgear PS121 printserver

With Windows

I wanted to have a small network print server in my LAN so I could switch off
the computer the printer was connected to before.
I found information on some manufacturer's websites that their hardware
wouldn't work at all with GDI printers, so I chose this thing from Netgear,
because my printer wasn't on the incompatibility list (at least).

I bought the printserver, connected it to my LAN and ran the Setup-Program in
windows. It found the printserver without problems and I assigned a fixed
IP-adress.

Then I added a new (local) printer and chose the printer-share (LAN-Manager
Printer Interface) of the printserver as the interface to be used. Then I
finished the setup process and printed the test page - and it worked.

The other possibility is to use the IP-address as the interface instead of the
printer share.
Select local printer, then TCP/IP-Interface, enter the IP-address, it will be
converted automatically to IP_192.168.254.254, select
LPR as the protocol (thanks for the correction :-) ) and enter
lp as the name of the printer queue.

With Linux

With Linux it is just as simple.
Create a new printer in the CUPS web-interface, select LPD/LPR Host or
Printer.
Enter as Device URI lpd://192.168.254.254/lp (of course replace
the IP-address according to your setup).
On the next screens select Lexmark and Lexmark E210
Foomatic/gdi (recommended) (en) as the Model/Driver.
Then it should work and you can print the CUPS testpage.

Some interesting links:

Omnibook XE3 GC hotkeys

Finally I upgraded my old laptop to Debian testing/lenny and kernel 2.6.
So now I am using the great omnibook kernel module from
http://omnibook.sourceforge.net/. Everything is working well, only the hotkeys
took me some minutes' search and playing around.

The problem is that compared to the old kernel patches for kernel 2.4 you don't
get the keycodes of the hotkeys directly to use them with the hotkeys package,
instead you have to use setkeycodes (as root) first to map the scancodes.

The second and more severe problem is that keycodes higher than 240 cannot be
used, so you cannot use the same keycodes as with kernel 2.4.

These are the error messages:

When you have loaded the omnibook module without setting any scancode/keycode (at least you see that the module works):
atkbd.c: Unknown key pressed (translated set 2, code 0xf2 on isa0060/serio0).
atkbd.c: Use 'setkeycodes e072 <keycode>' to make it known.

Solution: use for example the following keycodes (check first with getkeycodes
wheter these keycodes are not use yet):setkeycodes e073 233 e074 234 e072 232 e071 231

The keycodes used for hotkeys in the .def-file are the following (small blue
one touch keys from left to right):
<userdef keycode="142" command="firefox">Firefox</userdef>
<userdef keycode="213" command="xawtv">xawtv</userdef>
<userdef keycode="228" command="Eterm">Eterm@localhost</userdef>
<userdef keycode="218" command="Eterm -T Eterm@remote -e ssh remotehost">Eterm@remote</userdef>