msmhq / msm

An init script for managing Minecraft servers
http://msmhq.com
GNU General Public License v3.0
1.22k stars 225 forks source link

[Need help!] GNU Screen arguments (flags) and java arguments (flags) #423

Open Agent-null opened 3 years ago

Agent-null commented 3 years ago

I am trying to add flags to "screen" and to "java" to enable utf encoding in console output. I am using Debian 8.

https://msmhq.com/docs/commands/global.html - This page shows that there is msm.conf in /etc/msm.conf. I have modified line # 165 in msm.conf to include "-Dfile.encoding=UTF8" which is a valid java flag: DEFAULT_INVOCATION="java -Dfile.encoding=UTF8 -Xms{RAM}M -Xmx{RAM}M -jar {JAR} nogui"

I have also found an "msm" file in /usr/local/bin/msm I have modified line #3254 to this: register_server_setting INVOCATION "java -Dfile.encoding=UTF8 -Xms{RAM}M -Xmx{RAM}M -jar {JAR} nogui" (added -Dfile.encoding=UTF8 which is a valid java flag) And line #1430 to this: as_user "${SERVER_USERNAME[$1]}" "cd \"${SERVER_PATH[$1]}\" && screen -U -dmS \"${SERVER_SCREEN_NAME[$1]}\" ${SERVER_INVOCATION[$1]}" (added -U option, which is a valid GNU Screen flag)

And still when starting the server nothing seems to have changed at all. I have tried a manual server boot via screen, adding the -U flag and adding the java flag (but not adding -dmS "screen" flag) and i got the expected results - I could see UTF-8 characters in console.

Please tell me what i am doing wrong and if possible, how I can make the flags work or get the utf-8 output.

EDIT After reinstalling everything and adding the same flags - it seems to now work fine.