NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.08k stars 14.08k forks source link

vscode-fhs: Cannot open links from vscode-fhs under KDE Plasma 5 #145354

Open lina-bh opened 2 years ago

lina-bh commented 2 years ago

Describe the bug

Inside KDE Plasma 5, opening links from Visual Studio Code installed with vscode-fhs, like the one to log in to Settings Sync, opens a prompt to trust the web browser, which then fails with an error because the .desktop file is not writable, since it's a symlink to the nix store.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install and open vscode-fhs
  2. Open any link (easiest way is to go to cog menu at the bottom of the side panel, click Turn on Settings Sync and open either the Microsoft or GitHub links)

Expected behavior

Links open in the default browser configured in KDE System Settings.

Screenshots

trust

error

Additional context

This is nixos-unstable, and I use chrome (😬)

Notify maintainers

vscode: @eadwu @Synthetica9 @maxeaubrey Plasma: @ttuegel @nyanloutre

Metadata

~/nixpkgs/pkgs/desktops/plasma-5 $ nix-shell -p nix-info --run "nix-info -m"
 - system: `"x86_64-linux"`
 - host os: `Linux 5.10.77, NixOS, 21.11 (Porcupine)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.16`
 - channels(root): `"nixos-21.11pre328987.c935f5e0add"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Maintainer information:

# a list of nixpkgs attributes affected by the problem
attribute: vscode-fhs
# a list of nixos modules affected by the problem
module: plasma5
schlichtanders commented 2 years ago

Also happens to me on nixos 21.11 with vscode-fhs and zettlr

schlichtanders commented 2 years ago

also happens in marktext

schlichtanders commented 2 years ago

@linabeee do you have any success in fixing this?

schlichtanders commented 2 years ago

@eadwu @Synthetica9 @maxeaubrey (vscode) @ttuegel @nyanloutre (Plasma)

can somebody help?

schlichtanders commented 2 years ago

Today is the day that this bug is limiting the functionality of a vscode extension

concretely vscode-revealjs is not able to export a reveal.js presentation to PDF because it cannot open chrome.

schlichtanders commented 2 years ago

@fabaff Can you take a look and in case ping someone who may know what is going on?

schlichtanders commented 2 years ago

dear nixpkgs support, it would be nice to have someone responsible for this kind of problem joining this issue.

As you can see I've already pinged many people who might feel responsible, but no one does, so a fallback is needed.

nixos-discourse commented 2 years ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/need-help-with-kde-electron-and-opening-links/17530/1

eadwu commented 2 years ago

I'd look into why KIO Client needs the file to be writable.

I do not experience this issue as I do not use KDE, VSCode opens links fine for me, obeying my xdg settings (and does not need to write to .desktop files if it uses that).

schlichtanders commented 2 years ago

@eadwu any progress? do you know someone else who could feel responsible for this problem?

It affects half of my OperatingSystem (I probably use that many electron based software), it is really a rather large in effect. It would be so great if this gets resolved.

schlichtanders commented 2 years ago

@lina-bh any progress?

hqurve commented 2 years ago

Is this related to this https://github.com/NixOS/nixpkgs/issues/160923?

schlichtanders commented 2 years ago

Is this related to this #160923?

yes that looks like the very same issue. Thank you for the pointer

nixos-discourse commented 2 years ago

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/who-uses-nixos-with-kde/18212/10

CnTeng commented 2 years ago

I add pkgs.xdg-utils, and then it works. I find the method form #137871

DaKingof commented 1 year ago

Still, an issue even though I tried all these fixed.

Is this why I can't install plugins without using the nix repo versions as well(i.e. pkgs.vscode-extensions.matklad.rust-analyzer)? I thought the point of using this FHS version was so we didn't have to use the versions in the repo.

Thiago-Assis-T commented 1 year ago

Hey, I installed the package xdg-utils through home manager and it worked, it looked like (in my case) that the xdg-open hooks that opens browser and apps was not working, and looking into it and searching I found out that other non-electron apps that tried to open the browser and when they were supposed to be opened from the browser, were not working... like @CnTeng said