home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2000 May
/
Chip_2000-05_cd1.bin
/
zkuste
/
Perl
/
ActivePerl-5.6.0.613.msi
/
䆊䌷䈹䈙䏵-䞅䞆䞀㡆䞃䄦䠥
/
_d57f24e22ed12450d7d785a064de61e4
< prev
next >
Wrap
Text File
|
2000-03-23
|
5KB
|
136 lines
<HTML>
<HEAD>
<TITLE>X11::Auth - Perl module to read X11 authority files</TITLE>
<LINK REL="stylesheet" HREF="../../../Active.css" TYPE="text/css">
<LINK REV="made" HREF="mailto:">
</HEAD>
<BODY>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> X11::Auth - Perl module to read X11 authority files</P></STRONG>
</TD></TR>
</TABLE>
<A NAME="__index__"></A>
<!-- INDEX BEGIN -->
<UL>
<LI><A HREF="#name">NAME</A></LI><LI><A HREF="#supportedplatforms">SUPPORTED PLATFORMS</A></LI>
<LI><A HREF="#synopsis">SYNOPSIS</A></LI>
<LI><A HREF="#description">DESCRIPTION</A></LI>
<LI><A HREF="#methods">METHODS</A></LI>
<UL>
<LI><A HREF="#new">new</A></LI>
<LI><A HREF="#get_one">get_one</A></LI>
<LI><A HREF="#get_all">get_all</A></LI>
<LI><A HREF="#get_by_host">get_by_host</A></LI>
</UL>
<LI><A HREF="#compatibility">COMPATIBILITY</A></LI>
<LI><A HREF="#author">AUTHOR</A></LI>
<LI><A HREF="#see also">SEE ALSO</A></LI>
</UL>
<!-- INDEX END -->
<HR>
<P>
<H1><A NAME="name">NAME</A></H1>
<P>X11::Auth - Perl module to read X11 authority files</P>
<P>
<HR>
<H1><A NAME="supportedplatforms">SUPPORTED PLATFORMS</A></H1>
<UL>
<LI>Linux</LI>
<LI>Solaris</LI>
</UL>
<HR>
<H1><A NAME="synopsis">SYNOPSIS</A></H1>
<PRE>
require X11::Auth;
$a = new X11::Auth;
($auth_type, $auth_data) = $a->get_by_host($host, $disp_num);</PRE>
<P>
<HR>
<H1><A NAME="description">DESCRIPTION</A></H1>
<P>This module is an approximate perl replacement for the libXau C library
and the <CODE>xauth(1)</CODE> program. It reads and interprets the files (usually
'~/.Xauthority') that hold authorization data used in connecting to
X servers. Since it was written mainly for the use of X11::Protocol,
its functionality is currently restricted to reading, not writing, of
these files.</P>
<P>
<HR>
<H1><A NAME="methods">METHODS</A></H1>
<P>
<H2><A NAME="new">new</A></H2>
<PRE>
$auth = X11::Auth->new;
$auth = X11::Auth->open($filename);</PRE>
<P>Open an authority file, and create an object to handle it. The filename
will be taken from the XAUTHORITY environment variable, if present, or
'.Xauthority' in the user's home directory, or it may be overridden by
an argument. 'open' may be used as a synonym.</P>
<P>
<H2><A NAME="get_one">get_one</A></H2>
<PRE>
($family, $host_addr, $display_num, $auth_name, $auth_data)
= $auth->get_one;</PRE>
<P>Read one entry from the file. Returns a null list at end of file.
$family is usually 'Internet' or 'Local', and $display_num can
be any string.</P>
<P>
<H2><A NAME="get_all">get_all</A></H2>
<PRE>
@auth_data = $auth->get_all;</PRE>
<P>Read all of the entries in the file. Each member of the array returned
is an array ref similar to the list returned by get_one().</P>
<P>
<H2><A NAME="get_by_host">get_by_host</A></H2>
<PRE>
($auth_name, $auth_data)
= $auth->get_by_host($host, $family, $display_num);</PRE>
<P>Get authentication data for a connection of type $family to display
$display_num on $host. If $family is 'Internet', the host will be
translated into an appropriate address by gethostbyname().</P>
<P>
<HR>
<H1><A NAME="compatibility">COMPATIBILITY</A></H1>
<P>The following table shows the (rough) correspondence between libXau
calls and X11::Auth methods:</P>
<PRE>
libXau X11::Auth
------ ---------
XauFileName $ENV{XAUTHORITY}
|| "$ENV{HOME}/.Xauthority"
fopen(XauFileName(), "rb") $auth = new X11::Auth
XauReadAuth $auth->get_one
XauWriteAuth
XauGetAuthByAddr $auth->get_by_host
XauGetBestAuthByAddr
XauLockAuth
XauUnlockAuth
XauDisposeAuth</PRE>
<P>
<HR>
<H1><A NAME="author">AUTHOR</A></H1>
<P>Stephen McCamant <<A HREF="mailto:alias@mcs.com">alias@mcs.com</A>></P>
<P>
<HR>
<H1><A NAME="see also">SEE ALSO</A></H1>
<P><EM>perl(1)</EM>, <A HREF="../../../site/lib/X11/Protocol.html">the X11::Protocol manpage</A>, <EM>Xau(3)</EM>, <EM>xauth(1)</EM>,
lib/Xau/README in the X11 source distribution.</P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%>
<TR><TD CLASS=block VALIGN=MIDDLE WIDTH=100% BGCOLOR="#cccccc">
<STRONG><P CLASS=block> X11::Auth - Perl module to read X11 authority files</P></STRONG>
</TD></TR>
</TABLE>
</BODY>
</HTML>