Difference between revisions of "Dgamelaunch"

From NetHackWiki
Jump to navigation Jump to search
m (Unix/Linux with OpenSSH client: Emphasize difference between SET and SEND)
(correct grammar and simplify OpenSSH connection)
Line 1: Line 1:
'''dgamelaunch''' is a program that manages user logins, game viewing and launching NetHack on [[nethack.alt.org]] and some other servers. It was originally written by Drew Streib, but has been expanded by several other people.
+
'''dgamelaunch''' is a program that manages user logins, game viewing and launching NetHack on [[public server]]s such as [[nethack.alt.org]]. It was originally written by Drew Streib, but has been expanded by several other people.
  
 
Dgamelaunch also supports [[dgamelaunch mail]].
 
Dgamelaunch also supports [[dgamelaunch mail]].
  
 
==Automatic Login==
 
==Automatic Login==
Putting your login and password everytime you want to connect to a dgamelaunch server is annoying. Luckily, there are simple ways of automating the process.
+
Putting your login and password every time you want to connect to a dgamelaunch server is annoying. Luckily, there are simple ways of automating the process.
  
 
===PuTTY===
 
===PuTTY===
If you want to use telnet (which you shouldn't), in configuration go to <code>Connection > Data</code> and in the section <code>Environment Variables</code> add new variable '''USER''' and set its value to "''yourname'':''yourpassword''" (without the quotes).
+
If you want to use Telnet, in your saved session's configuration, go to <code>Connection > Data</code>, and in the section <code>Auto-login username</code> enter your credentials in the format "''yourname'':''yourpassword''" (without the quotes). An alternative method available under <code>Environment Variables</code> is to add a new variable '''USER''' and set its value to the same. Note that Telnet traffic is unencrypted and unauthenticated, so you risk exposing your credentials to an attacker snooping on your local network or the Internet.
  
If you use SSH protocol, you will use the same method as for telnet, but the variable is '''DGLAUTH'''. The value is the same. Also, set the <code>Auto-login username</code> to whatever your dgamelaunch server uses, typically '''nethack'''.
+
If you use the more secure SSH protocol, you will use the environment variable method as for Telnet, but the variable name is '''DGLAUTH'''. The value is the same. Also, set the <code>Auto-login username</code> to whatever your dgamelaunch server uses, typically ''nethack''.
  
===Unix/Linux with telnet===
+
===Unix/Linux with Telnet===
 
Use following command:
 
Use following command:
  
 
  telnet -l ''yourname'':''yourpassword'' hostname
 
  telnet -l ''yourname'':''yourpassword'' hostname
  
===Unix/Linux with OpenSSH client===
+
===Unix/Linux with the OpenSSH client===
In your <code>~/.ssh/config</code> create a section for your server; here we give example for [[NAO]]:
+
One simple way to send the appropriate environment variable is to create an alias in your .bashrc or .bash_aliases file to connect with the correct options:
  
  Host nao
+
  alias nao='ssh -o SetEnv="DGLAUTH=YourName:Na0p4ss" nethack@nethack.alt.org'
  Hostname nethack.alt.org
+
alias hdf='ssh -o SetEnv="DGLAUTH=YourName:Hard4t" nethack@hardfought.org'
  User nethack
 
  SendEnv DGLAUTH
 
 
 
Now you need to define the '''DGLAUTH''' environment variable to contain "''yourname'':''yourpassword''". One way is to simply create a short shell script for it:
 
 
 
#!/bin/sh
 
 
export DGLAUTH="YourName:Pa$$w0rd"
 
ssh nao
 
 
 
Alternatively, you can define the variable in <code>.ssh/environment</code>, but make sure the ssh client is not sending it to other hosts you connect to. This method is unfortunately unsuitable when you are using different passwords for different dgamelaunch sites (as you should).
 
  
As an alternative to using a script or <code>~/.ssh/environment</code>, the <code>SetEnv</code> option can be used to set the value of <code>DGLAUTH</code> directly for each public server from <code>~/.ssh/config</code>, for example:
+
Another method is to create host sections in <code>~/.ssh/config</code>, for example:
  
 
  Host nao
 
  Host nao
Line 45: Line 34:
 
   SetEnv DGLAUTH="YourName:Hard4t"
 
   SetEnv DGLAUTH="YourName:Hard4t"
  
Note the difference between <b>Set</b>Env, which allows you to set the variable directly in <code>~/.ssh/config</code>, and <b>Send</b>Env, which transmits the current value of the environment variable.
+
Then you can "ssh nao" or "ssh hdf", and the correct connection settings will be used automatically.
  
 
==Installing==
 
==Installing==

Revision as of 14:19, 5 November 2022

dgamelaunch is a program that manages user logins, game viewing and launching NetHack on public servers such as nethack.alt.org. It was originally written by Drew Streib, but has been expanded by several other people.

Dgamelaunch also supports dgamelaunch mail.

Automatic Login

Putting your login and password every time you want to connect to a dgamelaunch server is annoying. Luckily, there are simple ways of automating the process.

PuTTY

If you want to use Telnet, in your saved session's configuration, go to Connection > Data, and in the section Auto-login username enter your credentials in the format "yourname:yourpassword" (without the quotes). An alternative method available under Environment Variables is to add a new variable USER and set its value to the same. Note that Telnet traffic is unencrypted and unauthenticated, so you risk exposing your credentials to an attacker snooping on your local network or the Internet.

If you use the more secure SSH protocol, you will use the environment variable method as for Telnet, but the variable name is DGLAUTH. The value is the same. Also, set the Auto-login username to whatever your dgamelaunch server uses, typically nethack.

Unix/Linux with Telnet

Use following command:

telnet -l yourname:yourpassword hostname

Unix/Linux with the OpenSSH client

One simple way to send the appropriate environment variable is to create an alias in your .bashrc or .bash_aliases file to connect with the correct options:

alias nao='ssh -o SetEnv="DGLAUTH=YourName:Na0p4ss" nethack@nethack.alt.org'
alias hdf='ssh -o SetEnv="DGLAUTH=YourName:Hard4t" nethack@hardfought.org'

Another method is to create host sections in ~/.ssh/config, for example:

Host nao
 Hostname nethack.alt.org
 User nethack
 SetEnv DGLAUTH="YourName:Na0p4ss"

Host hdf
 Hostname hardfought.org
 User nethack
 SetEnv DGLAUTH="YourName:Hard4t"

Then you can "ssh nao" or "ssh hdf", and the correct connection settings will be used automatically.

Installing

You can download the sources from http://alt.org/nethack/dgamelaunch/ or you can get the development version from the git repository by using the following command.

git clone git://github.com/paxed/dgamelaunch.git

For the SVN version setup, see User:Paxed/HowTo setup dgamelaunch.

External Links