Difference between revisions of "Dgamelaunch"

From NetHackWiki
Jump to navigation Jump to search
(Make the info more generic.)
(Automatic Login: MobaXterm)
 
(3 intermediate revisions by 2 users not shown)
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===
+
===[https://mobaxterm.mobatek.net/ MobaXterm]===
 +
MobaXterm is a free-to-use terminal client that supports tabbed sessions and a wide variety of protocols. Unfortunately, it doesn't support passing environment variables, but you can use its macro support to automate login. Edit the session properties, and under <code>Advanced SSH settings</code>, change the macro type to <code><custom macro></code>. Add the following lines, in order:
 +
 
 +
Text: lYourName
 +
(This is the lowercase letter "L", followed by your username.)
 +
Key press: RETURN
 +
Text: YourPassword
 +
Key press: RETURN
 +
 
 +
Again, SSH is strongly recommended over 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:
 +
 
 +
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 <code>~/.ssh/config</code>, for example:
  
 
  Host nao
 
  Host nao
 
   Hostname nethack.alt.org
 
   Hostname nethack.alt.org
 
   User nethack
 
   User nethack
   SendEnv DGLAUTH
+
   SetEnv DGLAUTH="YourName:Na0p4ss"
 
 
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"
+
  Host hdf
ssh nao
+
  Hostname hardfought.org
 +
  User nethack
 +
  SetEnv DGLAUTH="YourName:Hard4t"
  
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).
+
Then you can "ssh nao" or "ssh hdf", and the correct connection settings will be used automatically.
  
 
==Installing==
 
==Installing==

Latest revision as of 16:56, 14 December 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.

MobaXterm

MobaXterm is a free-to-use terminal client that supports tabbed sessions and a wide variety of protocols. Unfortunately, it doesn't support passing environment variables, but you can use its macro support to automate login. Edit the session properties, and under Advanced SSH settings, change the macro type to <custom macro>. Add the following lines, in order:

Text: lYourName

(This is the lowercase letter "L", followed by your username.)

Key press: RETURN
Text: YourPassword
Key press: RETURN

Again, SSH is strongly recommended over Telnet.

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