You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
Current version doesn't work properly in Ubuntu. When I try to open file by a right click action in Nautilus, file is opened in new window (new instance) instead of a new tab (share one VC instance).
Cheers,
Reacted by Armin Nabavi, Artem Polishchuk and zroug
This happens because vscode exposes a socket in $XDG_RUNTIME_DIR/vscode-${somehash}-${version}-shared.sock which is reused between instance, but $XDG_RUNTIME_DIR is unique to each flatpak sandbox, so there is no way vscode find them.
Nah, Discord has persistent socket name, while VS Code generates it from filesystem path hash and changes with each version, we can't pre-determine it reliably.
Ideally, VS Code should be patched somehow like this, but it's obviously impossible to apply patches downstream on proprietary version.
What about creating the link after the app has started?
I'm afraid it'll be even more fragile than with Discord. We need to wait for the app to exit and terminate socat after it, but VS Code generally forks to background on launch. I don't know any easy way to watch for forked grandchild processes (except for creating cgroups which is unavailable in flatpak sandbox).
Activity
thiblahute commentedon Jul 24, 2019
This one is quite annoying indeed.
thiblahute commentedon Aug 28, 2019
This happens because vscode exposes a socket in
$XDG_RUNTIME_DIR/vscode-${somehash}-${version}-shared.sockwhich is reused between instance, but$XDG_RUNTIME_DIRis unique to each flatpak sandbox, so there is no way vscode find them.subins2000 commentedon Jan 1, 2020
Yeah, this is annoying. Please fix
eszlari commentedon May 15, 2020
Maybe a workaround from the discord flatpak could be used:
https://github.com/flathub/com.discordapp.Discord/wiki/Rich-Precense-(discord-rpc)
https://github.com/flathub/com.discordapp.Discord/blob/master/discord.sh
gasinvein commentedon May 30, 2020
Nah, Discord has persistent socket name, while VS Code generates it from filesystem path hash and changes with each version, we can't pre-determine it reliably.
Ideally, VS Code should be patched somehow like this, but it's obviously impossible to apply patches downstream on proprietary version.
eszlari commentedon May 30, 2020
What about creating the link after the app has started?
gasinvein commentedon May 30, 2020
I'm afraid it'll be even more fragile than with Discord. We need to wait for the app to exit and terminate
socatafter it, but VS Code generally forks to background on launch. I don't know any easy way to watch for forked grandchild processes (except for creating cgroups which is unavailable in flatpak sandbox).HACK: Use directory for IPC sockets that is shared between Flatpak in…
gasinvein commentedon Apr 5, 2021
FYI this could be fixed by flatpak/flatpak#4126
WiliTest commentedon Feb 11, 2022
for those looking for the solution on windows:
just add the following setting in your User Settings file:
"window.openFilesInNewWindow": "on"credit