Linux Run the GMS2 IDE on Ubuntu 19.04

Discussion in 'Tutorials' started by Tthecreator, Jun 14, 2019.

  1. Tthecreator

    Tthecreator Your Creator!

    Jun 20, 2016
    GM Version: GMS2.2.2.413 (Runtime: v2.2.2.326)
    Target Platform: Ubuntu 19.04 (Other Linux versions may work as well)
    Download: N/A
    Tested with:
    Ubuntu 19.04
    Linux Mint 19.1

    This tutorial tells you how to get GameMakerStudio2 to install, the IDE to run and get it to compile games.
    This is accomplished using wine and some fiddling around with .NET.

    64x bit install of Ubuntu 19.04
    gms2 installer file: GameMakerStudio-Installer- (others may work as well)

    Fix GLX errors. (Wine openGL to X window manager doesn’t work correctly)
    Test Android support.

    First install the latest version of wine using these commands:

    add wine repo key:
    wget -nc && sudo apt-key add winehq.key

    add wine repository:
    sudo apt-add-repository 'deb disco main'
    note: If you are on any other distribution, you might need use a different link.
    On Ubuntu 18.04 or Linux Mint 19.1 this is: (Thanks to @canoi)
    sudo apt-add-repository 'deb bionic main'​
    add repo for unmet dependency libfaudio0:
    sudo add-apt-repository ppa:cybermax-dexter/sdl2-backport

    update available packages:
    sudo apt update

    install wine:
    sudo apt install --install-recommends winehq-devel​
    If everything went correctly "wine --version" should return "wine-4.10¨

    Next up, we want to install q4wine. This is a usefull tool to manage prefixes, manage running processes and load up .exe files correctly.

    install q4wine:
    sudo apt install q4wine

    install winetricks:
    sudo apt install winetricks​

    We need to setup a wine prefix in q4wine:
    • Create a new gms2 folder in your home folder.
    • Open q4wine.
    • Run trough the q4wine setup process. (you can mostly click next)
    • Create a new prefix under 'prefixes'.
    • Name the prefix 'gms2'
    • Set the prefixpath to the previously created gms2 folder.
    • Set the arch to 64 bit.
    • Save the prefix

    Run the following command to initiate the prefix: (We're also going to uninstall mono)
    (if you chose a different wine prefix folder, don't forget to change it in these commands)
    run uninstaller and init the prefix:
    WINEPREFIX=~/gms2 WINEARCH="win64" wine64 uninstaller

    If you are asked to install wine mono click 'install'. Do the same for gecko.
    A wine GUI should open now. Select Mono and click uninstall. Both mono entries should have been deleted.​

    We need to install .NET now. use the following commands:
    Install .NET 4.5.2:
    WINEPREFIX=~/gms2/ winetricks dotnet452

    Run trough the installers.
    If you are given a warning about the windows update server, just continue.
    You don't have to restart your computer.​

    Install gms2:
    Now you want to download the gms2 installer .exe file.
    Open it with q4wine (right click the file and select 'open with other application' if q4wine is not the default)
    In q4wine select the gms2 prefix.

    Install gms2.
    If you see a "Turn Windows features on or off" message click okay.
    If a .NET 3.5 installer opens, cancel the installation.
    If a .NET 2.5.4 repair window opens, close it by going into Q4Wine into the processing tab and terminating "Setup.exe"​

    GMS2 IDE should now open automatically. (or it may not) If it does, close it.

    If you want to start it manually execute the following command:

    WINEPREFIX=~/gms2 WINEARCH="win64" wine64 "C:\Program Files\GameMaker Studio 2\GameMakerStudio.exe"​
    (thanks to @tijeseffff )

    In the IDE, login to your account and wait for the runtime to install.
    Start a new test project, make a room, an object and add a hello world message.

    Click run. Your game should now start.

    Compile a native linux executable:
    To compile for linux we are going to follow this guide:
    For your ip, you can fill in localhost or ''

    If that doesn't work you can try:

    There will be an extensive list of packages to install. However, not all of these packages are available anymore. This can be fixed by using:
    sudo apt-get install libssl1.1
    sudo apt-get install libbz2​
    and then 'hacking' libssl to look like libssl1.0.0:
    sudo cp /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/
    sudo cp /usr/lib/x86_64-linux-gnu/ /usr/lib/
    sudo cp /usr/lib/x86_64-linux-gnu/ /usr/lib/x86_64-linux-gnu/
    sudo cp /usr/lib/x86_64-linux-gnu/ /usr/lib/​
    Now follow the guide setting up your host to accept ssh connections.
    Eventually you should see a native Linux app running on your pc.

    Make a launcher shortcut
    Download and build AppEditor:
    sudo apt install valac libgranite-dev meson
    cd ~/
    git clone
    cd appeditor

    Build AppEditor:
    meson build
    cd build
    meson configure -Dprefix=/usr
    sudo ninja install

    Create startup script:
    cd ~/

    Insert the following text:
    WINEPREFIX="/home/YOUR_USER_NAME_HERE/gms2" WINEARCH="win64" wine64 "C:\Program Files\GameMaker Studio 2\GameMakerStudio.exe"

    Press CNTRL+X to close nano. Type 'Y' to save.

    Launch AppEditor:
    cd ~/appeditor/build

    GMS2/wine itself should have already made a launcher icon. We are going to edit that.
    Find it and:
    - set 'Show in Launcher' to true.
    - set the 'Category' to Programming
    - set 'Command Line' to /home/YOUR_USER_NAME_HERE/
    - enable 'Launch in Terminal'​
    Now save and try the launch entry. (close any open IDE's beforehand)​

    Compile for android:
    Download latest jdk8 for Windows x64, and the latest jdk8 for Linux (.tar.gz):
    If you don't have an account you can make one with a temporary email service:
    note: I used jdk-8u211.

    Launch jdk-8u***-windows-x64.exe with q4wine in gms2 prefix.
    Some UI elements of the install will be broken.
    Check the box and press the left button.
    Click Next
    On the next broken screen press the left button again
    If the same message keeps popping up, click the right button.
    Go to your GMS2 android platform settings and set the JDK to: C:\Program Files\Java\jdk1.8.0_XXX (your directory may be different)
    (These steps are kind of vague, they may need to be written down more clearly. These were my notes and I didn't have enough time to walk trough the process again on my tutorial VM.)

    Download android studio for windows 64 bit:
    Run the installer in the correct prefix using q4wine.
    After the installation execute:
    WINEPREFIX=~/gms2 WINEARCH="win64" wine64 "C:\Program Files\Android\Android Studio\bin\studio64.exe"​
    Don't send usage statistics.
    Do a custom install.
    Set SDK path to C:\Android\SDK
    Don't install Intel HAXM
    Follow trough with the install. Android studio will start to download components.

    When you see the Android Studio welcome screen, click configure and then 'SDK Manager'
    Install the correct SDK platforms and the SDK tools. Use this tutorial as reference:
    Again, make sure not to install anything to do with HAXM.
    Install the components and accept all license agreements.

    Install android studio on your host machine with the exact same settings. On Ubuntu you can install android studio trough the Software center. When setting up android studio use linux kernel hardware acceleration module instead of HAXM. (This should be done by default)

    Open a terminal and do:
    Cd ~/Android/Sdk/platform-tools/
    ./adb --version​
    This should yield:
    Android Debug Bridge version 1.0.41
    Version 29.0.1-5644136
    Installed as /home/YOUR_USERNAME/Android/Sdk/platform-tools/adb
    Open a second terminal and do:
    WINEPREFIX=~/gms2 WINEARCH="win64" wine64 cmd​
    This will open a windows cmd prompt. Here you can execute:
    cd C:\Android\SDK\platform-tools
    adb --version​
    You should see something among the lines of:
    Android Debug Bridge version 1.0.41
    Version 29.0.1-5644136
    Installed as C:\Android\SDK\platform-tools\adb.exe
    It is okay if the version numbers between your setup and my setup differ, as long as the Windows and Linux Android Debug Bridge versions are the same.

    Luckily for us the ADB uses a separated client interface connected do a daemon server. We can actually run the server on Linux and the client on Windows.
    To do this, on your host execute: (In the same folder as last time)
    ./adb start-server
    adb devices​
    If you had your phone connected to your computer, you should see it identified by adb. If not, connect your phone or troubleshoot your usb connection.

    On cmd execute:
    adb devices​
    Your adb devices should show up in Windows.

    In GMS, go to the android device editor (open the targets menu, click Android and click on the pencil under devices). Click 'Detect Device'. Your device should show up.

    Go back to your android platform settings and generate (or import) a keystore file. This keystore file has to be in the root of your windows system. For example: C:\testProject.keystore. Keeping the keystore file in the root directory makes our life easier down the road and prevents our filename from having any spaces.

    Find out what the API level of your phone is and select that in GMS.
    Select the processor architecture of your phone. (I had to enable ARM64)

    Extract your java-8u***-linux-x64.tar.gz file into your home directory.
    Edit your /etc/profile file to set your java home correctly:
    sudo nano /etc/profile​
    Add the following four lines:
    export JAVA_HOME
    export PATH​
    Let Ubuntu know where our java is:
    sudo update-alternatives --install "/usr/bin/java" "java" "<Directory where JAVA has been extracted>/bin/java" 1
    sudo update-alternatives --install "/usr/bin/javac" "javac" "<Directory where JAVA has been extracted>/bin/javac" 1
    sudo update-alternatives --install "/usr/bin/javaws" "javaws" "<Directory where JAVA has been extracted>/bin/javaws" 1
    sudo update-alternatives --set java <Directory where JAVA has been extracted>/bin/java
    sudo update-alternatives --set javac <Directory where JAVA has been extracted>/bin/javac
    sudo update-alternatives --set javaws <Directory where JAVA has been extracted>/bin/javaws
    java -version should now return:
    java version "1.8.0_211"
    Java(TM) SE Runtime Environment (build 1.8.0_211-b12)
    Java HotSpot(TM) 64-Bit Server VM (build 25.211-b12, mixed mode)

    If you see something along the lines of OpenJDK 11, your gradle will not work.

    install gradle:
    sudo apt install gradle
    Create a new android build folder somewhere on your computer.
    Add a copy of your keystore to this folder and call it 'project.keystore'.
    Add the following python script called
    #Author TTheCreator
    #This script looks for changes in GMS's cached android build output and will compile and run your android app when GM is done with it's business.

    import sys
    import time
    import logging
    import re
    import shutil
    import os
    from watchdog.observers import Observer
    from import LoggingEventHandler
    import distutils.dir_util

    windows_gms2CachePath = "/home/YOUR_USERNAME/gms2/drive_c/users/YOUR_USERNAME/Application Data/GameMakerStudio2/Cache/GMS2CACHE/testProjec_BCCB0FB7_367ADB89"

    host_gradleVersion = "2.3.3"
    host_sdkDir = "/home/thomas/Android/Sdk/"#Where your android sdk is located
    host_keyStore = os.getcwd() + "project.keystore" #The location of your keyfile on your host machine
    android_packageName = ""#The packagename of your game
    host_cacheFile = "gms2cache"#The local folder on your host that is used to hold and manipulate the gms2 android compile cache
    last_changed_build_file_pattern = re.compile(".*build.sample") #What file game maker edits last when compiling for android.

    def cleanUp():
    print("cleaning up...")

    def copyCacheToHost():
    print("copying cache to host")
    distutils.dir_util._path_created = {}
    distutils.dir_util.copy_tree(windows_gms2CachePath, host_cacheFile)

    def changeProjectFileForHostCompatibility():

    def setHostGradleVersion():
    #make sure we are using the correct gradleVersion
    print("Setting gradle version to:"+host_gradleVersion)
    with open (host_cacheFile+"/Android/default/build.gradle", 'r') as f:
    content =
    content_new = re.sub("gradle:.*'", "gradle:"+host_gradleVersion+"'", content)
    with open (host_cacheFile+"/Android/default/build.gradle", 'w') as f:

    def setKeystoreFile():
    #make sure we are using the correct gradleVersion
    print("Setting keystore file to:"+host_keyStore)
    with open (host_cacheFile+"/Android/default/"+android_packageName+"/build.gradle", 'r') as f:
    content =
    content_new = re.sub("C:/.*.keystore", host_keyStore, content)
    with open (host_cacheFile+"/Android/default/"+android_packageName+"/build.gradle", 'w') as f:

    def setSdkSrcDir():
    print("Setting sdk source directory to:"+host_sdkDir)
    with open (host_cacheFile+"/Android/default/", 'w') as f:

    def gradleCompile():
    print("Using Gradle to compile in:"+host_cacheFile+"/Android/default")
    os.system("cd "+host_cacheFile+"/Android/default && gradle installDebug && cd ../../../")

    def runOnDevice():
    print("Using adb to run the app on a device")
    os.system(host_sdkDir+"platform-tools/adb shell monkey -p "+android_packageName+" 1")

    class GMSEventHandler(LoggingEventHandler):
    def on_any_event(self, event):
    if (last_changed_build_file_pattern.match(event.src_path)):
    print("build sample file has been edited")

    if __name__ == "__main__":
    print("Started looking for changes to: "+windows_gms2CachePath)
    format='%(asctime)s - %(message)s',
    datefmt='%Y-%m-%d %H:%M:%S')
    event_handler = GMSEventHandler()
    observer = Observer()
    observer.schedule(event_handler, windows_gms2CachePath, recursive=True)
    while True:
    except KeyboardInterrupt:

    You will need to edit this python file to make sure it runs on your machine. On the top of the files there are a bunch of settings you can change. This script only supports full system paths. '~/' is invalid and will not work. That's why you may need to inject your username into the script.

    To start the script open a terminal in the folder you created and execute:
    You might need to install the watchdog python module:
    pip3 install watchdog
    If you don't have python installed:
    sudo apt install python3
    sudo apt install python3-pip​
    To stop the script press CNTRL+Z

    From this point on my python script should take care of everything for you. Once it detects that build.sample has been updated, it will copy over the GMS2 android compile cache, change some settings and finally run gradle. Gradle will install the app for you on your phone after which the python script will launch it.​

    Known problems:
    GLX Errors:
    If you see any of the following in your terminal while running GMS:
    - wine X Error of failed request: BadValue
    - Any error saying something with GLX​
    Do the following:
    - restart your pc
    - upgrade or reinstall your video drivers.​
    'This program encountered an error':
    In some cases wine might throw an error saying the program cannot be booted. When this happens is somewhat random and you might need to try launching GMS2 a few times before it finally works.​
    Wine screws up audio:
    In some specific configurations starting a wine program may cause your sound to become higher or lower. To fix this execute:
    pulseaudio --kill​
    Running gradle gives you a license error:
    open android studio on your host. Open the sdk manager and install the corresponding package. You may need to check 'Show Package Details'.

    Make sure you can compile an app (just an empty test project) in android studio on your host using the same build tools version and sdk version. You can change this in file>project structure

    Go into your android sdk directory on your host:
    cd ~/Android/Sdk/tools/bin​
    ./sdkmanager --licenses
    say 'y' to all​
    adb server version (41) doesn't match this client (39); killing...
    This error occurs when you are using multiple adb versions. Make sure the adb version of your host machine is the same as on your windows machine.

    Make sure you have your adb daemon running on your Linux host.

    On your host, make sure you are running the program adb in the platform-tools folder.
    Cd into this folder and use './adb'. The ./ is important.

    Make sure the package 'android-tools-adb' is NOT installed. Uninstall it with:
    sudo apt purge android-tools-adb​


    special thanks to:

    The winehq team (For not making an emulator)
    @tijeseffff (For fixing a problem where the IDE was unable to start Igor.exe)
    @XSonicRU (For suggesting testing this with Android)
    @canoi (For testing Linux Mint 19.1)
    Last edited: Jul 5, 2019
  2. Mert

    Mert Member

    Jul 20, 2016
    The only reason why I'm using Windows is games and game maker. I can play the same games on linux (Dota2 etc.), but I couldn't do it with Game Maker. It seems like now I can.
    Tthecreator likes this.
  3. Samuel Venable

    Samuel Venable Time Killer

    Sep 13, 2016
    Actually I've been searching for a while how to install wine on Kubuntu, as KDE Plasma Discover doesn't seem to have it.

    Thanks for the terminal commands. :p
    Tthecreator likes this.
  4. 00.Archer

    00.Archer Member

    Jul 24, 2018
    That's awesome! Have you tested it with GMS1.4?
  5. Samuel Venable

    Samuel Venable Time Killer

    Sep 13, 2016
    Just a wild guess in regards to what this thread is about and what it does not cover
  6. Tthecreator

    Tthecreator Your Creator!

    Jun 20, 2016
    I've gotten gms1 running in some state, but due to the window skinning and some other problems I've given up on getting it to work. Gms2 has a platform aspecific code base because it has to run on MacOS as well.
    00.Archer likes this.
  7. tijeseffff

    tijeseffff Member

    Sep 15, 2018
    How to fix Igor problem. (no need to run another cmd window)
    Launch your GMS2 using this command
    WINEPREFIX=~/gms2 WINEARCH="win64" wine64 "C:\Program Files\GameMaker Studio 2\GameMakerStudio.exe"
    And done.
  8. HayManMarc

    HayManMarc Member

    Jun 21, 2016
    F'n awesome, T!! I hope to have some time to try this out soon.
  9. XSonicRU

    XSonicRU Member

    May 2, 2019
    What about android builds? Can someone test them?...
    If they're working then there's really no reason to use win for me
  10. Tthecreator

    Tthecreator Your Creator!

    Jun 20, 2016
    I'm testing it right now but the odds don't seem to be in your favor.
    We need to get a JDK running on win, plus low level USB drivers. This is asking for trouble.
    XSonicRU and 00.Archer like this.
  11. 00.Archer

    00.Archer Member

    Jul 24, 2018
    Just tested it. It mostly worked, but at some point it crashed pretty hard and somehow Wine removed the GMS2 install.
    Compiling and running was working.
    I tested GMS1.4 as well but kept have authentication problems (which, I believe, exist on Windows too). When I managed to load a project, I tried to compile it but GMAssetCompiler.exe was failing for some reason.

    Anyway, thanks again for tutorial. Hopefully Wine and Proton will keep making progress and compatibility will improve.
    Last edited: Jun 17, 2019
    XSonicRU and Tthecreator like this.
  12. canoi

    canoi Member

    Jun 11, 2017
    OH GOOOOSH, it's working!! After a long time hahaha
    Finally i can use it without open a vm everytime!

    I'm using Linux Mint 19.1 (Based on Ubuntu 18.04, so it should work on Ubuntu too), and it's everything working.
    I first tried with wine 4.0, but it had issue on compile/build the game. So it really needs wine 4.10

    If anyone has doubts on how to install on 18.04, follow all the guide, but just change this part
    to this:
    Captura de tela_2019-06-20_19-51-10.png
  13. Samuel Venable

    Samuel Venable Time Killer

    Sep 13, 2016
    XSonicRU, canoi and Tthecreator like this.
  14. Tthecreator

    Tthecreator Your Creator!

    Jun 20, 2016
    It seems like I succeeded in compiling for Android. However, I still need to do a lot of work to streamline the process. Right now it requires copying over files an manually editing them.
    I'm going to write a script that can automatically detect when game maker updates files and then compile and run things for you. This way gradle, the sdk and adb can run on your host. Forget about running adb on wine.
    00.Archer and XSonicRU like this.
  15. Tthecreator

    Tthecreator Your Creator!

    Jun 20, 2016
    There you go everybody, I've got the Android target platform running in a usable manner. It does require a little python script to be running all the time but that is only a small sacrifice.
  16. nacho_chicken

    nacho_chicken Member

    Jun 21, 2016
    This is all really great work! I'm not going to be able to take advantage of this, but I really appreciate all the effort you put into this to help out other Linux users.
    canoi, XSonicRU and Tthecreator like this.
  17. SlightlyWind

    SlightlyWind Member

    Jun 29, 2019
    I got stuck at the .net frame installation. Followed the tutorial, using wine 4.11, mint tara using the bionic package.

    It got stucks every time I tried to install. Remove the prefix, delete the entire prefix folder, reinstall. Stuck every time

    Did anyone encounter this?

    nacho_chicken likes this.
  18. Tthecreator

    Tthecreator Your Creator!

    Jun 20, 2016
    @SlightlyWind did you execute the dotnet452 winetricks step correctly?
    The installer GM has embedded doesn't work. You need to end it. Close it by going into Q4Wine into the processing tab and terminating "Setup.exe"
  19. SlightlyWind

    SlightlyWind Member

    Jun 29, 2019
    @Tthecreator I deleted the whole folder and prefix, installing them again. Now the dotnet452 terminal stayed like this for an hour or more already. Imma try again now. it's like 24h of this already XD

    Attached Files:

  20. Tthecreator

    Tthecreator Your Creator!

    Jun 20, 2016
    It seems that winetricks is waiting for all wineprograms to be closed. Go into Q4Wine and terminate all wine programs.
    SlightlyWind likes this.
  21. SlightlyWind

    SlightlyWind Member

    Jun 29, 2019
    @Tthecreator damn it successfully installed, thanks for the tutorial

    Attached Files:

    • a.png
      File size:
      359.8 KB
  22. Tthecreator

    Tthecreator Your Creator!

    Jun 20, 2016
    @SlightlyWind No problem. What eventually ended up fixing your problem? I'll add it to the known problems list.
    SlightlyWind likes this.
  23. SlightlyWind

    SlightlyWind Member

    Jun 29, 2019
    btw wine doesn't really do the trick, the game runs at 60 fps, draw gui fps in game return 60 all the time but on screen it's like 25fps for some reason.
  24. SlightlyWind

    SlightlyWind Member

    Jun 29, 2019
    I didn't saw that till now. Not sure what wine broke during the installation but after delete the folder and reinstall it just did the job.
  25. Samuel Venable

    Samuel Venable Time Killer

    Sep 13, 2016
    For those of you who want a single runtime executable on Windows in GMS2:

    It requires Windows 7 for compatiblity with all Windows versions from Windows Vista to Windows 10.

    However, on topic here - after you build said EXE using your Windows system...

    ...a recent wine update fixed an issue with this. Single Executables made with this method previously did not work in wine.. it would just throw an error. But after I updated wine a few days ago, it appears that bug is fixed and single runtime EXE's now work under wine! This also means GMS 1.4 single runtime EXE's built on Windows 7 will also work, since both use the same system32 / sysWOW64 folder stuff to create the EXE's.

    Use the information in this tutorial to install wine, or link to this topic for any linux users who may want to try your game but don't have windows, and instruct them to skip all the unrelated steps regarding GMS2 development.

    Tthecreator likes this.
  26. Dather32

    Dather32 Member

    So I can't run GMS2 without mono and .NET 3.5 sp1, according to my attempts today. Except mono doesn't want to install, either.

    YoyoGames really ought to listen to the crowd and make an AppImage, or even outsource someone to port this.
    Last edited: Aug 18, 2019 at 3:09 AM
  27. Lonewolff

    Lonewolff Member

    Jan 8, 2018

    YYG asked the question on various social media platforms a few years back. Turns out there is about 100 people on the planet who wants an IDE for GMS on Linux.

    Doesn't make financial sense to do it. The most cost for the smallest target.
  28. Dather32

    Dather32 Member

    I followed this tutorial which led to everything being installed:

    However, my last issue is a "Waiting on children" within xterm and closing when I try to run GMS2:


Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice