SubnauticaNitrox / Nitrox

An open-source, multiplayer modification for the game Subnautica.
GNU General Public License v3.0
1.71k stars 1.04k forks source link

[Core] Linux Support #988

Open killzoms opened 4 years ago

killzoms commented 4 years ago
sprynar commented 4 years ago

Yeah, I recently wanted to play with my friends, but due to my OS I can't play. Would really appreciate, if developers would fix it.

sprynar commented 4 years ago

If it helps, I will post my log file here. I'm running Manjaro Linux. nitrox-2020-03-27.log

Measurity commented 4 years ago

PR related to this: #995

Jannify commented 4 years ago

Sever is Linux ready. Now we have to wait for the cross platform launcher (with electron) for client side Linux support.

Blu3wolf commented 4 years ago

Is there a separate issue for the launcher rewrite in electron? Id like to stay up to date on whats happening with this :)

Jannify commented 4 years ago

Not yet but there is a pull request #1127

adario7 commented 3 years ago

For those running the nitrox launcher under linux with wine and getting the following error: [ERROR] System.Runtime.InteropServices.COMException (0x88980406): Exception from HRESULT: 0x88980406 setting export WINEDLLOVERRIDES='d3d9=""' before executing the nitrox launcher fixed it for me. may be related to this.

Jannify commented 3 years ago

To work on this issue we first need to finish moving the launcher to electron (or similar framework).

marcleonio commented 2 years ago

Erro version 1.6.0.0 Replace TargetFramework net472 to netcoreapp3.1 and LangVersion 10 to preview

remove line 1 in Log.cs add "using NitroxModel.Logger;" in other files

run command: $sudo dotnet run --project Nitrox.BuildTool

System.PlatformNotSupportedException: Registry is not supported on this platform. at Microsoft.Win32.RegistryKey.OpenBaseKeyCore(RegistryHive hKey, RegistryView view) at Microsoft.Win32.RegistryKey.OpenBaseKey(RegistryHive hKey, RegistryView view) at NitroxModel.Platforms.OS.Windows.Internal.RegistryEx.GetKey(String path, Boolean needsWriteAccess, Boolean createIfNotExists) in NitroxModel/Platforms/OS/Windows/Internal/RegistryEx.cs:line 224 at NitroxModel.Platforms.OS.Windows.Internal.RegistryEx.Read[T](String pathWithValue, T defaultValue) in NitroxModel/Platforms/OS/Windows/Internal/RegistryEx.cs:line 24 at NitroxModel.Helper.NitroxUser.get_PreferredGamePath() in NitroxModel/Helper/NitroxUser.cs:line 58 at NitroxModel.Discovery.InstallationFinders.ConfigGameFinder.FindGame(IList1 errors) in NitroxModel/Discovery/InstallationFinders/ConfigGameFinder.cs:line 14 at NitroxModel.Discovery.GameInstallationFinder.FindGame(IList1 errors) in NitroxModel/Discovery/GameInstallationFinder.cs:line 34 at Nitrox.BuildTool.Program.EnsureGame() in Nitrox.BuildTool/Program.cs:line 74 at System.Threading.Tasks.Task`1.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location where exception was thrown --- at Nitrox.BuildTool.Program.Main(String[] args) in Nitrox.BuildTool/Program.cs:line 34 at Nitrox.BuildTool.Program.

(String[] args)

Press any key to continue . . .

Ilphrin commented 2 years ago

Hi! thank you for all the work you put on Nitrox :D

Is there any news about an electron launcher that would allow the client to run on Linux ? I tried through Proton but not getting the "Multiplayer" Label ingame so far

obr-09 commented 1 year ago

Hi @Ilphrin , at first I didn't have the Multiplayer button either, but on my second attempt (and on a clean install on another computer, an arch linux this time) I got it working... Not sure why but here are all the things I did on my second attempt (thanks Marki_TTA), including the versions number though they might or might not be relevant

Zentheon commented 1 year ago

Ayo! So I'm attempting to get Nitrox running using the guide above and I always run into this popup when trying to launch multiplayer (through protontricks or as a non-steam game)

System.Exception: Directory 'Z:\mnt\games\SteamLibrary \steamapps\common\Subnautica' is not a valid Subnautica game installation or the game's platform is unsupported by Nitrox. at NitroxLauncher.LauncherLogic.StartSubnauticaAsync() [0x00281] in <9f0b0f717e844bcd9bef3b500720061c>:0 at NitroxLauncher.LauncherLogic.StartMultiplayerAsync() [0x001d5] in <9f0b0f717e844bcd9bef3b500720061c>:0
at
NitroxLauncher.Pages.LaunchGamePage.MultiplayerButton_Click
(System.Object sender, System.Windows.RoutedEventArgs e) [0x00148] in <9f0b0f717e844bcd9bef3b500720061c>:0

I had to add a System.Windows.Controls.Ribbon.dll file into Nitrox's lib folder to get the launcher to run. Mono is also installed through pacman.

Zentheon commented 1 year ago

Ayo! So I'm attempting to get Nitrox running using the guide above and I always run into this popup when trying to launch multiplayer (through protontricks or as a non-steam game)

System.Exception: Directory 'Z:\mnt\games\SteamLibrary \steamapps\common\Subnautica' is not a valid Subnautica game installation or the game's platform is unsupported by Nitrox. at NitroxLauncher.LauncherLogic.StartSubnauticaAsync() [0x00281] in <9f0b0f717e844bcd9bef3b500720061c>:0 at NitroxLauncher.LauncherLogic.StartMultiplayerAsync() [0x001d5] in <9f0b0f717e844bcd9bef3b500720061c>:0
at
NitroxLauncher.Pages.LaunchGamePage.MultiplayerButton_Click
(System.Object sender, System.Windows.RoutedEventArgs e) [0x00148] in <9f0b0f717e844bcd9bef3b500720061c>:0

I had to add a System.Windows.Controls.Ribbon.dll file into Nitrox's lib folder to get the launcher to run. Mono is also installed through pacman.

Nevermind, the person I'm planning on playing with just told me only legacy Subnautica is supported, so that's my bad lol

But while I'm here, for anyone who can't get the launcher to run, try putting version 4.0 of this dll in Nitrox's lib folder.

fbievan commented 1 year ago

Hey, got the launcher (on the most recent version of nitrox) running by installing steam in bottles (see that project here). I installed subnautica, set it to be legacy in updates menu in the installed version of steam in bottles. After that I installed mono and dotnet 48 with the depencies in bottles. Then Run steam, and then launch nitrox in bottles, and should be working.

nitrox

fbievan commented 1 year ago

Hey, got the launcher (on the most recent version of nitrox) running by installing steam in bottles (see that project here). I installed subnautica, set it to be legacy in updates menu in the installed version of steam in bottles. After that I installed mono and dotnet 48 with the depencies in bottles. Then Run steam, and then launch nitrox in bottles, and should be working.

nitrox

played with my friend, everything seems to be working! I might rewrite the instructions in a bit, since they are a bit all over the place. Nothing I've noticed seems to be out of place (expect for this one lifepod which didn't load but i'm pretty sure that was a subnautica issue since it didn't load for my friend on windows too)

fbievan commented 1 year ago

Here's a video of me playing it here

KeepBotting commented 1 year ago

@fbievan Thanks, this installation process works great and Bottles seems to be the optimal way to use Nitrox on Linux.

I had previously tried using native Steam alongside several different methods of running Nitrox, including:

But none of these worked readily. The Nitrox launcher would complain about missing files and refuse to run. I got various errors relating to .NET, System.Windows.Controls.Ribbon.dll, or being unable to find the game path.

Once I installed the correct protontricks packages and DLLs, Nitrox would run but still failed to launch Subnautica. Some error about a timeout while waiting for "the platform".

I probably could have gotten native Steam working with a bit more trouble but Bottles seems much cleaner. This is the only oddity:

image

The Nitrox launcher looks funny, but the UI elements appear when I hover over them and it seems to work fine. I can launch the game and get a "Multiplayer" option on the main menu so I assume it's working.

Haven't tried connecting to a server yet but I'll update here with any trouble. Cheers!

dartasen commented 1 year ago

@KeepBotting You can keep track of our progress on improving Linux support on that pull request #1848

fbievan commented 1 year ago

The Nitrox launcher looks funny, but the UI elements appear when I hover over them and it seems to work fine. I can launch the game and get a "Multiplayer" option on the main menu so I assume it's working.

The Nitrox UI being super funky is normal, however all the textures should load fine in the game... weird that the menu in-game is like that.

I actaully got this idea by a game called 'sleeping dogs', where the controller support was broken in proton, but lutris has a launcher where it ran inside a virtual windows environment with wine and windows steam, where it all worked perfectly.

god bless bottles and wine for making this possible.

thank you to the nitrox devs for making this mod even possible

really hope that pull request goes through, as i'm very intrested to see what happens with linux support into the future with nitrox.

Adamiok commented 1 year ago

Would it be possible to somehow skip the launcher and launch the game straight away, as currently the launcher is the problem (not supported by macos)?

dartasen commented 1 year ago

Would it be possible to somehow skip the launcher and launch the game straight away, as currently the launcher is the problem (not supported by macos)?

Nop. The launcher does all the black magic you need in order to play Nitrox. If you skip the launcher, you can't play Nitrox at all.

And it's not planned to add a 3rd tool to patch the game to launch nitrox without any launcher

fbievan commented 11 months ago

Once I installed the correct protontricks packages and DLLs, Nitrox would run but still failed to launch Subnautica. Some error about a timeout while waiting for "the platform".

That seems to be a native steam issue, something unimplemented, my best guess is that it cannot communicate with steam for some type of handshake (haven't look into that).

cproo12 commented 4 months ago

Anybody have any potential solutions for the "Steam: Timeout reached while waitinf for platform to start."

Seems there is a disconnect between the launcher and Linux steam.

Currently I have added NitroxLauncher.exe as a non steam game and am running it with Proton GE 9-5 (latest). Have also tried with Proton 6.3 like some guides recommend but no luck :(

fbievan commented 4 months ago

Anybody have any potential solutions for the "Steam: Timeout reached while waitinf for platform to start."

Seems there is a disconnect between the launcher and Linux steam.

Currently I have added NitroxLauncher.exe as a non steam game and am running it with Proton GE 9-5 (latest). Have also tried with Proton 6.3 like some guides recommend but no luck :(

Do not use nittox with steam and proton. Use nitrox with windows steam for now.

I used bottles in my testing, and it worked great.

cproo12 commented 4 months ago

Really, so install an entire separate instance of windows steam, then add nitrox launcher to that version of steam as a non steam game?

fbievan commented 4 months ago

Really, so install an entire separate instance of windows steam, then add nitrox launcher to that version of steam as a non steam game?

Nope just install nitrox to that prefix while steam is running in that wine instance.

Pretty much yeah.

I can provide more detailed instructions, but you can see my success with this method in the thread above.