ALVR can't launch SteamVR - steam.desktop is not executable

I’m trying to play SteamVR games on my Oculus Quest 2 using ALVR. I’ve got ALVR and Steam enabled in my configuration.nix:

programs.alvr.enable = true;
programs.alvr.openFirewall = true;

programs.steam.enable = true;

I can launch ALVR fine, and SteamVR launches fine through the Steam launcher. However, ALVR has to launch SteamVR itself in order to function properly. When it tries to do so, I get this error:

image

steam.desktop isn’t executable, and (unsurprisingly) the KIO client can’t make it executable.

How can I fix this?

2 Likes

It’s not supposed to be an executable either, .desktop files are just text files with metadata.

I’ve not used ALVR before. Do you select the file to execute in a menu somewhere? If so, read that .desktop file and give it the path (and arguments) the .desktop executes instead.

ALVR wants to open SteamVR…

When you press the button, this happens:

When you try to “Continue” you get the above error message:

Unable to make the service Steam executable, aborting execution.

Existing file /home/omega/.local/share/applications/steam.desktop is not writable.

But you still can run SteamVR manually in Steam!

ALVR can’t connect to SteamVR if it is launched through steam. I’m not sure what’s different about the two methods, but that’s how it’s done.

Ah, I always wondered how this is working. When I had ALVR running and manually ran SteamVR, then SteamVR kind of detected my Oculus Quest, but I couldn’t run any VR app and nothing showed up on the Oculus Quest… :thinking:

Did you figured it out? I’m having the same problem

I decided to dig around the code a little bit since ALVR is open-source:

pub fn start_steamvr() {
    Command::new("steam")
        .args(["steam://rungameid/250820"])
        .spawn()
        .ok();
}

This is deceptively simple, and I feel like this isn’t actually what’s happening when I push the button since we see the window popup from KIO client (as in pbek’s reply), which implies maybe XDG or something else is just being prompted to load a steam:// url without specifying an executable to load it it, then KIO picks it up and understands that the “Steam” program has to handle it. I’m not totally sure how a program would deliberately open a steam url with KIO like that, so I wouldn’t know what code to look for to confirm or deny that this is happening with ALVR.

I’m going to experiment with this behavior by creating a rust program that runs the exact code of the start_steamvr function and see if KIO handles it or if it just runs it without any bells and whistles. If the former occurs, then there might be a workaround in putting the steam executable in a place outside of the Nix store.

I can confirm that, in isolation, the start_steamvr() function above does not engage KIO like ALVR does, which means that either there’s something else going on to change the context in which start_steamvr() is run such that KIO gets used, or different code is being run when the Launch SteamVR button is pushed.

Absolutely the same problem with Anytype (from nixpkgs).

When clicking a link it first shows warning

image

And then the same error:

NixOS 24.05
Plasma 6.0.5
Anytype 0.40.8

UPD. The story has been going on for more than 2 years already:

UPD2. I got it fixed by this:

xdg.portal = {
    enable = true;
    xdgOpenUsePortal = true;
};
1 Like