SSH access from your mobile phone

I downloaded midpSSH (full build MIDP2.0) from for my Nokia 6230i, but every time I tried to connect, I got a flashing STOP with the error
[sic] Writer:Error occured whilst opening connection
followed by a white on black screen saying connecting to…

It turned out that the problem was the phone’s configuration. It needed support for Streaming applications added.

My settings for MidpSSH are:
Session: Host: Type:SSH Username:user Password:mypass Options:Create [These are same details as for PuTTY]

Network: Terminal: Default Polling I/O:Off

Interface: Full Screen:Off Orientation:Normal Terminal Size: Cols/Rows: Default Predictive Text:On

Fonts: Size:LCD 8×13 Mode:RGB FG:ffffff BG:000000

SSH: Prefer:SSH2 Public Key:Off Store Session:On Session Key:512

Phone configuration (for Vodafone UK PAYT):


  • Account Name: Vodafone GPRS
  • Homepage:
  • User: wap
  • Password: wap
  • Use Preferred Access Point: No
  • Access Point Settings:
  • Proxy: Enabled
  • Proxy Address:
  • Proxy Port: 8799
  • Data Bearer: GPRS
  • Bearer Settings:
  • GPRS Access Point:
  • Authentication Type: Normal
  • User name: wap
  • Password: wap
  • Streaming:

  • Account Name: VodaStream
  • UDP Port Range: 6970-7170
  • Use Preferred Access Point: No
  • Access Point Settings:
  • Proxy: Disabled
  • Bearer Settings:
  • GPRS Access Point:
  • Authentication Type: Normal
  • User name: wap
  • Password: wap

Don’t forget to Activate these settings. Fuller details of how to configure your Nokia can be found at Ronnie’s website

The settings for other UK networks can be obtained from here. Another error I got was “Subscribe to GPRS first” which also meant that I had something wrong in the phone’s configuration. The default configuration from Vodafone OTA (Over The Air) does not include streaming.

Listing tasks with Linux

If you want to list all active tasks (services) in Linux, use the ps command

Syntax Meaning
Process Selection
a select all processes on a terminal, including those of other users
g select all processes on a terminal, including those of other users, even group leaders
r restrict output to running processes
x select processes without controlling ttys
–deselect Invert selection
Output Formats
j Job control format
s Display Signal format
u Display User orientated format (CPU and Memory usage)
v Display Virtual Memory format
l Display Long format
w Wide output

ps au, ps ax, ps xgwl, ps auw, ps grxwu

Many Linux systems run a super-server, or a software server that handles the initial stages of connection requests on behalf of other software servers. Super servers typically handle connections for small (or seldom-used) servers, such as Telnet, FTP, POP, IMAP, SWAT, SANE, and VNC, just to name a few. This is why these servers may not appear in your process list. These servers can be run standalone without the benefit of a super server, but running a super server typically results in reduced memory load when the servers it proxies for aren’t being accessed, albeit with some overhead and lag during connection attempts. (Some servers cannot be managed by a super server.)
One big advantage of using a super-server is the extra layer of security it provides. A modern super-server, such as xinetd, includes built-in access control features that can limit access to subjugated servers.

Killing Processes
There are dozens of ways to control processes. The first thing you need to do is obtain the pid using jobs or ps. Here are a few common ways to kill a process:

kill -STOP [pid]
SIGSTOP (17,19,23) stops a process without killing it

kill -CONT [pid]
SIGCONT (19,18,25)restarts a stopped process

kill -KILL [pid]
SIGKILL (9) forces the process to terminate immediately and performs no cleanup

Jobs can also be stopped using Control-Z and then restarted using fg and bg. A list of active jobs can be obtained using jobs
fg [jobspec] – Resume jobspec in the foreground, and make it the current job.
bg [jobspec] – Resume the suspended job jobspec in the background, as if it had been started with &

Upgrading php


I want to upgrade the installation of php on my server as I feel it is important to keep abreast of the bug fixes in core applications, especially the popular ones which will be subject to the most abuse.

Required packages:

  • gdbm (a set of database routines that use extensible hashing)
  • bison (general-purpose parser generator that converts an annotated context-free grammar into an LALR(1) or GLR parser for that grammar)
  • flex (A fast lexical analyser generator for generating programs that perform pattern-matching on text.)
  • php

Optional packages:

  • For IMAP support:
    • IMAP
    • Kerebos
    • Pinfo
  • For DB3 support:
    • Berrkley DB
    • AOP
  • For Interbase support:
    • Interbase
    • AOP

Building the libraries


The source files for gdbm are available by FTP from the GNU servers. Open a connection to their server and download the latest version (1.8.3 at the time of writing)
# ftp
# login: anonymous password:anon@
# cd gnu/gdbm
# passive
# dir gdbm-*
# get gdbm-1.8.3.tar.gz
# quit

Next we need to unzip the file we have just downloaded and change to the directory
# gunzip -c gdbm-1.8.3.tar.gz|tar x
# cd gdbm-1.8.3

Then we need to run autoconfigure. As we do not have root access, we need to specify an alternative location for the build. I have chosen /usr/mylocal. We will redirect the output to a couple of files so that we do not miss anything.
# ./configure –prefix=/usr/mylocal >log.config 2>err.config

Check that no errors were encountered and fix any that were logged before proceeding further.
#ls -l err.config
#less err.config

Build the package and check for any errors
#make >log.make 2>err.make
#ls -l err.make
#less err.make

Install the gdbm package
#make install>log.install 2>err.install
#ls -l err.install
#less err.install


We need to follow the same procedure to build the bison library.
# ftp
# login: anonymous password:anon@
# cd gnu/bison
# passive
# dir bison-*
# get bison-2.3.tar.bz2
# get bison-2.3.tar.bz2.sig
# quit
# gpg –verify bison-2.3.tar.bz2.sig
# bunzip2 -c bison-2.3.tar.bz2 | tar x
# cd bison-2.3
# ./configure –prefix=/usr/mylocal >log.config 2>err.config
# make >log.make 2>err.make
# make install >log.install 2>err.install


# bunzip2 -c flex-2.5.33.tar.bz2|tar x
# cd flex-2.5.33
# ./configure –prefix=/usr/mylocal >log.config 2>err.config
# make check >log.check 2>err.check
# make >log.make 2>err.make
# make install >log.make 2>err.make

IMAP Support


# ln -s /usr/mylocal/inc/


# wget
# wget
# gpg –verify pinfo-0.6.9.tar.bz2.sig
# bunzip2 -c pinfo-0.6.9.tar.bz2 |tar x
# cd pinfo-0.6.9
# ./configure –prefix=/usr/mylocal –with-curses=/usr/mylocal >log.config 2>err.config
# make >log.make 2>err.make
# make install >log.install 2>err.install



Build php

php requires the header file for gdbm.h to be in one of four locations, so create a link in /usr/local/include. First, however, we need write access rights to the
# chmod u+w /usr/local/include
# ln -s /usr/mylocal/include/gdbm.h /usr/local/include/gdbm.h
# chmod u-w /usr/local/include

Download the latest source from directly to your server:directory.

  • wget

Extract the source files using the command gunzip – c php-4.x.x.tar.gz|tar x and then change into the directory you have just created (cd php-4.x.x)

If you already have php installed (as I do), then create a file called phpinfo.php and place it in your webserver’s home directory so that you can run it. It should contain the following code:

  1. <?php
  2. phpinfo();
  3. ?>

When you run this code, it will display the current configuration for your version of php. Copy it for this new build and add the bits in bold. Your configuration command should look something like this and needs to be on one line:

./configure –prefix=/usr/mylocal –with-apxs=/usr/sbin/apxs –with-gd –with-jpeg-dir=/usr/lib –with-gettext=/usr –enable-safe-mode –with-config-file-path=/etc/httpd –with-exec-dir=/usr/bin –with-zlib –enable-magic-quotes –with-regex=system –with-ttf –with-db –with-gdbm –enable-mbstring –enable-mbstr-enc-trans –enable-track-vars –enable-wddx=shared –enable-mm=shared –enable-xml –enable-ftp –disable-debug –with-libdir=/usr/lib –with-db3 –with-interbase=shared –with-pgsql=shared –with-ldap –with-imap –with-pdflib=shared –enable-sockets >log.config 2>err.config

If you get the error configure: error: no acceptable cc found in $PATH, then you do not have a compiler installed. Try something like GCC

error: Cannot find rfc822.h.
Possible SOLUTION: Download and build latest imap.tar.Z from and Kerebos from

The following options are causing problems:
–with-gettext=/usr –with-exec-dir=/usr/bin –with-libdir=/usr/lib

error: Header contains different version
Possible SOLUTION: Missing header files. Download and install BerkleyDB from Current version is 4.5.20, so download is wget

Alternative location (for db3)

error: libgds or libib_util not found!
Possible SOLUTION: Download interbase 6.01 from

–with-pdflib=shared –with-jpeg-dir=/usr/lib –with-zlib
PDFlib extension requires at least pdflib 3.x. You may also need libtiff, libjpeg, libpng and libz. Use the options –with-tiff-dir=<DIR>, –with-jpeg-dir=<DIR>, –with-png-dir=<DIR> and –with-zlib-dir=<DIR>
Possible SOLUTION: Download PDFLite (for private use) or purchase license from PDFLib
which leaves
./configure –prefix=/usr/mylocal –with-apxs=/usr/sbin/apxs –with-gd –enable-safe-mode –with-config-file-path=/etc/httpd –enable-magic-quotes –with-regex=system –with-ttf –with-db –with-gdbm –enable-mbstring –enable-mbstr-enc-trans –enable-track-vars –enable-wddx=shared –enable-mm=shared –enable-xml –enable-ftp –disable-debug –with-pgsql=shared –with-ldap –enable-sockets –with-mysql=/usr/local/mysql

then type:


If you get the error make: *** No targets specified and no makefile found. Stop., then configure did not work properly. Go back and check log.config for the problem. If configure worked properly, then it should contain the following sections:

  • Configuring SAPI modules
  • Running system checks
  • General settings
  • Configuring extensions
  • Configuring PEAR
  • Configuring Zend
  • Configuring TSRM
  • Configuring libtool
  • Generating files
  • before ending with

  • Thank you for using PHP.

and then:

make install

backup your php.ini file:

cp php.ini.bak /etc/httpd/php.ini

you will need to edit your php.ini file now:

pico -w /etc/httpd/php.ini

register_globals = Off

change to
register_globals = On

PHP tends to make some changes to your httpd.conf file so you may need too edit it:

pico -w /etc/httpd/conf/httpd.conf

add this line:

LoadModule php4_module /usr/lib/apache/

put it in the #Extra Modules area of the file.

save your changes and now just one more file too edit:

pico -w /etc/httpd/conf/srm.conf

add this line:

AddType application/x-httpd-php .php .php4 .phtml

save your changes, then stop and start httpd:

/etc/rc.d/init.d/httpd restart

(i know this seems similar to other tuts but i learnt from other tuts around this forum and other forums so my way of installing is similar)

This works i have tested it on my machine here at work.

If you get the error configure: error: png.h not found. when you try make install, then install LibPNG

The instructions above suggest including “–with-imap” in the configure line. This was a major problem on my RaQ 550, although I really wanted IMAP support. The error messages in config.log were:

configure:40552: checking whether IMAP works
configure:40585: gcc -o conftest -g -O2 -Wl,-rpath,/usr/local/lib -L/usr/local/lib conftest.c -lc-client -lssl -lcrypto -lcrypt -lpam -lttf -lpng -lz -lz -lgdbm -lz -lssl -lcrypto -lresolv -lm -ldl -lnsl -lxml2 -lz -lm 1>&5
/usr/lib/libc-client.a(mail.o): In function `mm_cache’:
/usr/src/redhat/BUILD/imap-2002d/c-client/mail.c:203: undefined reference to `__canary_death_handler’

Temporarily moving the (non-stackguard) GCC compiler, and linking the StackGuard version of GCC to the default location makes it work.

# mv /usr/bin/gcc /usr/bin/gcc.bak
# ln -s /usr/sg/bin/gcc /usr/bin/gcc

Now head over to your PHP source folder and do a standard configuration..

# cd php-4.3.4
# ./configure –configure-options

… finish building PHP, and be sure to move the original GCC back into place when you are done.

# mv /usr/bin/gcc.bak /usr/bin/gcc

Finding files in Linux

There are basically two ways to search for files in Linux.

The first is locate <filename> which will search the whole file system.

The second way is using find. The simplest way to use this is find <start directory> -name <file to search for>. For case insensitive searches use -iname. You can also pass the output of the file to another command as follows:

$ find / – name ‘starttxt*’ -exec command {\}\ \;

This command would find all the files on your system that begin with the letters ‘starttxt’ and would then execute the command on those files.

The words following the -exec option are the command that you want to execute eg.. ls -l
{\}\ is basically an indicator that the filenames returned by the search should be substituted here.
\; is the terminating string, and is required at the end of the command

which can be used to output the full path of executables.

Try Edinburgh University‘s website if you are after the man files

Oops! Lost my Tool Options in The GIMP

I was messing about with The GIMP the other day and managed to close the tab that appears in the lower half of the window titled “The GIMP”. Aargh! And then it took me ages to find out how to fix this.

So here is what you have to do…

  1. Click on File, Dialogues, Tool Options (Shift+Ctrl+T)
  2. A new window will appear. Its appearance depends on which tool is currently selected in the toolbox (which is the official name for The GIMP window).
  3. Click on the top line (the one with the same button you used to close the dialog in the first place) and drag it over to “The GIMP” window
  4. When you start dragging, the cursor will change to a button labelled “Tool Options”
  5. Drop it on the small bar below the tools. The bar will turn dark when you can drop the dialog

That’s it.