Installing the game on Linux/en: Difference between revisions

From Vintage Story Wiki
(Updating to match new version of source page)
Tags: Mobile edit Mobile web edit
(Updating to match new version of source page)
Tags: Mobile edit Mobile web edit
Line 1: Line 1:
<languages/>
<languages/>
If you do not wish to perform a manual install, there is an [https://aur.archlinux.org/packages/vintagestory AUR package] and a [https://flathub.org/apps/at.vintagestory.VintageStory Flatpak package] available for convenience.
If you do not wish to perform a manual install, here are the options for unofficial, but easy and convenient install:
* An [https://aur.archlinux.org/packages/vintagestory AUR package] (for Arch Linux)
* A [https://flathub.org/apps/at.vintagestory.VintageStory Flatpak package] (for Fedora, Linux Mint, Manjaro, PopOS!, Red Hat, CentOS, elementary OS, SteamOS etc.) If not already installed, you can [https://flatpak.org/setup/ install Flatpak] itself as well.


Vintage Story uses the .NET Framework.  On a Windows machine, .NET is integrated with the OS or at least easily installed.  Although the .NET Framework was originally designed to target Windows platforms, it can also be run on other Operating Systems, specifically Linux, with some additional steps.
If you install the game using any of these methods, you can start it by clicking the <code>Vintage Story</code> menu entry in your desktop environment's application launcher.


'''Disclaimer:''' Packages above are maintained by volunteers to the open-source community. Anego Studios can't held responsible if they don't work as intended or don't work at all. In addition, the game itself may not be always up to date with the latest stable version that's released officially.


==Installing mono==
=Manual installation=


In order to play Vintage Story on Linux, you will need to use a utility called [https://www.mono-project.com mono]. This will allow you to run other .NET Framework applications too, and also create your own mods.  Mono version 5 or later is needed.
Vintage Story client relies on three main components: .NET, OpenAL and OpenGL.


* When installing mono on Ubuntu/Debian/Raspbian/CentOS/Fedora, please refer to the instructions [https://www.mono-project.com/download/stable/#download-lin here].
==Installing .NET==
* When installing mono on Arch Linux or any Arch-based distro (Manjaro, Antergos, etc), refer to the instructions [https://wiki.archlinux.org/index.php/mono#Installation here].


==Installing openal==
There are many ways to get .NET runtime running on your Linux system.


OpenAL is a cross-platform audio library, needed for the game sounds in Vintage Story. You may have it installed already, as standard or for another game or application. If you don't have it already, install it using this command: <code>apt-get install libopenal-dev</code>   Any issues with this, search up how to install OpenAL.
First of all, the .NET 7+ is already [https://github.com/dotnet/core/blob/main/linux.md available in the official package repositories for many Linux distributions]. This includes:
* Alpine Linux ([https://pkgs.alpinelinux.org/packages?name=dotnet* dotnet7-runtime])
* Arch Linux ([https://archlinux.org/packages/?q=dotnet dotnet-runtime])
* Fedora ([https://packages.fedoraproject.org/search?query=dotnet dotnet-runtime-7.0])
* Linux Mint ([https://community.linuxmint.com/software/view/dotnet-runtime-7.0 dotnet-runtime-7.0])
* Ubuntu ([https://packages.ubuntu.com/search?keywords=dotnet dotnet-runtime-7.0])
 
Microsoft also maintains official packages for [https://packages.microsoft.com/ several Linux distributions]. You can also install .NET on these systems, by adding Microsoft's repository to your package manager. This process can differ depending on the distribution and packaging system, so follow the official [https://learn.microsoft.com/en-us/dotnet/core/install/linux Install .NET on Linux] article from Microsoft website.
 
Finally, you can try installing .NET by using Microsoft's install script or simply manually install the downloaded binary. To do this, follow the official [https://learn.microsoft.com/en-us/dotnet/core/install/linux-scripted-manual Install .NET on Linux by using an install script or by extracting binaries] article.
 
==Installing OpenAL==
 
OpenAL is a cross-platform audio library, needed for the game sounds in Vintage Story. You may have it installed already, as standard or for another game or application.
 
If you don't have it already, OpenAL library should be already present in your distribution's package repository. Look for <code>openal</code>, <code>libopenal</code>, <code>libopenal-dev</code> or anything that provides required <code>libopenal.so</code> library.
 
==Installing OpenGL==
 
OpenGL is a 3D graphics library and your system probably already support it via a video driver, provided by <code>mesa</code> or <code>nvidia</code> package.


==Launching the game==
==Launching the game==


After installing mono (and perhaps also openal), you're ready to start the game.
After installing .NET (and perhaps also openal), you're ready to start the game.


* Open a new terminal.
Assuming that you already downloaded and extracted the Vintage Story for Linux, navigate to the game folder and run <code>run.sh</code> or <code>Vintagestory</code> directly.
* Navigate to the game folder.
* Type <code>mono Vintagestory.exe</code> and hit enter.


The game files also contain a script, <code>install.sh</code> that is intended to install the game in <code>~/ApplicationData/vintagestory/</code> and create a shortcut on your desktop.  Apparently this install script doesn't work for everyone, so you may need to take these steps manually, or create the target install folder before running the script (may be a permissions issue?)  For more details please refer to the Forum thread linked below.
The game files also contain a script, <code>install.sh</code> that is intended to install the game in <code>~/ApplicationData/vintagestory/</code> and create a shortcut on your desktop.  Apparently this install script doesn't work for everyone, so you may need to take these steps manually, or create the target install folder before running the script (may be a permissions issue?)  For more details please refer to the Forum thread linked below.


==Game updates==
==Updating the game==


Linux users normally update the game by extracting game binary files from the tar.gz downloaded from vintagestory.at.  That should work fine, except that it is a good idea to extract those files into an '''empty folder''' where possible.  If that is not possible for some reason, then we '''strongly recommend''' that you at least delete the <code>/assets/</code> folder from your previous Vintage Story installation.  If you simply extract the archive into an existing game installation folder without deleting <code>/assets/</code>, some previous asset files will remain, leading to minor issues - e.g. unintended blocks or items in the game, duplicated guides in the Handbook Guides tab.
Linux users normally update the game by extracting game binary files from the tar.gz downloaded from vintagestory.at.  That should work fine, except that it is a good idea to extract those files into an '''empty folder''' where possible.  If that is not possible for some reason, then we '''strongly recommend''' that you at least delete the <code>/assets/</code> folder from your previous Vintage Story installation.  If you simply extract the archive into an existing game installation folder without deleting <code>/assets/</code>, some previous asset files will remain, leading to minor issues - e.g. unintended blocks or items in the game, duplicated guides in the Handbook Guides tab.
Line 34: Line 53:
If you use a package manager, that may take care of some of this for you.
If you use a package manager, that may take care of some of this for you.


==Troubleshooting==
=Troubleshooting=


If you have any issues, the Forum thread on [https://www.vintagestory.at/forums/topic/520-linux-distrosconfigurations-under-which-vs-is-known-to-run/ working linux setups] might help you considerably.  Please do share your own experiences there. You might also want to use the [https://www.vintagestory.at/forums/topic/10479-linux-beginner-guide-mesa_glthread-boost-your-performance-today/ mesa_glthread optimization], which works well for some players.  
If you have any issues, the Forum thread on [https://www.vintagestory.at/forums/topic/520-linux-distrosconfigurations-under-which-vs-is-known-to-run/ working linux setups] might help you considerably.  Please do share your own experiences there. You might also want to use the [https://www.vintagestory.at/forums/topic/10479-linux-beginner-guide-mesa_glthread-boost-your-performance-today/ mesa_glthread optimization], which works well for some players.  


Some players have reported needing to run <code>sudo mono Vintagestory.exe</code> to launch the game the first time: this may depend on how it was installed.
===GL threading issues===
 
However, many users have reported problems with the game with OpenGL threading enabled.
 
OpenGL threading optimization is enabled by default in some configurations and can lead to the following problems:
* Mouse cursor not registering clicks properly
* Inability to resize the game window
* Hanging, freezing, etc.
 
To disable OpenGL threading, you will need to create a <code>mesa_glthread</code> environment variable and set it to <code>false</code>. You can easily test it, by launching the command line, navigating to the directory where Vintage Story resides and running the <code>mesa_glthread=false ./Vintagestory</code> command. If you don't want to use the command, look up how to make Linux environment variables permanent and restart the system.


If you cannot log in, try running <code>sudo cert-sync /etc/ssl/certs/ca-certificates.crt</code> or <code>sudo cert-sync /etc/pki/tls/certs/ca-bundle.crt</code>.
If you installed the game using Flatpak instead, try launching it with the command: <code>flatpak run --env=mesa_glthread=false at.vintagestory.VintageStory vintagestory</code>. You can make it permanent by typing: <code>flatpak override --env=mesa_glthread=false at.vintagestory.VintageStory</code>
 
===sudo for first time run===
 
Some players have reported needing to run <code>sudo ./Vintagestory</code> to launch the game the first time: this may depend on how it was installed.
 
===Graphical glitches===


Some people report minor graphical issues which are platform and driver dependent. Vintage Story makes use of a large variety of GLSL shaders for its rendering effects including commonplace elements such as grass and leaf colors in different climates. Bugs in the GPU driver's implementation of GLSL may cause artifacts with some of these. There's a chance a driver update might improve the situation. The in-game Graphics settings give high level control over many of the effects, you can try different settings.
Some people report minor graphical issues which are platform and driver dependent. Vintage Story makes use of a large variety of GLSL shaders for its rendering effects including commonplace elements such as grass and leaf colors in different climates. Bugs in the GPU driver's implementation of GLSL may cause artifacts with some of these. There's a chance a driver update might improve the situation. The in-game Graphics settings give high level control over many of the effects, you can try different settings.
A known issue is that screenshots saved using the in-game command (F12) are upside-down, on Linux. The VS dev team have tried multiple times to fix this...  possibly it is finally fixed in 1.15.


{{Game navbox}}
{{Game navbox}}