Next Previous Contents

## 13. How to debug problems?

The basic command to read environment is /usr/bin/env.

It is possible to use /proc directory to find out path of any program. First you must know the process number - use ps command to get that. For example, if xterm is process number 1088, you can find it's environment with command

> `

>     # more /proc/1088/environ

> `

This does not work with daemon processes like xdm. To access environment of system processes or other user processes, root access is required.

To debug Netscape, you can create a script /tmp/test:

> `

>     $ cat > /tmp/test
>     #!/bin/sh
>     /usr/bin/env > /tmp/env
>     ^d
>     $ chmod +x /tmp/test

> `

Then set some helper application, for example RealAudio, audio/x-pn-realaudio to call program "/tmp/test". When you try to browse some RealAudio link (something from http://www.realaudio.com/showcase), Netscape calls the dummy program that stores environment to /tmp/env.

Next Previous Contents