Nitrox icon indicating copy to clipboard operation
Nitrox copied to clipboard

[Core] Linux Support

Open killzoms opened this issue 4 years ago • 26 comments

  • [x] Remove/Replace usage of the windows registry
  • [x] Wait for UWE to release the mod-pocalypse update
  • [ ] Implement the cross platform launcher

killzoms avatar Mar 22 '20 07:03 killzoms

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 avatar Mar 27 '20 18:03 sprynar

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

sprynar avatar Mar 27 '20 18:03 sprynar

PR related to this: #995

Measurity avatar Apr 08 '20 22:04 Measurity

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

Jannify avatar Jun 01 '20 14:06 Jannify

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

Blu3wolf avatar Aug 13 '20 13:08 Blu3wolf

Not yet but there is a pull request #1127

Jannify avatar Aug 13 '20 14:08 Jannify

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.

adario7 avatar Dec 01 '20 12:12 adario7

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

Jannify avatar May 09 '21 16:05 Jannify

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

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.<Main>(String[] args)

Press any key to continue . . .

marcleonio avatar Apr 14 '22 16:04 marcleonio

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

Ilphrin avatar Jul 23 '22 09:07 Ilphrin

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

  • Have mono and protontricks installed
  • Install Subnautica on steam, select a proton version (7.0-4)
  • Download the Nitrox client (downloaded 1.5.0-1 from the Github release page), extract it somewhere
  • Add Nitrox as a non steam game, set compatibility to use the same proton version as Subnautica
  • Start Subnautica at least once (I started a world as well)
  • Run protontricks (can be graphically); use default prefix for Subnautica (264710). Open explorer, and run the Nitrox exe you downloaded
  • In the settings, set the path to Subnautica install
    • To help find it, you can explore steam game files to find the proper path (right click, manage, browse local file)
    • If you can't find it in explorer (if it's in a hidden folder), set the path directly (replacing / with \ and using the proper drive letter, like Z:\home\...)
  • Launch multiplayer. It should open and close very quickly, it's normal. Close Nitrox and everything from protontricks
  • On steam, run the non steam app Nitrox, then Multiplayer. Then you should hopefully see the Multiplayer button in the game main menu

obr-09 avatar Oct 22 '22 20:10 obr-09

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 avatar Mar 16 '23 23:03 Zentheon

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.

Zentheon avatar Mar 17 '23 00:03 Zentheon

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 avatar Jul 01 '23 01:07 fbievan

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 avatar Jul 01 '23 16:07 fbievan

Here's a video of me playing it here

fbievan avatar Jul 01 '23 22:07 fbievan

@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:

  • Nitrox in Bottles
  • Nitrox added as a non-Steam game
  • Launching Nitrox via Wine explorer.exe inside Subnautica's prefix
  • This Nitrox wrapper script

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!

KeepBotting avatar Jul 03 '23 15:07 KeepBotting

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

dartasen avatar Jul 03 '23 17:07 dartasen

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.

fbievan avatar Jul 03 '23 21:07 fbievan

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)?

Adamiok avatar Aug 26 '23 17:08 Adamiok

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

dartasen avatar Aug 26 '23 18:08 dartasen

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).

fbievan avatar Sep 22 '23 13:09 fbievan