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