flathub / flathub/com.visualstudio.code

flatpak-run invocations don't share IPC socket

Đang mở
#210 8 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Shell
Star
217
Fork
82
Merge trung bình
1 ngày 7 giờ
Pull request đã merge (30 ngày)
1

Mô tả

Visual Studio Code is designed to run as a single process within the session: if you run `code /someproject` and then `code --new-window /some/other/project` the idea is that the second invocation opens `/vscode--.sock` and asks the initial process to open the second window, where:

```
: $XDG_RUNTIME_DIR if set, otherwise the VSCode userDataDir
: a truncated md5sum of userDataDir
: 1.54.2 or whatever
```

But with the Flatpak, every invocation of `flatpak-run com.visualstudio.code` gets a new temporary $XDG_RUNTIME_DIR created.

This makes `alias code="flatpak run com.visualstudio.code"` not work very well.

I don't have a great idea for a solution:

* I've created a workaround wrapper script that uses `flatpak ps` and, if an existing process is found, `flatpak enter` - but `flatpak enter` is more a development facility then something to use in production.
* If the wrapper script unset $XDG_RUNTIME_DIR, then the socket would be created within `~/.var/app/com.visualstudio.code/config/Code/`, which might work OK. I don't think sharing the user data dir on a NFS home directory would work well anyways.
* Some sort of Flatpak feature added to share $XDG_RUNTIME_DIR between `flatpak run` invocations?

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.