56 lines
1.6 KiB
HTML
56 lines
1.6 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
|
|
<HTML>
|
|
<HEAD>
|
|
<META NAME="GENERATOR" CONTENT="SGML-Tools 1.0.9">
|
|
<TITLE>PATH HOWTO: How to debug problems?</TITLE>
|
|
<LINK HREF="Path-14.html" REL=next>
|
|
<LINK HREF="Path-12.html" REL=previous>
|
|
<LINK HREF="Path.html#toc13" REL=contents>
|
|
</HEAD>
|
|
<BODY>
|
|
<A HREF="Path-14.html">Next</A>
|
|
<A HREF="Path-12.html">Previous</A>
|
|
<A HREF="Path.html#toc13">Contents</A>
|
|
<HR>
|
|
<H2><A NAME="s13">13. How to debug problems?</A></H2>
|
|
|
|
<P>
|
|
<P>The basic command to read environment is /usr/bin/env.
|
|
<P>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
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
# more /proc/1088/environ
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>This does not work with daemon processes like xdm. To access
|
|
environment of system processes or other user processes, root access
|
|
is required.
|
|
<P>To debug Netscape, you can create a script /tmp/test:
|
|
<P>
|
|
<BLOCKQUOTE><CODE>
|
|
<PRE>
|
|
$ cat > /tmp/test
|
|
#!/bin/sh
|
|
/usr/bin/env > /tmp/env
|
|
^d
|
|
$ chmod +x /tmp/test
|
|
</PRE>
|
|
</CODE></BLOCKQUOTE>
|
|
<P>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.
|
|
<P>
|
|
<P>
|
|
<HR>
|
|
<A HREF="Path-14.html">Next</A>
|
|
<A HREF="Path-12.html">Previous</A>
|
|
<A HREF="Path.html#toc13">Contents</A>
|
|
</BODY>
|
|
</HTML>
|