diff -bNurdX diff_ign.txt NetHack-5.0.0/include/color.h nh500jlbuild/include/color.h
--- NetHack-5.0.0/include/color.h	2026-05-02 19:47:25.000000000 +0300
+++ nh500jlbuild/include/color.h	2026-05-26 18:27:39.223904931 +0300
@@ -15,7 +15,7 @@
 #define CLR_RED 1
 #define CLR_GREEN 2
 #define CLR_BROWN 3 /* on IBM, low-intensity yellow is brown */
-#define CLR_BLUE 4
+#define CLR_BLUE 12 /* 4 */
 #define CLR_MAGENTA 5
 #define CLR_CYAN 6
 #define CLR_GRAY 7 /* low-intensity white */
diff -bNurdX diff_ign.txt NetHack-5.0.0/include/config.h nh500jlbuild/include/config.h
--- NetHack-5.0.0/include/config.h	2026-05-02 19:47:25.000000000 +0300
+++ nh500jlbuild/include/config.h	2026-05-11 17:10:11.738267586 +0300
@@ -5,7 +5,7 @@
 
 #ifndef CONFIG_H /* make sure the compiler does not see the typedefs twice */
 #define CONFIG_H
-
+#undef DLB
 /*
  * Section 1:   Operating and window systems selection.
  *              Select the version of the OS you are using.
@@ -55,8 +55,12 @@
 #if !defined(NOTTYGRAPHICS)
 #define TTY_GRAPHICS /* good old tty-based graphics */
 #endif
-/* #define CURSES_GRAPHICS *//* Curses interface - Karl Garrison*/
-/* #define X11_GRAPHICS */   /* X11 interface */
+#if !defined(CURSES_GRAPHICS)
+#define CURSES_GRAPHICS /* Curses interface - Karl Garrison*/
+#endif
+#if !defined(X11_GRAPHICS)
+#define X11_GRAPHICS    /* X11 interface */
+#endif
 /* #define QT_GRAPHICS */    /* Qt interface */
 /* #define MSWIN_GRAPHICS */ /* Windows NT, CE, Graphics */
 
@@ -158,7 +162,9 @@
  *  xpmtoppm <x11tiles.xpm | pnmscale 1.25 | ppmquant 90 | \
  *      ppmtoxpm >x11tiles_big.xpm
  */
-/* # define USE_XPM */ /* Disable if you do not have the XPM library */
+#ifndef USE_XPM
+# define USE_XPM  /* Disable if you do not have the XPM library */
+#endif
 #ifdef USE_XPM
 #ifndef GRAPHIC_TOMBSTONE
 #define GRAPHIC_TOMBSTONE /* Use graphical tombstone (rip.xpm) */
@@ -387,11 +393,11 @@
 
 #if defined(UNIX) && !defined(ZLIB_COMP) && !defined(COMPRESS)
 /* path and file name extension for compression program */
-#define COMPRESS "/usr/bin/compress" /* Lempel-Ziv compression */
-#define COMPRESS_EXTENSION ".Z"      /* compress's extension */
+/*#define COMPRESS "/usr/bin/compress" */ /* Lempel-Ziv compression */
+/*#define COMPRESS_EXTENSION ".Z" */     /* compress's extension */
 /* An example of one alternative you might want to use: */
-/* #define COMPRESS "/usr/local/bin/gzip" */ /* FSF gzip compression */
-/* #define COMPRESS_EXTENSION ".gz" */       /* normal gzip extension */
+#define COMPRESS "/usr/bin/gzip"  /* FSF gzip compression */
+#define COMPRESS_EXTENSION ".gz"        /* normal gzip extension */
 #endif
 
 #ifndef COMPRESS
@@ -444,7 +450,7 @@
  * otherwise it will be the current directory.
  */
 #ifndef HACKDIR
-#define HACKDIR "/usr/games/lib/nethackdir"
+#define HACKDIR "/usr/games/lib/nh500dir"
 #endif
 
 /*
@@ -454,8 +460,9 @@
  * since the user might create files in a directory of his choice.
  * Of course SECURE is meaningful only if HACKDIR is defined.
  */
-/* #define SECURE */ /* do setuid(getuid()) after chdir() */
-
+#ifndef SECURE
+#define SECURE  /* do setuid(getuid()) after chdir() */
+#endif
 /*
  * If it is desirable to limit the number of people that can play Hack
  * simultaneously, define HACKDIR, SECURE and MAX_NR_OF_PLAYERS (or use
@@ -624,7 +631,7 @@
 
 /* SCORE_ON_BOTL is neither experimental nor inadequately tested,
    but doesn't seem to fit in any other section... */
-/* #define SCORE_ON_BOTL */         /* enable the 'showscore' option to
+#define SCORE_ON_BOTL          /* enable the 'showscore' option to
                                      * show estimated score on status line */
 
 /* FREE_ALL_MEMORY is neither experimental nor inadequately tested,
@@ -666,7 +673,9 @@
 #undef LIVELOG
 #endif /* NO_CHRONICLE */
 
-/* #define DUMPLOG */  /* End-of-game dump logs */
+#ifndef DUMPLOG
+#define DUMPLOG   /* End-of-game dump logs */
+#endif
 
 #define USE_ISAAC64 /* Use cross-platform, bundled RNG */
 
diff -bNurdX diff_ign.txt NetHack-5.0.0/sys/unix/hints/include/multiw-1.500 nh500jlbuild/sys/unix/hints/include/multiw-1.500
--- NetHack-5.0.0/sys/unix/hints/include/multiw-1.500	2026-05-02 19:47:25.000000000 +0300
+++ nh500jlbuild/sys/unix/hints/include/multiw-1.500	2026-05-13 00:16:49.968628845 +0300
@@ -5,9 +5,9 @@
 # 1. Which windowing interface(s) should be included in this binary?
 # One or more of these can be manually uncommented and/or can be specified
 # on the 'make' command line.  If none are enabled, tty will be used.
-#WANT_WIN_TTY=1
-#WANT_WIN_CURSES=1
-#WANT_WIN_X11=1
+WANT_WIN_TTY=1
+WANT_WIN_CURSES=1
+WANT_WIN_X11=1
 #WANT_WIN_QT=1
 
 # 2. What is the default window system?
diff -bNurdX diff_ign.txt NetHack-5.0.0/sys/unix/hints/linux.500 nh500jlbuild/sys/unix/hints/linux.500
--- NetHack-5.0.0/sys/unix/hints/linux.500	2026-05-02 19:47:25.000000000 +0300
+++ nh500jlbuild/sys/unix/hints/linux.500	2026-05-10 23:43:42.612702996 +0300
@@ -36,11 +36,11 @@
 endif
 
 ifndef LIBXPM
-LIBXPM= -L/opt/X11/lib -lXpm
+LIBXPM= -L/usr/lib64 -lXpm
 endif
 
 #4. Other
-GAMEUID  = $(USER)
+GAMEUID  = games
 GAMEGRP  = games
 
 # This gives better backtraces by making all core functions global; this
@@ -275,7 +275,7 @@
 # -x: if built without dlb, some versions of mkfontdir think *.lev are fonts
 POSTINSTALL += bdftopcf win/X11/nh10.bdf > $(HACKDIR)/nh10.pcf; ( cd $(HACKDIR); mkfontdir -x .lev );
 # separate from CFLAGS so that we don't pass it to every file
-X11CFLAGS = -I/opt/X11/include
+X11CFLAGS = -I/usr/include/X11
 # avoid repeated complaints about _X_NONNULL(args...) in <X11/Xfuncproto.h>
 X11CFLAGS += -Wno-variadic-macros
 ifdef USE_XPM
@@ -284,7 +284,7 @@
 VARDATND0 += rip.xpm
 endif
 WINLIB += $(WINX11LIB)
-LFLAGS+=-L/opt/X11/lib
+LFLAGS+=-L/usr/lib64
 endif	# WANT_WIN_X11
 
 ifdef WANT_WIN_QT
@@ -411,19 +411,19 @@
 PREFIX=$(abspath $(NHSROOT))
 #SHELLDIR=
 HACKDIR=$(PREFIX)/playground
-GAMEPERM = 0700
-VARFILEPERM = 0600
-VARDIRPERM = 0700
+GAMEPERM = 02770
+VARFILEPERM = 0660
+VARDIRPERM = 0770
 CFLAGS+=-DSYSCF -DSYSCF_FILE=\"$(HACKDIR)/sysconf\" -DSECURE
 MOREALL=$(MAKE) install
 else #!WANT_SOURCE_INSTALL
-#PREFIX=/usr
-PREFIX=$(wildcard ~)/nh/install
-HACKDIR=$(PREFIX)/games/lib/nethackdir
+PREFIX=/usr
+#PREFIX=$(wildcard ~)/nh/install
+HACKDIR=$(PREFIX)/games/lib/nh500dir
 SHELLDIR = $(PREFIX)/games
-VARDIRPERM = 0755
-VARFILEPERM = 0600
-GAMEPERM = 0755
+VARDIRPERM = 0775
+VARFILEPERM = 0664
+GAMEPERM = 02755
 endif #?WANT_SOURCE_INSTALL
 
 INSTDIR=$(HACKDIR)
@@ -472,8 +472,8 @@
 #WINOBJ += tile.o
 # endif
 
-CHOWN=true
-CHGRP=true
+CHOWN=chown
+CHGRP=chgrp
 
 # manpages directory
 MANDIR=/usr/share/man/man6
diff -bNurdX diff_ign.txt NetHack-5.0.0/sys/unix/hints/linux-minimal nh500jlbuild/sys/unix/hints/linux-minimal
--- NetHack-5.0.0/sys/unix/hints/linux-minimal	2026-05-02 19:47:25.000000000 +0300
+++ nh500jlbuild/sys/unix/hints/linux-minimal	2026-05-10 20:29:08.172841084 +0300
@@ -7,8 +7,10 @@
 # Hints file for a minimal build
 # This hints file provides the base for a minimal tty build for Linux
 
-PREFIX=$(wildcard ~)/nethack-minimal
+#PREFIX=$(wildcard ~)/nethack-minimal
+PREFIX=/usr
 HACKDIR=$(PREFIX)/games/lib/$(GAME)dir
+HACKDIR=$(PREFIX)/games/lib/nh500dir
 SHELLDIR=$(PREFIX)/games
 INSTDIR=$(HACKDIR)
 VARDIR=$(HACKDIR)
@@ -28,9 +30,9 @@
 
 WINTTYLIB=-lncurses -ltinfo
 
-CHOWN=true
-CHGRP=true
+CHOWN=chown
+CHGRP=chgrp
 
-VARDIRPERM = 0755
-VARFILEPERM = 0600
-GAMEPERM = 0755
+VARDIRPERM = 0775
+VARFILEPERM = 0660
+GAMEPERM = 02775
diff -bNurdX diff_ign.txt NetHack-5.0.0/sys/unix/Makefile.top nh500jlbuild/sys/unix/Makefile.top
--- NetHack-5.0.0/sys/unix/Makefile.top	2026-05-02 19:47:25.000000000 +0300
+++ nh500jlbuild/sys/unix/Makefile.top	2026-05-10 22:36:03.671121613 +0300
@@ -21,20 +21,20 @@
 # MAKE = make
 
 #	make NetHack (as opposite to variants or such)
-#PREFIX	 = /usr
+PREFIX	 = /usr
 GAME     = nethack
 # GAME     = nethack.exe
 # GAME     = nethack.prg
-#GAMEUID  = games
-#GAMEGRP  = bin
+GAMEUID  = games
+GAMEGRP  = games
 
 #	Permissions - some places use setgid instead of setuid, for instance.
 #	See also the option "SECURE" in include/config.h.
-#GAMEPERM = 04755
-FILEPERM = 0644
+GAMEPERM = 02755
+FILEPERM = 0664
 # VARFILEPERM = 0644
-EXEPERM  = 0755
-DIRPERM  = 0755
+EXEPERM  = 02775
+DIRPERM  = 0775
 # VARDIRPERM = 0755
 
 #	VARDIR may also appear in unixconf.h as "VAR_PLAYGROUND" else HACKDIR
@@ -44,8 +44,8 @@
 #	therefore there should not be anything in HACKDIR that you want to
 #	keep (if there is, you'll have to do the installation by hand or
 #	modify the install commands below).
-#HACKDIR  = $(PREFIX)/games/lib/$(GAME)dir
-#VARDIR  = $(HACKDIR)
+HACKDIR  = $(PREFIX)/games/lib/nh500dir
+VARDIR  = $(HACKDIR)
 #	Where nethack.sh is installed (as 'nethack').
 #	If this is not defined, the shell wrapper script is not used.
 #SHELLDIR = $(PREFIX)/games
@@ -454,7 +454,7 @@
 # not all mkdirs have -p; those that don't will create a -p directory
 	-if test -n '$(SHELLDIR)'; then \
 		mkdir -p $(SHELLDIR); fi
-	rm -rf $(INSTDIR) $(VARDIR)
+#	rm -rf $(INSTDIR) $(VARDIR)
 	-mkdir -p $(INSTDIR) $(VARDIR) $(VARDIR)/save
 	if test -d ./-p; then rmdir ./-p; fi
 	-$(CHOWN) $(GAMEUID) $(INSTDIR) $(VARDIR) $(VARDIR)/save
diff -bNurdX diff_ign.txt NetHack-5.0.0/sys/unix/nethack.sh nh500jlbuild/sys/unix/nethack.sh
--- NetHack-5.0.0/sys/unix/nethack.sh	2026-05-02 19:47:25.000000000 +0300
+++ nh500jlbuild/sys/unix/nethack.sh	2026-05-10 23:42:42.661001008 +0300
@@ -3,7 +3,7 @@
 # Copyright (c) 2015 by Kenneth Lorber, Kensington, Maryland
 # NetHack may be freely redistributed.  See license for details.
 
-HACKDIR=/usr/games/lib/nethackdir
+HACKDIR=/usr/games/lib/nh500dir
 export HACKDIR
 HACK=$HACKDIR/nethack
 
