So, you just installed BatClient aka the fancy custom MUD client for BatMUD probably through Steam, on your Linux system, and for some reason it does not start. What gives?
There may be several reasons, but the one I've ran into myself is that the Excelsior JET runtime used by BatClient has a silly bug - it attempts to use the system's limit for maximum number of concurrently open file descriptors to determine how much memory to allocate for .. something.
On many modern Linux systems, such as later versions of Ubuntu such as 25.04, that setting is "unlimited" by default. And you may now start to see wherein the problem lies... attempting to allocate unlimited amount of memory will inevitably fail.
To circumvent this issue, we need to change the limit to some value that is less than infinite but still reasonably high. In a Linux system this can be done via "ulimit -H -n [value]" command on commandline, before starting BatClient (or Steam) from that commandline. This only affects that shell's (and its child processes') limits and is not persistent.
A more persistent fix would be do to ONE of the following options:
This first option is the most targeted solution, impacting only BatClient itself. However, it may get broken by updates and I have not personally tested if it actually works with Steam. It consists of renaming the BatClient executable and using a wrapper script to set the limit.
mv BatMUD BatMUD.bin
printf '#!/bin/sh\nif test "$(ulimit -n)" = "unlimited"; then\n ulimit -H -n 12345\nfi\n./BatMUD.bin "$@"\n' > BatMUDThe contents of the file will be:
#!/bin/sh
if test "$(ulimit -n)" = "unlimited"; then
ulimit -H -n 12345
fi
./BatMUD.bin "$@"
chmod u+x BatMUD
echo "* hard nofile 1234567" > /etc/security/limits.d/99-nfiledescs-batclient-fix.conf
echo "* hard nofile 1234567" >> /etc/security/limits.confNOTE: It might be wiser to just edit the file and see if such line (with "hard nofile") already exists and modify that.
Obviously you must do either of things as superuser (root). The value "1234567" is obviously arbitrary here and does not necessarily need to be that high. After that you will need to restart your session or reboot for the limits to take effect.
After rebooting, open a terminal and check that the configuration was correctly applied by invoking "ulimit -H -n", which should print out 1234567.
I take no responsibility on the accuracy or applicability of the information presented here. Modifying system configuration or running commands from the Interwebs without understanding what you are doing is not advisable.