Skip to content

Commit 9df2e2a

Browse files
committed
v1.2.6: Skip startup scripts (run.sh/run.bat), use JAR-based startup instead
Fixes readline/library crash on Gentoo Linux/AppImage (Issue #11)
1 parent e48e2c1 commit 9df2e2a

3 files changed

Lines changed: 13 additions & 38 deletions

File tree

backend/server/server_handler.py

Lines changed: 5 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -581,42 +581,10 @@ def _get_start_command(self):
581581
custom_env["PATH"] = f"{java_bin_dir}{path_sep}{custom_env.get('PATH', '')}"
582582
logging.info(f"Handler: Injected Environment - JAVA_HOME={java_root}")
583583

584-
run_script = None
585-
586-
# Universal check for startup scripts
587-
if sys.platform == "win32":
588-
script_path = os.path.join(self.server_path, "run.bat")
589-
if os.path.exists(script_path):
590-
run_script = script_path
591-
else:
592-
# Check for other common names
593-
for alt in ["start.bat", "launch.bat", "run-server.bat"]:
594-
alt_path = os.path.join(self.server_path, alt)
595-
if os.path.exists(alt_path):
596-
run_script = alt_path
597-
break
598-
else: # For macOS and Linux
599-
script_path = os.path.join(self.server_path, "run.sh")
600-
if os.path.exists(script_path):
601-
run_script = script_path
602-
else:
603-
for alt in ["start.sh", "launch.sh", "run-server.sh"]:
604-
alt_path = os.path.join(self.server_path, alt)
605-
if os.path.exists(alt_path):
606-
run_script = alt_path
607-
break
608-
609-
# If a run script is found, prioritize it
610-
if run_script:
611-
self.output_callback(
612-
f"Detected startup script: {os.path.basename(run_script)}. Using it to launch.\n",
613-
"info",
614-
)
615-
return [run_script, "--nogui"], custom_env
616-
617-
# Fallback to JAR-based startup if no script is found
584+
# JAR-based startup (skipping run.sh/run.bat scripts to avoid
585+
# readline/library conflicts on Linux/AppImage environments)
618586
self.output_callback(
619-
"No startup script found. Using generic JAR startup method.\n", "info"
587+
"Starting server via JAR-based method (skipping startup scripts).\n", "info"
620588
)
621589
all_jars = glob.glob(os.path.join(self.server_path, "*.jar"))
622590
server_jar_path = None
@@ -649,7 +617,7 @@ def _get_start_command(self):
649617
elif all_jars: # Fallback if only installer jars are present for some reason
650618
server_jar_path = all_jars[0]
651619

652-
if not server_jar_path and not run_script:
620+
if not server_jar_path:
653621
# Special check for Forge/NeoForge libraries if run.bat is missing
654622
if self.server_type in ["forge", "neoforge"]:
655623
self.output_callback("Startup script missing. Checking libraries for server JAR...\n", "info")
@@ -668,7 +636,7 @@ def _get_start_command(self):
668636
else:
669637
self.output_callback("Could not find server JAR in libraries. Installation might be incomplete.\n", "warning")
670638

671-
if not server_jar_path and not run_script:
639+
if not server_jar_path:
672640
# Audit directory before failing
673641
try:
674642
files = os.listdir(self.server_path)

changelog.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Minecraft Server GUI - Changelog
22

3+
## Version 1.2.6 - 2026-06-02 READLINE / STARTUP SCRIPTS FIX
4+
5+
### FIXED:
6+
- **Startup scripts (run.sh/run.bat) no longer executed** — The app now uses direct JAR-based startup instead of running `run.sh`/`run.bat` scripts. Fixes `undefined symbol: rl_macro_display_hook` crash on Gentoo Linux / AppImage environments (Issue #11)
7+
8+
---
9+
310
## Version 1.2.5 - 2026-05-28 DNS PROXY, FIXED ADDRESSES & CONSOLE
411

512
### CRITICAL FIX:

electron-app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "minecraft-server-gui",
33
"private": true,
4-
"version": "1.2.53",
4+
"version": "1.2.6",
55
"repository": {
66
"type": "git",
77
"url": "https://github.com/CalaKuad1/Minecraft-Local-Server-GUI.git"

0 commit comments

Comments
 (0)