Repository: vscode
Issue: Hyperlinks don't open on Arch Linux running KDE Plasma 5
Labels: upstream,linux,electron,workbench-os-integration,snap

Hello,
I found an existing issue https://github.com/Microsoft/vscode/issues/50139 but it is marked as closed, hence creating a new issue.
 
- VSCode Version:
```
1.43.0
78a4c91400152c0f27ba4d363eb56d2835f9903a
x64

```
- OS Version:
```
Operating System: Arch Linux 
KDE Plasma Version: 5.18.3
KDE Frameworks Version: 5.68.0
Qt Version: 5.14.1
Kernel Version: 5.5.9-arch1-2
OS Type: 64-bit
Processors: 12 × Intel® Core™ i7-8750H CPU @ 2.20GHz
Memory: 7.6 GiB of RAM

```

Steps to Reproduce:

1. On an arch linux running KDE Plasma 5, open vscode or vscode Insider Edition (with or without extensions disabled)
2. Open any file that has a hyperlink
3. Ctrl + Click to follow the link
4. Nothing happens.

Does this issue occur when all extensions are disabled?: Yes
Does this issue occur in the Insider Edition? Yes

I expected the hyperlink to open in a browser. 

Upon checking the process list, there is a processes associated with every Ctrl+Click (Because I clicked on the hyper link multiple times) and the PID changes because it crashes and the process re-spawns.

```bash
USER      59258  0.0  0.0   7840  3948 ?        S    11:50   0:00 /bin/sh /usr/bin/xdg-open https://bing.com/
USER      59260  0.0  0.4 286740 39696 ?        Rl   11:50   0:00 kde-open5 https://bing.com/
USER      59262  0.0  0.0   7840  3824 ?        S    11:50   0:00 /bin/sh /usr/bin/xdg-open https://bing.com/
USER      59263  0.0  0.0   7840  3904 ?        S    11:50   0:00 /bin/sh /usr/bin/xdg-open https://bing.com/
USER      59266  0.0  0.4 276048 38072 ?        Rl   11:50   0:00 kde-open5 https://bing.com/
USER      59267  0.0  0.0   7840  3672 ?        S    11:50   0:00 /bin/sh /usr/bin/xdg-open https://bing.com/
USER      59268  0.0  0.4 286740 39712 ?        Rl   11:50   0:00 kde-open5 https://bing.com/
USER      59269  0.0  0.4 286744 39752 ?        Rl   11:50   0:00 kde-open5 https://bing.com/
USER      59278  0.0  0.0   7840  3804 ?        S    11:50   0:00 /bin/sh /usr/bin/xdg-open https://bing.com/
USER      59281  0.0  0.3 201740 30188 ?        Rl   11:50   0:00 kde-open5 https://bing.com/
USER      59284  0.0  0.0   7840  3716 ?        S    11:50   0:00 /bin/sh /usr/bin/xdg-open https://bing.com/
USER      59285  0.0  0.3 176616 26216 ?        Sl   11:50   0:00 kde-open5 https://bing.com/
```

I managed to get the `strace` of the process if that is going to be of any help.

```bash

Process:
USER      30106  0.0  0.0   7840  3836 ?        S    12:25   0:00 /bin/sh /usr/bin/xdg-open https://bing.com/


strace: Process 30106 attached
wait4(-1, [{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 30108
rt_sigaction(SIGINT, {sa_handler=SIG_DFL, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f8b0ee30d70}, {sa_handler=0x559881b46ef0, sa_mask=[], sa_flags=SA_RESTORER, sa_restorer=0x7f8b0ee30d70}, 8) = 0
ioctl(2, TIOCGWINSZ, 0x7ffcb8e05300)    = -1 ENOTTY (Inappropriate ioctl for device)
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=30108, si_uid=1000, si_status=0, si_utime=5, si_stime=1} ---
wait4(-1, 0x7ffcb8e04b90, WNOHANG, NULL) = -1 ECHILD (No child processes)
rt_sigreturn({mask=[]})                 = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
exit_group(0)                           = ?
+++ exited with 0 +++

```

Not sure if it is related and would be of any help but `journalctl` also started showing the following error after the above process keeps crashing.

```
Mar 18 13:20:46 localghost kwin_x11[1758]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 26572, resource id: 125829125, major code: 18 (ChangeProperty), minor code: 0
Mar 18 13:20:46 localghost kwin_x11[1758]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 26597, resource id: 125829125, major code: 18 (ChangeProperty), minor code: 0
Mar 18 13:20:46 localghost kwin_x11[1758]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 26635, resource id: 125829125, major code: 18 (ChangeProperty), minor code: 0
Mar 18 13:20:46 localghost kwin_x11[1758]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 26643, resource id: 125829125, major code: 18 (ChangeProperty), minor code: 0
Mar 18 13:20:46 localghost kwin_x11[1758]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 26651, resource id: 125829125, major code: 18 (ChangeProperty), minor code: 0
Mar 18 13:20:46 localghost kwin_x11[1758]: qt.qpa.xcb: QXcbConnection: XCB error: 3 (BadWindow), sequence: 26659, resource id: 125829125, major code: 18 (ChangeProperty), minor code: 0
```

My default association for url opening is Chrome, and opening the same url from terminal using `/bin/sh /usr/bin/xdg-open https://bing.com ` works.

Apologies if this issue doesn't belong here. I am not sure if this needs to be raised with vscode or KDE. Thank you.