Please note: This is the archived version of my former homepage. The information presented is most likely out of date. Click here to visit my current homepage.
Manuel Kiessling's Personal Home Page [ Amazon wishlist: Int'l  deutsch ]    [ Sitemap ]    [ Text version ]    [  Search  ]


Hints

A collection of Linux solutions

Here I just want to collect stuff that helped me out while dealing with those Linux problems that happened to me now and then. By newbie for newbies.


The 1024x768 resolution is too far to the left when running Yellow Dog Linux on an iMac 400 DV

The thing is: Don't use "fbdev" for your device config, use "ati" with 'Option "UseFBDev" "true"'. Then you can use xvidtune to adjust your monitor. Here is a XF86Config that works for me.

SMTP-after-POP the easy way

See here: pl-SaPd Homepage.

Setting up a secure CVS server and access your repositories with WinCVS, using SSH (only a VERY quick guide!).

On the client side you need Putty, Plink, Puttygen, Pageant and WinCVS, preferably the 1.3 branch.
  • Create a group/user cvsadmin, with home dir e.g. '/var/cvs/'
  • Switch to this user and create '/var/cvs/repositories/projectname' (for every repository you want to have)
  • cvs init your repository:
bash:~# cvs -d /var/cvs/repositories/projectname init
  • Create a Putty public/private key pair with Puttygen.
  • Add the public key to the cvsadmin's authorized_keys file, but prepend (on the same line!) this (trailing whitespace!):
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/bin/cvs server"
  • Now your key line should read:
no-port-forwarding,no-X11-forwarding,no-agent-forwarding,command="/bin/cvs server" ssh-dss AAAAB3Nz... (etc.)
  • Install WinCVS on the client side
  • Fire up Pageant, load your generated key (the private file). In your WinCVS Preferences, choose Authentication 'ssh', Path '/var/cvs/repositories/projectname', Host adress is your servers address, User name 'cvsadmin'. Click on 'Settings' next to the Authentication method dropdown. DO NOT choose a RSA public key. In the 'If ssh is not in the PATH:' field enter the path to Plink (e.g. C:\Program files\putty\plink.exe).
  • Try checking out module 'CVSROOT'. Should work :-). If not, feel free to mail me.

SuSE 8.1 with kernel 2.4 won't boot a system with Adaptecs AIC-7892 SCSI adapter, using the aic7xxx module

I just installed a i386 SCSI system with SuSE 8.1 Professional, and booting failed with messages like 'recovery code sleeping', 'device set offline', 'aic7xxx_abort' etc., so obviously there was a problem with the SCSI controller. I did some searching and found out that adding the parameter 'noapic' to the boot command line fixed this problem.

YaST freezes at module 'dpt_i2o' while installing on a system with Adaptec 2400A IDE RAID Controller

I regularly run into this (many of our servers have the 2400A), but not regularly enough so I always forget the solution - this is why I write it down now and forever... Seems like firing up the Adaptec config tool (CTRL-A at some point of the booting process) and disabling 'Enable Extended Int13' in the 'SmartROM Options' section fixes this.

Getting unix.h errors when compiling PHP

Well, I wanted to access the mails on my (IMAP) server by browser, and I decided to use AeroMail. It's really easy to install, but requires IMAP support compiled into PHP. My PHP installation just got a bit old, so it was a good time to update.
I downloaded PHP 4.2.2 and tried to configure '--with-imap', of course he could not find some libs (e.g. 'c-client.a'), so I downloaded the latest IMAP package from the IMAP homepage. I compiled (but not installed) the package, and started to copy all *.h files from the package into '/usr/local/include/' and all *.a files into '/usr/local/lib', hoping that PHP would find them there. I already felt that this was not really elegant... whatever, PHP's configure went well now, but when I typed 'make' he said:
In file included from zend.h:55,
                 from zend_compile.h:24,
                 from zend_language_parser.c:147:
/usr/local/include/unix.h:182: parse error before `MAILSTREAM'
/usr/local/include/unix.h:182: warning: no semicolon at end of struct or union
/usr/local/include/unix.h:189: parse error before `}'
/usr/local/include/unix.h:189: warning: data definition has no type or storage class
/usr/local/include/unix.h:193: parse error before `*'
/usr/local/include/unix.h:193: warning: data definition has no type or storage class
/usr/local/include/unix.h:196: parse error before `*'
...
Oops. Ok, so he had a problem with 'unix.h', one of the files I copied from the compiled IMAP sources into '/usr/local/include/'. After doing some searches, I found out that accidently(?) this file from the IMAP package has the same name like the unix.h that is part of Linux. Damn! Now this file is overwritten, what do I do now? I tought that if it is really a Linux system file, then it will surely be present on other Linux systems, and I can simply copy it over. I checked some of my other servers at work, but none had the file. Grr. I finally found it on an old server where I still had some linux sources (kernel 2.2.16) lying around: '/usr/src/linux-2.2.16/include/config/unix.h'. I copied it over the apparently wrong unix.h on my system and - it worked.
I don't know if anyone runs into the same problem (read: is as dumb as I was), but if you do and you are as bad in need of 'unix.h' as I was, then you can download 'unix.h' here.

Checking wether a process is running or not

Let's say you are running an important process (in my case it is the socket server of my ARSC demo installation) and want to be informed (e.g. by eMail) when this process stops running. This shell script (only tested with bash) might be helpful:
#!/bin/bash
cd /where/ever/the/script/lies

PROCNAME=ProcessToBeChecked
NUMPROCINSTS=`ps -ef|grep $PROCNAME|grep -v "grep "$PROCNAME|wc -l`

if test $NUMPROCINSTS -eq 0
then
 mail you@yourdomain.com -s "Process status" < notrunning.txt
fi
(The 'mail' line might look a bit strange because of '< notrunning.txt', but this is the only way I know to invoke the mail command correctly in a shell script - anyone has another solution? 'notrunning.txt' can be an empty file.)

DNS is a bit tricky if working with firewalls

Some weeks ago I read a tutorial about IPTables because I had to secure some machines. The tutorial said that DNS uses UDP, and therefore
$IPTABLES -A INPUT -p UDP --dport 53 -j ACCEPT
should work quite fine to keep DNS working.
Today I found out that this is only half the truth. If the DNS packets are larger than 512 byte, DNS switches to TCP. I believe that those 'big' packets occur e.g. when a slave nameserver tries to update information from a master nameserver. At least that would explain some struggle I had with my nameservers recently...
Well, the right thing to do if you want to keep DNS working while using a firewall is:
$IPTABLES -A INPUT -p UDP --dport 53 -j ACCEPT
$IPTABLES -A INPUT -p TCP --dport 53 -j ACCEPT

Getting ISA CS4231 run under SuSE 7.3

My CS4231 sound card could not be detected by YaST2, but then I found this tiny little 'alsaconf' icon in my KMenu, and alsaconf found and installed my card without a hitch.
Addendum (April 4, 2002): What i wrote above was right, but later on I still had problems getting the soundcard working after every reboot - sometimes it worked, sometimes not. I now bought an EUR 17,- PCI soundcard with CMI8738 chipset - everything works wonderful now. Really, my nerves are worth those 17 bucks :-) Seems like ISA really had its time...

Scanner is found by YaST2 but XSane and XScanImage won't work

YaST2 found my Mustek Paragon 1200 Pro, but when I started xsane or xscanimage, they said 'no scanner found' or sort of. Searching SuSEs SDB, I found this article and did what was mentioned there, but it still did not work. As so very often with hardware, the problem was that my scanner device (/dev/sg1) was only readable by root, and thus I could not scan as a normal user. Running (as root)
bash:~# chmod 777 /dev/sg1
fixed that problem.

Last update of this page: $Date: 2005-01-04 12:30:45 $

Everything on this page is (c) 2000-2005 Manuel Kiessling unless otherwise stated.
You may use it after you read the About section.
For any questions or suggestions send me an eMail to manuel@kiessling.net.

Valid HTML 4.0 | Valid CSS 2.0 | Viewable with Any Browser | Bobby approved | Generated with QuickHP