tutes-dump/dump/xscrabble.html.docuwiki

95 lines
6.2 KiB
Plaintext

=== Contents ===
* [[#introduction|Introduction]]
* [[#everybody|Steps for Everybody]]
* [[#configuring|Configuring]]
* [[#post|After the Game Steps]]
* [[#tips|Tips]]
=== [[|Introduction: xscrabble at SDF]] ===
xscrabble is scrabble over X11. This will cover the basic steps on setting up xscrabble over SSH on SDF.
xscrabble is an X11 application, and requires the [[http://sdf.org/?join#meta|MetaARPA membership]] level for running X applications on SDF.
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).
**Players must be aware of this, and the potential nuisance/safety issues.** Like so many things in life, play with people you trust.
The instructions below will cover the general steps for the players and the DM to begin playing xscrabble.
=== [[|Everybody do this first]] ===
* The DM and players must all be logged into the same machine.
* The DM and players must have the correct [[http://sdf.org/?join#meta|membership]] to run X clients on SDF.
* Working X-over-ssh setup; please test this by running xterm or xeyes first. For help, please read this [[http://sdf.org/?tutorials/x11_forwarding#ssh|tutorial]] or ask in [[http://sdf.org/?tutorials/comnotirc|com]] or bboard.
* Check the DISPLAY environment variable set by ssh: "echo $DISPLAY". The output will look like
iceland:wliao$ echo $DISPLAY
localhost:10.0
If this value is not set automatically, then something may not be configured correctly.
=== [[|Configuring]] ===
== Players ==
* Log into the designated SDF machine. This should be the server where the DM will be running the game from.
* From the command line, run this command to generate the magic cookie information: "myxauth". The output will look like
iceland:wliao$ myxauth
iceland/unix:13 MIT-MAGIC-COOKIE-1 155866ddc1ec4439ca6b6b10c211369e
* Please note the display name of the cookie information. The display name will be the first white space separated field in the cookie information ("iceland/unix:10").
* 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
== DM Add Access ==
* Log into the designated SDF machine. This should be the server where the DM told everybody else to log into.
* For every player, collect their magic cookie information. Please take care to track which player corresponds to which magic cookie.
* Also note the display field in the cookie information. The display field is the first white space separated field in the cookie information ("iceland/unix:10")
* Start the xauth command: "xauth". This will drop the DM into a subshell.
* For each magic cookie, add the cookie information: "add iceland/unix:10 MIT-MAGIC-COOKIE-1 fd61840e6ae37fbccc74ac8dfa7ce1fd".
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>
* When complete, use exit to save the data and exit xauth.
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
== DM Add Players ==
* Start xscrabble: "xscrabble &"
* Select the number of players.{{tutorials/images/xscrabble/xscrabble_players.png}}
* For each player, add the player's name and the player's display. The display will be "localhost://n//.0" where //n// corresponds to the number in the display field of the cookie information.For example, player 1 has a cookie information where the display field is "iceland/unix://10//". 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.{{tutorials/images/xscrabble/xscrabble_name_display.png}}Do not forget to add the DM's display as well
* Click "start game" to start the game
=== [[|After the game]] ===
After the game is complete, the players should revoke the DM's access to the X server. Players should run "xauth remove iceland/unix:12" where //iceland/unix:12// is the display name of the cookie information.
DMs should remove their access to the player's X server by running the same command for every cookie information they received: "xauth remove iceland/unix:12".
Both players and DM can remove the xauth file to ensure the revocation: "rm ~/.Xauthority". The xuath information will be recreated when logging back into SDF.
=== [[|Tips]] ===
* The various windows have "Dismiss" buttons. Use the buttons! If the window is closed, then the game will end.
* 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".
* screen users who reattach, please note the DISPLAY from //within// screen may be invalid. Remember to look at the DISPLAY variable (and thus, the myxauth command) outside of screen.
* 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:
iceland:/tmp/wl$ xwd -root | /usr/pkg/bin/xwdtopnm | /usr/pkg/bin/pnmtopng > war_trophy.png
This command may take a while to run.
* For the impatient, the actual game may be started by hand. jgw says:
--- 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 -------------------------------------------
This tutorial is far from complete. Wanna make it better? Edit it!
----
$Id: xscrabble.html,v 1.12 2014/09/11 09:01:04 grobe0ba Exp $