|
|
# Short How to
|
|
|
# xrdesktop on OpenXR
|
|
|
|
|
|
Depending on your gxr build settings, openvr might be the default backend and needs to be changed to OpenXR via the included `xrd-settings` GUI application or with gsettings directly. Since overlay mode is not yet implemented for OpenXR, `xrd-settings` will make sure to default to scene mode. When using gsettings, you will need to set the default mode to scene.
|
|
|
## OpenXR Loader
|
|
|
|
|
|
Regardless of which runtime is used, for xrdesktop to run with OpenXR, the OpenXR loader always has to be installed.
|
|
|
|
|
|
See the OpenXR Loader section of the [Monado Getting Started Guide](https://monado.freedesktop.org/getting-started.html) for more information.
|
|
|
|
|
|
## gxr and xrdesktop settings
|
|
|
|
|
|
Make sure your `gxr` build has been compiled with openxr support and that the openxr backend (`libgxr-openxr.so`) is installed.
|
|
|
|
|
|
If gxr was built with OpenVR support (this usually includes distribution packages, even if the OpenVR backend is not installed), OpenVR will be the default backend and needs to be changed to OpenXR via the included `xrd-settings` GUI application or with gsettings directly. Since overlay mode is not yet implemented for OpenXR, `xrd-settings` will make sure to default to scene mode. When using gsettings, you will need to set the default mode to scene.
|
|
|
|
|
|
gsettings set org.xrdesktop default-api openxr
|
|
|
gsettings set org.xrdesktop default-mode scene
|
|
|
|
|
|
## Running xrdesktop on Monado
|
|
|
It is possible to override this setting with an environment variable: `GXR_API=openxr kwin_x11 --replace` or `GXR_API=openvr kwin_x11 --replace`.
|
|
|
|
|
|
## OpenXR runtimes
|
|
|
|
|
|
At this time the only viable OpenXR runtimes for Linux are Collabora's "Monado" runtime and SteamVR Beta.
|
|
|
|
|
|
For open source enthusiasts and tinkerers we recommend looking into Monado. [See the Monado Website for more information about Monado](https://monado.freedesktop.org/).
|
|
|
|
|
|
For end users with a HTC Vive, HTC Vive Pro or Valve Index looking for the best experience, we recommend using SteamVR.
|
|
|
|
|
|
### Running xrdesktop on Monado
|
|
|
|
|
|
See the Monado section of the [Monado Getting Started Guide](https://monado.freedesktop.org/getting-started.html) for more information about installing Monado.
|
|
|
|
|
|
Since Monado 0.2 there is a service that has to be started first.
|
|
|
```
|
... | ... | @@ -27,11 +49,22 @@ or |
|
|
XR_RUNTIME_JSON=/path/to/monado/build/openxr_monado-dev.json gnome-shell --replace
|
|
|
```
|
|
|
|
|
|
---
|
|
|
### Running xrdesktop on SteamVR (with OpenXR)
|
|
|
|
|
|
---
|
|
|
SteamVR supports OpenXR in the SteamVR Beta version. On startup SteamVR should pop up a window asking to install SteamVR as `active runtime`, which will install the file `~/.config/openxr/1/active_runtime.json`.
|
|
|
|
|
|
If SteamVR is not set as active runtime, the environment variable `XR_RUNTIME_JSON=~/.steam/steam/steamapps/common/SteamVR/steamxr_linux64.json` has to be set for the window manager
|
|
|
```
|
|
|
XR_RUNTIME_JSON=~/.steam/steam/steamapps/common/SteamVR/steamxr_linux64.json kwin_x11 --replace
|
|
|
```
|
|
|
or
|
|
|
```
|
|
|
XR_RUNTIME_JSON=~/.steam/steam/steamapps/common/SteamVR/steamxr_linux64.json gnome-shell --replace
|
|
|
```
|
|
|
|
|
|
With some steam installers the path might be `~/.local/share/Steam` rather than `~/.steam/steam`.
|
|
|
|
|
|
# Status
|
|
|
# xrdesktop OpenXR Status
|
|
|
|
|
|
xrdesktop 0.14 supports the scene mode on OpenXR, but not the overlay mode.
|
|
|
|
... | ... | @@ -41,49 +74,22 @@ xrdesktop 0.14 ships with simplified default bindings for the Khronos Simple Con |
|
|
|
|
|
With xrdesktop 0.14, adding additional default bindings requires adding a json file to xrdesktop's resource build, as well as recompiling the `xrdesktop` library. OpenXR runtimes may offer a binding UI to support more controllers without requiring default bindings.
|
|
|
|
|
|
# xrdesktop on the Monado OpenXR runtime
|
|
|
|
|
|
At this time the only viable OpenXR runtime for Linux is Collabora's "Monado" runtime.
|
|
|
|
|
|
## OpenXR Loader
|
|
|
|
|
|
For xrdesktop to run with OpenXR, the OpenXR loader always has to be installed.
|
|
|
|
|
|
* Archlinux: https://aur.archlinux.org/packages/openxr-loader-git/
|
|
|
* Debian: [apt install libopenxr-loader1](https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=libopenxr-loader1)
|
|
|
* Ubuntu: [Monado PPA](https://launchpad.net/~monado-xr/+archive/ubuntu/monado)
|
|
|
|
|
|
|
|
|
If the openxr loader is not available for your distribution yet, you need to build it from source, for example
|
|
|
```
|
|
|
git clone https://github.com/KhronosGroup/OpenXR-SDK.git
|
|
|
cd OpenXR-SDK
|
|
|
cmake -DCMAKE_INSTALL_PREFIX=/usr -G Ninja -Bbuild
|
|
|
ninja -C build install
|
|
|
```
|
|
|
|
|
|
If you want special monado build options, for example libsurvive support you will have to compile monado from source.
|
|
|
|
|
|
## Compiling monado from source
|
|
|
|
|
|
Make sure your `gxr` build has been compiled with openxr support. Use `xrd-settings` to ensure sure that `openxr` is the default API , or run `gsettings set org.xrdesktop default-api openxr`. Alternatively the environment variable `GXR_API=openxr` forces `gxr` to use openxr instead of xrdesktops default API setting.
|
|
|
---
|
|
|
|
|
|
```
|
|
|
git clone https://gitlab.freedesktop.org/monado/monado.git
|
|
|
cd monado
|
|
|
mkdir build
|
|
|
cd build
|
|
|
cmake ..
|
|
|
make -j$(nproc)
|
|
|
```
|
|
|
---
|
|
|
|
|
|
# Information for developers
|
|
|
|
|
|
# OpenXR bindings json format
|
|
|
## OpenXR bindings json format
|
|
|
|
|
|
At this time the OpenXR specification requires actions and bindings to be created and communicated to runtimes programmatically. This means there is no established file format to store bindings in.
|
|
|
|
|
|
xrdesktop opts to store OpenXR bindings in a format heavily inspired by OpenVR bindings.
|
|
|
|
|
|
## actions.json
|
|
|
### actions.json
|
|
|
|
|
|
This format very closely follows OpenVR's `actions.json` manifest. To add default bindings for a new controller, one `default_binding` entry has to be added:
|
|
|
|
... | ... | @@ -93,7 +99,7 @@ This format very closely follows OpenVR's `actions.json` manifest. To add defaul |
|
|
"binding_url": "bindings_foo.json"
|
|
|
}
|
|
|
|
|
|
## bindings_foo.json
|
|
|
### bindings_foo.json
|
|
|
|
|
|
This format has two main differences to OpenVR's bindings manifests:
|
|
|
|
... | ... | @@ -132,6 +138,6 @@ OpenVR - like input component names are translated to OpenXR specified input suf |
|
|
|
|
|
maps the input `/user/hand/right/input/thumbstick` to the action `/actions/wm/in/push_pull_scale`, since OpenXR specifies that the thumbstick path without the `/x` or `/y` suffix binds the position as `Vector2F`.
|
|
|
|
|
|
## About the format
|
|
|
### About the format
|
|
|
|
|
|
The intention of this format is to make it similar to OpenVR manifests and be easily transferable. However this format is not set in stone. It might be changed or abandoned in the future. Future directions could be either a simple homegrown format that directly maps an OpenXR input path from an interaction profile to an action name, or OpenXR could gain an extension that defines a manifest format to be loaded by runtimes. |
|
|
\ No newline at end of file |