You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

212 lines
7.9 KiB

<!-- http://960.gs/ -->
<!-- this version of 960.css has been modified to align everything to the left instead of centered by default -->
<LINK href="http://eamonnw.metapath.org/do_not_delete_960.css" rel="stylesheet" type="text/css">
<style>
.grid_11 {
/* Fixed width font is pleasing to the eye for those accustomed to terminals */
font-family:"Courier New";
/* text is justified, looks more like a man page or rfc document now */
text-align: justify;
/* space is added between words to achieve justified text */
text-justify : inter-word;
/* very long words e.g. http urls etc will be wrapped mid-word, otherwise they would breakout of parent div */
word-wrap: break-word;
}
</style>
<div class="container_12">
<div class="grid_11 prefix_1">
<h4>Contents</h4>
<ul>
<li><a href="#introduction">Introduction</a></li>
<li><a href="#everybody">Steps for Everybody</a></li>
<li><a href="#configuring">Configuring</a></li>
<li><a href="#post">After the Game Steps</a></li>
<li><a href="#tips">Tips</a></li>
</ul>
<h4><a name="introduction">Introduction: xscrabble at SDF</a></h4>
<p>xscrabble is scrabble over X11. This will cover the basic steps on
setting up xscrabble over SSH on SDF.</p>
<p>xscrabble is an X11 application, and requires the <a href="http://sdf.org/?join#meta">MetaARPA membership</a>
level for running X applications on SDF.</p>
<p>xscrabble is started by the Dungeon Master (DM). The DM will also be a
player. The DM controls how many players participate, and configures the
parameters of the game. Players who wish to join a game must allow the DM
to send an X client to the local X server (the X server that is running on
the player's local machine).</p>
<p><b>Players must be aware of this, and the potential nuisance/safety
issues.</b> Like so many things in life, play with people you trust.</p>
<p>The instructions below will cover the general steps for the players and
the DM to begin playing xscrabble.</p>
<h4><a name="everybody">Everybody do this first</a></h4>
<ul>
<li>The DM and players must all be logged into the same machine.</li>
<li>The DM and players must have the correct <a
href="http://sdf.org/?join#meta">membership</a> to run X clients on
SDF.</li>
<li> Working X-over-ssh setup; please test this by running xterm or
xeyes first. For help, please read this <a
href="http://sdf.org/?tutorials/x11_forwarding#ssh">tutorial</a> or ask
in <a href="http://sdf.org/?tutorials/comnotirc">com</a> or
bboard.</li>
<li>Check the DISPLAY environment variable set by ssh: <code>echo
$DISPLAY</code>.
The output will look like <pre>
iceland:wliao$ echo $DISPLAY
localhost:10.0
</pre>
If this value is not set automatically, then something may not be
configured correctly.</li>
</ul>
<h4><a name="configuring">Configuring</a></h4>
<h5>Players</h5>
<ul>
<li>Log into the designated SDF machine. This should be the server
where the DM will be running the game from.</li>
<li>From the command line, run this command to generate the
magic cookie information: <code>myxauth</code>. The output will look
like <pre>
iceland:wliao$ myxauth
iceland/unix:13 MIT-MAGIC-COOKIE-1 155866ddc1ec4439ca6b6b10c211369e
</pre></li>
<li>Please note the display name of the cookie information. The display
name will be the first white space separated field in the cookie
information (<code>iceland/unix:10</code>).</li>
<li>Send the cookie information to the DM. Please take care to
privately send this information. This is the information that allows
the DM to start X clients on the player's X server </li>
</ul>
<h5>DM Add Access</h5>
<ul>
<li>Log into the designated SDF machine. This should be the server
where the DM told everybody else to log into.</li>
<li>For every player, collect their magic cookie information. Please
take care to track which player corresponds to which magic cookie.</li>
<li>Also note the display field in the cookie information. The display
field is the first white space separated field in the cookie
information (<code>iceland/unix:10</code>)</li>
<li>Start the xauth command: <code>xauth</code>. This will drop the DM
into a subshell.</li>
<li>For each magic cookie, add the cookie information: <code>add
iceland/unix:10 MIT-MAGIC-COOKIE-1
fd61840e6ae37fbccc74ac8dfa7ce1fd</code>. <pre>
iceland:wliao$ xauth
Using authority file /arpa/tz/w/wliao/.Xauthority
xauth> add iceland/unix:10 MIT-MAGIC-COOKIE-1 fd61840e6ae37fbccc74ac8dfa7ce1fd
xauth> add iceland/unix:13 MIT-MAGIC-COOKIE-1 41660822631aa698c4fe791d6b4fbd7f
xauth>
</pre></li>
<li>When complete, use exit to save the data and exit xauth.<pre>
iceland:wliao$ xauth
Using authority file /arpa/tz/w/wliao/.Xauthority
xauth> add iceland/unix:10 MIT-MAGIC-COOKIE-1 fd61840e6ae37fbccc74ac8dfa7ce1fd
xauth> add iceland/unix:13 MIT-MAGIC-COOKIE-1 41660822631aa698c4fe791d6b4fbd7f
xauth> exit
Writing authority file /arpa/tz/w/wliao/.Xauthority
</pre></li>
</ul>
<h5>DM Add Players</h5>
<ul>
<li>Start xscrabble: <code>xscrabble &</code></li>
<li><p>Select the number of players.</p>
<p><img src="tutorials/images/xscrabble/xscrabble_players.png" /></p></li>
<li><p>For each player, add the player's name and the player's display.
The display will be <code>localhost:<em>n</em>.0</code> where
<em>n</em> corresponds to the number in the display field of the cookie
information.</p>
<p>For example, player 1 has a cookie information where the
display field is <code>iceland/unix:<em>10</em></code>. The n for
display will be 10. If the display number is m.n (eg,
iceland/unix:10.1), please use m.n in the display instead.</p>
<p><img src="tutorials/images/xscrabble/xscrabble_name_display.png" /></p>
<p>Do not forget to add the DM's display as well</p>
</li>
<li>Click "start game" to start the game</li>
</ul>
<h4><a name="post">After the game</a></h4>
<p>After the game is complete, the players should revoke the DM's access to
the X server. Players should run <code>xauth remove iceland/unix:12</code>
where <em>iceland/unix:12</em> is the display name of the cookie information.</p>
<p>DMs should remove their access to the player's X server by running the same
command for every cookie information they received: <code>xauth remove
iceland/unix:12</code>.</p>
<p>Both players and DM can remove the xauth file to ensure the revocation:
<code>rm ~/.Xauthority</code>. The xuath information will be recreated
when logging back into SDF.</p>
<h4><a name="tips">Tips</a></h4>
<ul>
<li>The various windows have "Dismiss" buttons. Use the buttons! If the
window is closed, then the game will end.</li>
<li>At the end of the game, the high score board will only appear for
the DM. Of course, all players may examine the score board at any time
through the "Extras Menu".</li>
<li>screen users who reattach, please note the DISPLAY from
<em>within</em> screen may be invalid. Remember to look at the DISPLAY
variable (and thus, the myxauth command) outside of screen.</li>
<li>Remember to take screenshots as a trophy of your conquest. This
one-liner will take a screenshot of the entire screen and save it to a
file named war_trophy.png: <pre>
iceland:/tmp/wl$ xwd -root | /usr/pkg/bin/xwdtopnm | /usr/pkg/bin/pnmtopng > war_trophy.png
</pre>
This command may take a while to run.</li>
<li>For the impatient, the actual game may be started by hand. jgw says:<pre>
--- jgw@iceland -------------------------------------------
you can also call xscrab directly:
XSCRAB='xscrab -players 1 -time 0 -d1 ${DISPLAY} -t1 0'
ssh -24Y -c blowfish -p 443 jgw@miku.sdf.org ${XSCRAB}
--- jgw@iceland -------------------------------------------
</pre>
</li>
</ul>
<p>This tutorial is far from complete. Wanna make it better? Edit it!</p>
<hr>
<cite>$Id: xscrabble.html,v 1.12 2014/09/11 09:01:04 grobe0ba Exp $</cite>
</div>
</div>