diff --git a/nethack-launcher.go b/nethack-launcher.go index 3813b7d..234a6fc 100644 --- a/nethack-launcher.go +++ b/nethack-launcher.go @@ -442,7 +442,9 @@ func printProgressScreen(redisClient *redis.Client, username string) { } func runGame(username, timestamp string) { - nhCommand := fmt.Sprintf("nethack -d %s -u %s\n", config.NethackLauncher.HackDir, username) + // put together users home dir + homeDir := fmt.Sprintf("%s/user/%s/", config.NethackLauncher.HackDir, username) + nhCommand := fmt.Sprintf("HOME=%s nethack -d %s -u %s\n", homeDir, config.NethackLauncher.HackDir, username) ttyrecPath := fmt.Sprintf("%s/user/%s/ttyrec/%s.ttyrec", config.NethackLauncher.HackDir, username, timestamp) exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() clearScreen()