1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<!-- Created by GNU Texinfo 6.7, http://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>tkconnect (GCL TK Manual)</title>
<meta name="description" content="tkconnect (GCL TK Manual)">
<meta name="keywords" content="tkconnect (GCL TK Manual)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<link href="index.html" rel="start" title="Top">
<link href="wm.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="General.html" rel="up" title="General">
<link href="Widgets.html" rel="next" title="Widgets">
<link href="Linked-Variables.html" rel="prev" title="Linked Variables">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.indentedblock {margin-right: 0em}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
kbd {font-style: oblique}
pre.display {font-family: inherit}
pre.format {font-family: inherit}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
span.nolinebreak {white-space: nowrap}
span.roman {font-family: initial; font-weight: normal}
span.sansserif {font-family: sans-serif; font-weight: normal}
ul.no-bullet {list-style: none}
-->
</style>
</head>
<body lang="en">
<span id="tkconnect"></span><div class="header">
<p>
Previous: <a href="Linked-Variables.html" accesskey="p" rel="prev">Linked Variables</a>, Up: <a href="General.html" accesskey="u" rel="up">General</a> [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
<hr>
<span id="tkconnect-1"></span><h3 class="section">1.8 tkconnect</h3>
<div class="example">
<pre class="example"><i>tkconnect</i> &key host display can-rsh gcltksrv
</pre></div>
<p>This function provides a connection to a graphics server process, which
in turn connects to possibly several graphics display screens. The
graphics server process, called <samp>gcltksrv</samp> may or may not run
on the same machine as the lisp to which it is attached.
<code>display</code>
indicates the name of the default display to connect to, and this
in turn defaults to the value of the environment variable <code>DISPLAY</code>.
</p>
<p>When <i>tkconnect</i> is invoked, a socket is opened and it waits for
a graphics process to connect to it. If the host argument is not
supplied, then a process will be spawned which will connect back to
the lisp process. The name of the command for invoking the process
is the value of the <samp>gcltksrv</samp> argument, which defaults to
the value of the environment variable <code>GCL_TK_SERVER</code>. If that variable
is not set, then the lisp <code>*lib-directory*</code> is searched for
an entry <samp>gcl-tk/gcltksrv</samp>.
</p>
<p>If <code>host</code> is supplied, then a command to run on the remote machine
will be printed on standard output. If <code>can-rsh</code> is not nil,
then the command will not be printed, but rather an attempt will be
made to rsh to the machine, and to run the command.
</p>
<p>Thus
</p>
<div class="example">
<pre class="example">(tkconnect)
</pre></div>
<p>would start the process on the local machine, and use for <code>display</code>
the value of the environment variable <code>DISPLAY</code>.
</p>
<div class="example">
<pre class="example">(tkconnect :host "max.ma.utexas.edu" :can-rsh t)
</pre></div>
<p>would cause an attempt to rsh to <code>max</code> and to run the command
there, to connect back to the appropriate port on the localhost.
</p>
<p>You may indicate that different <i>toplevel</i> windows be on different
displays, by using the <code>:display</code> argument when creating the
window, See <a href="toplevel.html">toplevel</a>.
</p>
<p>Clearly you must have a copy of the program <samp>gcltksrv</samp> and <b>TK</b>
libraries installed on the machine where you wish to run the server.
</p>
<hr>
<div class="header">
<p>
Previous: <a href="Linked-Variables.html" accesskey="p" rel="prev">Linked Variables</a>, Up: <a href="General.html" accesskey="u" rel="up">General</a> [<a href="wm.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>]</p>
</div>
</body>
</html>
|