Fixing LM Studio AppImage Issues on Linux

Home » Updates » Updates » Fixing LM Studio AppImage Issues on Linux

What’s the Issue with LM Studio on Linux?

When closing LM Studio via its internal “Quit” menu or window closure, the main GUI disappears, but background processes such as LLM server components may remain running. This is a known bug in the LM Studio AppImage itself.

Our Solution – Two Simple Scripts

Instead of relying on the AppImage internal quit mechanism, we provide:

  • lmstudio-launch: A clean launcher script that starts the LM Studio AppImage.
  • lmstudio-shutdown: A powerful script to forcefully terminate any lingering processes.

How to Set It Up

Step 1: Place the LM Studio AppImage

Download the LM Studio AppImage from LM Studio’s official website and place it in a dedicated directory, e.g., ~/lmstudio/.

Step 2: Create the Launch Script (lmstudio-launch)

Save this script at ~/lmstudio/scripts/lmstudio-launch with the following content:

Make it executable using:

Step 3: Create the Shutdown Script (lmstudio-shutdown)

Save this script at ~/lmstudio/scripts/lmstudio-shutdown with the following content:

Make it executable using:

Step 4: Optional – Create Desktop Launchers (Recommended)

For convenience, you can create .desktop files for launching and shutting down LM Studio directly from your application menu.

LM Studio logo SVG
LM Studio shutdown icon

Example lmstudio.desktop:

Example lmstudio-quit.desktop:

Place these .desktop files in ~/.local/share/applications/ to make them appear in your application menu. You might need to log out and back in, or refresh your desktop environment’s menu cache for them to appear.

Important Note on pkill -f "lm-studio"

The shutdown script uses a forceful command to terminate processes. While this is effective, use it with caution and ensure you understand its implications.

Want to Help or Report an Issue?

Feel free to open issues or contribute improvements via pull requests on GitHub.

This project is open-source under the MIT License. You’re welcome to use, modify, and redistribute it freely.

Need a assistance with this kind of thing? Contact us to see how we can help.