Initial General Linux Guide Page

Omni-guides
2022-12-23 21:44:48 +00:00
parent 1554afd40f
commit 5758b6236d
+283
@@ -0,0 +1,283 @@
## General Linux Guide
If you're looking to run a modlist on a general Linux system and not a SteamDeck, these steps should hopefully get you up and running. The steps for your specific distro may vary slightly, but should be largely the same. I have tested these steps on Arch (Garuda Linux) and Fedora 36.
**Step 1 - Create the directory**
Once Wabbajack has successfully completed the download and installation of the modlist on your Windows system, create a new directory on the Linux system to house the required files:
```
mkdir -p /home/omni/Games/Skyrim/Journey
```
Copy the modlist directory from Windows into this newly created directory. There are many ways to do this - I chose rsync over ssh to transfer. There are too many options to discuss here, but it should be relatively easy to search for methods if you are unsure.
I copied the modlist directory to /home/omni/Games/Skyrim/Journey/Journey-WJ - the reason for this structure should hopefully become clear as we go through the steps, but it helps if you want to have multiple modlists installed at the same time.
Finally for this step, it's best to make sure that the newly copied files have sufficient permissions for your user.
Change the owner of the directory:
```
sudo chown -R omni:omni /home/omni/Games/Skyrim/Journey/Journey-WJ
```
and then change the permissions of the directory:
```
sudo chmod -R 755 /home/omni/Games/Skyrim/Journey/Journey-WJ
```
**Step 2 - Disable ENB**
While ENB will work under Linux, it is outside the scope of this guide. You can visit [the ENB Website](http://enbdev.com/download_mod_tesskyrimse.htm) to download the latest version of ENB, which will include a 'LinuxVersion' folder inside the zip file you download. It contains a replacement d3d11.dll file to use under Linux. However, for the purposes of this guide, I still suggest you disable ENB until you are happy with the stability of the modlist under Linux.
Depending on the Modlist you are trying to run, the method for disabling ENB will differ. To disable ENB for Journey, for example, we just need to rename the d3d11.dll file in the ModList directory:
```
mv /home/omni/Games/Skyrim/Journey/Journey-WJ/Stock\ Game/d3d11.dll /home/omni/Games/Skyrim/Journey/Journey-WJ/Stock\ Game/d3d11.dll.orig
```
For other modlists, such as Septimus 4, you may need to disable the ENB - Binaries mod in MO2. See the SteamDeck instructions for that modlist for more information.
**Step 3 - Steam Redirector**
Next we need a nifty little program called steam-redirector. Information about this program can be found on the same github page as the more general [Linux Mod Organizer 2 installation](https://github.com/rockerbacon/modorganizer2-linux-installer). You can download a version I have pre-compiled from here (tested on Arch or Fedora) using one of the commands below. If you prefer, you can choose to build from source yourself following the instructions provided on the [steam-redirector](https://github.com/rockerbacon/modorganizer2-linux-installer/tree/master/steam-redirector) github page.
To download the version I have pre-built, run the following commands in a terminal:
```
wget https://github.com/Omni-guides/Wabbajack_Modlist-Linux/raw/main/mo-redirect.exe -O /home/omni/Games/Skyrim/Journey/mo-redirect.exe
```
This mo-redirect.exe application basically points to the real location of your modlist's ModOrganizer.exe and nxmhandler.exe. It does this based on the contents of two files that have to live inside a specific directory called modorganizer2. This directory has to exist in the same directory level mo-redirect.exe lives. So, we need to create a directory, and then create the two files mo-redirect.exe is expecting.
Run the following command in a terminal window:
```
mkdir /home/omni/Games/Skyrim/Journey/modorganizer2
```
Next create the two required files, firstly ModOrganizer.exe:
```
echo "/home/omni/Games/Skyrim/Journey/Journey-WJ/ModOrganizer.exe" > /home/omni/Games/Skyrim/Journey/modorganizer2/instance_path.txt
```
and then nxmhandler.exe:
```
echo "/home/omni/Games/Skyrim/Journey/Journey-WJ/nxmhandler.exe" > /home/omni/Games/Skyrim/Journey/modorganizer2/instance_download_path.txt
```
At this stage, the /home/omni/Games/Skyrim/Journey directory should contain the following two directories and one .exe file:
```
modorganizer2 mo-redirect.exe Journey-WJ
```
with the modorganizer2 directory containing the two created files:
```
instance_path.txt
instance_download_path.txt
```
**Step 4 - Add the redirector as a Non-Steam Game**
The next step is to add mo-redirect.exe to Steam as a non-steam game. Once added, edit the properties of the new mo-redirect.exe entry. You can give it a more sensible name, I used "Skyrim - Journey", and then in the Compatibility tab tick the box for 'Force the use of a specific Steam Play compatibility tool', then select the Proton version - I chose Proton 7.0-4 which was the latest stable Proton version at time of writing.
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/SteamCompatibilityProton.png)
**Step 5 - Start and Configure ModOrganizer2**
Click play on this new entry, "Skyrim - Journey" (or whatever you renamed it to) in Steam, and all being well a little terminal window will appear - this is the steam-redirector doing it's job. If the terminal window just pops up for a second and vanishes, double check the contents of the instance_path.txt and instance_download_path.txt files as above, and that they are present in the correct directory - e.g. /home/deck/Games/Skyrim/Septimus4/modorganizer2/instances_path.txt, or check that the Proton version you have selected is 7.0-4 (or whatever the latest Steam-supplied stable version is), and make sure that there are no spaces in the path - for some reason mo-redirect.exe doesn't like that, even if you escape the spaces in the text files.
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/LinuxMORedirectTerminal.png)
Depending on the path on Windows that you copied the ModList files from, you may see an error pop-up about yout account lacking permission:
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/MO2DownloadsError.png)
To fix this, we just need to strip the now incorrect download directory from the ModOrganizer.ini file:
```
sed -i "/download_directory*=/c\download_directory =" /home/deck/data/Games/Skyrim/Dragonborn/Dragonborn-WJ/ModOrganizer.ini
```
Rerun "Skyrim - Journey" from Steam, and another error box will appear, complaining that it "Cannot open instance 'Portable'. This is because we copied the ModList directory (inclusive of the built-in MO2) from Windows, so the path has changed:
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/JourneyPortableError.png)
To fix this, we need to point MO2 to our new location. Click OK, and then Browse:
![image](https://user-images.githubusercontent.com/110171124/185071655-30f8fe66-d83d-48d0-acf5-398951d0001e.png)
A GUI file browser will appear, and we need to expand the directories path to reveal the 'Stock Game' directory:
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/JourneyStockGame.png)
With that done, the custom modlist splashscreen for MO2 should appear, followed by ModOrganizer2 itself.
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/JourneySplash.png)
You may also get a pop-up asking if you want to Register for handling nxm links, like so:
![image](https://user-images.githubusercontent.com/110171124/185072115-97215185-7237-4973-9674-5281a7daf305.png)
I usually just hit "No, don't ask again" as I wont be downloading any new mods via this version of MO2.
Getting close now. Next, we have to ensure that ModOrganizer2 is pointing to the correct **new** location for the required executables. In MO2, click the little two-cog icon at the top, which will bring up the Modify Executables window (please note that this icon may differ for some modlists that use custom icon sets):
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/JourneyExecutableTools.png)
With the example ModList of Journey, the executable that needs edited is simply called 'Journey'. This will be different depending on the ModList you have chosen. Change the "Binary" and "Start In" locations to point to the 'Stock Game' directory inside your Journey-WJ directory. Due to running this through proton, it will be referenced by being the Z: drive location. So for example, the Journey entry should have a 'Binary' path of "Z:\home\omni\Games\Skyrim\Journey\Journey-WJ\Stock Game\skse64_loader.exe" and a 'Start In' path of "Z:\home\omni\Games\Skyrim\Journey\Journey-WJ\Stock Game". You can use the three dots beside the "Binary" and "Start In" entries to manually locate via GUI.
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/JourneyExecutablePaths.png)
**Step 6 - Required Fixes**
Now on to required fixes. The following have been required for each of the modlists I have managed to get running. There is an issue with missing NPC Voices - apparently this is an issue with Proton, so it may ultimately be resolved in time with a newer version of Proton, without needing these steps. For now though, we need to install xact and xact_x64 to the Wine/Proton environment Steam created for our "Skyrim - Journey" (mo-redirect.exe) entry. The easiest way to accomplish this is to use ProtonTricks. If you don't already have it installed, ProtonTricks can be installed via the Discover store as a flatpak, or perhaps via your chosen distro's package manager:
![image](https://user-images.githubusercontent.com/110171124/183392721-f4ed554a-8bb7-4cc2-a4b9-29c56b8b5a39.png)
![image](https://user-images.githubusercontent.com/110171124/183392763-f005a96d-4a78-4b7b-9fd1-ba4961126d10.png)
If using the Flatpak version, you may need to manually enable the use of protontricks via the command line. Open a terminal and run the following command to add an alias:
```
echo "alias protontricks='flatpak run com.github.Matoking.protontricks'" >> ~/.bashrc
```
then close and reopen the terminal, or start a new session. We can now invoke protontricks from the command line.
Adding the required packages can be done via the ProtonTricks gui, but perhaps the easiest way is via command line. First, find the AppID of the Non-Steam Game we added for mo-redirect.exe. In a terminal run the following one-liner, or look below for individual steps, if you prefer:
```
APPID=`protontricks -l | grep "Journey" | awk {'print $6'} | sed 's:^.\(.*\).$:\1:'` ; echo $APPID ; protontricks $APPID xact xact_x64
```
If you prefer to run each step manually, then run:
```
protontricks -l | grep mo-redirect
```
Replace mo-redirect if you have renamed the Non-Steam Game added earlier. The output should look something like below, though your AppID will differ from mine:
```
Non-Steam shortcut: mo-redirect.exe (3595949753)
```
With the AppID now known, install the required xact and xact_x64 packages into this Proton environment (use your own AppID from the command above):
```
protontricks 3595949753 xact xact_x64
```
This may take a little time to complete, but just let it run the course.
**Step 7 - Modlist Specific Steps - Journey**
At this stage, the steps required may differ depending on the modlist you have chosen, and the mods that the modlist includes. S
---
---
## Modlist-specific Steps
This section deals with tweaks and fixes for specific ModLists that have been found so far.
With the above NPC Voice fix in place, I didn't need to carry out any more steps for Journey. It 'just worked' \o/
---
### Conclusion
At last!
If you've read this far, then well done! I'd appreciate a Star for this guide if you found it useful, just to show if I'm on the right track. I'm also open to any feedback, positive or negative.
With NPC Voices fixed, we should now be ready! Click the Play button in Mod Organizer, and wait. This took quite a bit of time on my laptop. So long, in fact, that I thought it had crashed and I started killing processes etc. But just wait... It took my laptop a full 2 minutes for the Skyrim window to appear, and then another 30-40 seconds for the main menu choices to appear. Thankfully once it had fully loaded, performance was good in the menus, and in-game performance will depend on your system specs and modlist chosen.
Once you have started a new game, please follow any additional steps that the wiki for your chosen modlist asks you to carry out in terms of mod configuration from inside the game.
As an addition to the disclaimer at the top of this guide, I have no visibility of longer term stability, so, save often, and maybe even make backups of your save-games, just in case ;)
If you need help with any of the above, or better yet have another fix, tweak or workaround to help get these modlists running on Linux, then please do stop by the channel on the Wabbajack Discord, I should be around so just @ me (@omni).
Enjoy!
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/Septimus4-GoodLuck.png)
## Troubleshooting
#### The mo-redirect.exe terminal window flicks up for a second, then vanishes!
This is usually caused by either incorrect paths in the instance_path.txt and instance_download_path.txt files, or by the path to the modlist containing a space. For example '/home/deck/Games/Skyrim/LostLegacy' is fine, but '/home/deck/Games/Skyrim/Lost Legacy' is not, even if you escape the space with a backslash.
---
#### Skyrim crashes on startup after a short black flicker on the screen!
Make sure you definitely disabled ENB - either by renaming the d3d11.dll file, or by disabling the mods, depending on your modlist.
---
#### My shell is messed up after using protontricks and I cant see anything I type!
This is just something that happens when dealing with wine prefixes in a terminal. You can regain control of your terminal by typing 'reset' end hitting return, even if you can't see the characters you type.
---
#### My ModList requires a vc_redist dependency
VC Redist versions up to 2019 can be installed easily with protontricks, e.g. protontricks <APPID> vcredist2019
However, some newer lists also now require VC Redist 2022 and that has to be manually installed into the Proton prefix.
You can find it here for a manual download : https://support.microsoft.com/en-us/help/2977003/the-latest-supported-visual-c-downloads
At the time of writing this, the latest redistributable bundles all versions from 2015 up to 2022. You can run the following one-liner to install vcredist2022, or follow the steps below it to do so manually:
```
APPID': APPID=`protontricks -l | grep "Journey" | awk {'print $6'} | sed 's:^.\(.*\).$:\1:' | tail -1` ; wget https://aka.ms/vs/17/release/vc_redist.x86.exe -O '/home/omni/.local/share/Steam/steamapps/compatdata/'"$APPID"'/pfx/dosdevices/c:/vc_redist.x86.exe' ; protontricks -c 'wine /home/omni/.local/share/Steam/steamapps/compatdata/'"$APPID"'/pfx/dosdevices/c:/vc_redist.x86.exe' $APPID
```
To install it manually, download the vc_redist.x64.exe file to your linux system, then jump into a protontricks shell and run `wine vc_redist.x64.exe` at the file's location to install it. Replace the APPID 3595949753 below with your APPID from protontricks -l
```
wget https://aka.ms/vs/17/release/vc_redist.x64.exe -O /home/omni/.local/share/Steam/steamapps/compatdata/3595949753/pfx/drives/c/vc_redist.x64.exe
```
If running it directly via terminal, run:
```
protontricks -c 'wine /home/omni/.local/share/Steam/steamapps/compatdata/3595949753/pfx/dosdevices/c:/VC_redist.x64.exe'
```
If you are running it via ssh, you will have to run it 'headless':
```
protontricks -c 'wine /home/omni/.local/share/Steam/steamapps/compatdata/3595949753/pfx/dosdevices/c:/VC_redist.x64.exe -q -norestart'
```
---
#### binkw64.dll error when clicking play in MO2
This is a known issue and happens on both Windows and Linux. Apparently it can be safely ignored. So far I can only attribute it to something in the 'Game Root' mechanism, but I do not yet have a way to fix or suppress the error, you can just close the window.
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/Septimus4-binkError.png)
---
#### My modlist uses 'Game Root' and keeps crashing
I have seen instances of Game Root being built when starting the game, but it doesn't get 'unbuilt' if the game crashes. This can range from an error about not being able to find SkyrimSE.exe, all the way to continually loading the ENB binary even if you have disabled it in MO2.
To clean things up, you can go to the Tools menu in MO2, then Tool Plugins -> Root Builder -> clear
Than launch the game again, and it should rebuild the Game Root cleanly.
![image](https://github.com/Omni-guides/Wabbajack-Modlist-Linux/blob/main/images/Septimus4CleanGameRoot.png)