diff --git a/os/utils.c b/os/utils.c
index ed7581e..6593455 100644
--- a/os/utils.c
+++ b/os/utils.c
@@ -658,6 +658,10 @@ ProcessCommandLine(int argc, char *argv[])
defaultKeyboardControl.autoRepeat = TRUE;
+ char *xkbBinDir = getenv("XKB_BINDIR");
+ if (xkbBinDir)
+ XkbBinDirectory = Xstrdup(xkbBinDir);
+
#ifdef NO_PART_NET
PartialNetwork = FALSE;
#else