Skip to content

Nitrox only works in some directories on Linux #2687

@CodesInChaos

Description

@CodesInChaos

Which version are you playing on?

1.8.1.0 (Latest release) and the current master branch

Which OS are you playing on?

Linux (Manjaro)

On which platform did you buy Subnautica?

Steam

Describe the issue.

Launching the game from the Nitrox launcher in "multiplayer mode" via steam (i.e. "allow multiple" is disabled) will only work in some directories. Such as .../steamapps/... or /home/<user>/.... When Nitrox is installed in other directories, the Directory.Exists check fails, and the game starts in single player mode, without any visible error on screen or in logs.

Apparently this is caused by the steam runtime sandboxing the game, so it can only see some directories. This appears to be the same issue as this reddit post.

Some ways Nitrox could improve the user experience:

  1. Have the launcher detect when it's installed in an inaccessible directory, and log a warning. Or if it's reliable enough, show an error. Unfortunately it's not obvious which directories these are. One could use the paths listed in the FAQ below.
  2. Log errors during initialization to a file, instead of just the invisible console output. Which seems to be tricky, since dependencies are unavailable at that point. Plus it requires the log directory to be accessible (it likely is, since it defaults to being in the user's home directory)
  3. Pass the directories required by Nitrox to PRESSURE_VESSEL_FILESYSTEMS_RW and/or PRESSURE_VESSEL_FILESYSTEMS_RO to make them accessible inside the sandbox. But setting these environment variables when invoking steam doesn't seem to work (at least if it's already running).

So it looks like improving this will be tricky.


Steam Workshop outside the home directory

If a game has Steam Workshop support and is installed outside your
home directory, it will not necessarily find the Steam Workshop content.

Workaround: Move it to your home directory, as above.

(#257)

Sharing directories with the container

By default, most of the directories that might be used by a game are
shared between the real system and the container:

  • your home directory
  • the Steam library containing the actual game
  • the directory containing Proton, if used
  • the installation directory for Steam itself
  • the shader cache
  • /home
  • /media
  • /mnt
  • /opt
  • /run/media
  • /srv

Directories outside those areas are usually not shared with
the container. In particular, this can affect games that ask you to browse
for a directory to be used for storage, like Microsoft Flight Simulator,
if your large storage directory is mounted at a custom location such
as /hdd.

You can force them to be shared by setting the environment variable
PRESSURE_VESSEL_FILESYSTEMS_RO and/or PRESSURE_VESSEL_FILESYSTEMS_RW
to a colon-separated list of paths. Paths in
PRESSURE_VESSEL_FILESYSTEMS_RO are read-only and paths in
PRESSURE_VESSEL_FILESYSTEMS_RW are read/write.

Example:

export PRESSURE_VESSEL_FILESYSTEMS_RO="$MANGOHUD_CONFIGFILE"
export PRESSURE_VESSEL_FILESYSTEMS_RW="/hdd:/archival:/stuff/games"
steam

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: to verifyIssue is currently not verified by trusted user

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions