Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using this asset on Linux #3

Open
BastiaanOlij opened this issue Feb 12, 2018 · 2 comments
Open

Using this asset on Linux #3

BastiaanOlij opened this issue Feb 12, 2018 · 2 comments

Comments

@BastiaanOlij
Copy link
Member

Unfortunately I'm not able to test the asset on Linux myself but there are now several people happily using it on Linux. There are a few gotcha's though.

The main one as I understand it is that you have to start Godot from Steam like so:
$HOME/.steam/steam/ubuntu12_32/steam-runtime/run.sh /path/to/godot3executable

There is a whole discussion going on the development Godot OpenVR issue list here:
https://github.com/BastiaanOlij/godot_openvr/issues/17

@BastiaanOlij BastiaanOlij added enhancement New feature or request Information and removed enhancement New feature or request labels Feb 12, 2018
@beniwtv
Copy link
Collaborator

beniwtv commented Feb 13, 2018

Yep, either you have to use the command above to launch Godot, or you can add it to your Steam library with Steam's "Add non-steam game to your library"-Function. (Not sure how they call it officially, the support site seems to be down.

@beniwtv
Copy link
Collaborator

beniwtv commented Apr 7, 2018

So wrote a little more info we can include in the documentation.

Linux notes

On Linux, SteamVR does not make it's libraries available system-wide. This means that if you run Godot (or your finished and exported game) outside of Steam, it will be unable to find these, and start without OpenVR support.

The easiest way to mitigate this is to run Godot (or your game) from within Steam, for example, if you are using the Steam version of Godot, or if you have added it as a shortcut in your library via the Games -> Add a Non-Steam Game to my Library menu.

Another option is to run Godot (or your game) in the Steam run-time environment. The command for this is:

$HOME/.steam/steam/ubuntu12_32/steam-runtime/run.sh /path/to/Godot3orGameExecutable

In your exported games, you'll ideally not only want people to be able to run the game from within Steam (if your distributing your game there), but also directly from the game (or (an)other game launcher/store service(s)). In your game you could thus ship a script (maybe called run.sh) to run the game that would take care of running it in the Steam run-time:

#!/bin/bash
# Run this game in the Steam run-time, if we're not already running from within Steam

# Figure out our own path
exedir="$(cd "$(dirname "$0")" && pwd)"
# Change this to your game's executable name
exename="myGameExecutable"

# Steam will have set a STEAM_RUNTIME variable pointing at the runtime
if [ -z "$STEAM_RUNTIME" ]; then
    exec "$HOME/.steam/steam/ubuntu12_32/steam-runtime/run.sh" "$exedir/$exename" "$@"
    exitcode=$?   
else
    "$exedir/$exename" "$@"
    exitcode=$?
fi

exit $exitcode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants