-
Notifications
You must be signed in to change notification settings - Fork 119
Problems in ArchLinux
with vscode
#113
Comments
Thanks @sarpik, ArchLinux has been problematic compared to other distributions. I have looked through microsoft/vscode#82266, and need to follow all those links. If you have time, would you mind summarizing here? If not, it's fine, I will get to this, I just need some time. |
No problem @jorangreef, I've tried summarizing, but pretty much everything is documented in microsoft/vscode#82266. For a quick summary, I believe you can read through it without following the links - we tried providing context from them. The summary I wrote that is pretty much the same, you'd be better off just going through https://github.com/microsoft/vscode/issues/82266 :DI'll try my best to summarize (I'll provide links just in case): It seems like the issue was first reported here: https://bugs.archlinux.org/task/61516
And then later in microsoft/vscode#70403 and I see a few comments from you there. The conclusion was reached that it's an upstream [arch linux] issue, and that installing the Microsoft's packaged binary version of vscode solves the issue: https://aur.archlinux.org/packages/visual-studio-code-bin/ Then I found all of this, because I had the same issue, and wanted it fixed. This wouldn't get the issue fixed, so I created an issue to bring attention: microsoft/vscode#82266. There's useful information, including potential fixes for this package, and it's the latest issue related to this. They recommended me to report the issue here, since this package is used for vscode's Thanks for your time btw! |
Thanks for your help with all of this @sarpik, I would also like to get this fixed, if it's something we can fix. What I wanted to know in particular, was why installing the packaged binary version of VS Code solved the issue? If it did, that makes it seem like it's not VS Code or sudo-prompt, unless the packaged binary version of VS Code was a newer version with a different version of sudo-prompt. If you could confirm that the versions of VS Code were exactly the same between packaged binary and non-packaged that would help me alot! The comment by ArchLinux does sound like a recipe for disaster:
I will dig into everything and see what we can do! |
Thanks Joran! I think the problem might be with the packaging of electron, as seen in the comments from arch linux which you just quoted, but I'm just speculating. I will try to install the packaged binary right now, and will update you soon. Sorry to bother @FFY00, but I'm pretty sure you know the most out of us here. Any ideas? |
Basically, we start vscode like this: ELECTRON_RUN_AS_NODE=1 exec electron4 /usr/lib/code/out/cli.js /usr/lib/code/code.js "$@" |
Alright, I've tried out 3 things:
(all versions identical) TL;DR:
Fyi: The binary for arch linux is provided here: https://aur.archlinux.org/packages/visual-studio-code-bin/ and from the FAQ comment:
(see https://wiki.archlinux.org/index.php/Visual_Studio_Code#Installation for the different versions) Version: # code
$ code --version
1.39.2
6ab598523be7a800d7f3eb4d92d7ab9a66069390
x64 First attempt at editing a file without write permission:
I stumbled upon this balena-io/etcher#1179 (comment) and then, from the arch wiki page about Polkit, I installed mate-polkit. I needed to run it: $ /usr/lib/mate-polkit/polkit-mate-authentication-agent-1 and then tried to save the file without write permissions again: I got the prompt for my password, but after authenticating successfully, I got this from vscode's pop-up: Failed to save 'xorg.conf': Command failed: cd "/home/kipras"; "/usr/bin/pkexec" --disable-internal-agent /bin/bash -c "echo SUDOPROMPT; \"/usr/bin/code\" --file-write \"/tmp/code-elevated-rawbag\" \"/etc/X11/xorg.conf\"" Error using --file-write: EACCES: permission denied, open '/tmp/code-elevated-rawbag'
It IS a binary release, and everything WORKED! # vscodium-bin
$ codium --version
1.39.2
6ab598523be7a800d7f3eb4d92d7ab9a66069390
x64
The results are the same as with the vscodium binary - everything worked fine. # visual-studio-code-bin
$ code --version
1.39.2
6ab598523be7a800d7f3eb4d92d7ab9a66069390
x64 Sorry to bother you too, @bpasero, but maybe you have any ideas about this? One interesting observation I've made is that vscodium-bin is WAAAAY faster than the code from official arch repos. I synchronize my settings with the vscode settings sync extension, so they were identical. (fyi, if you're going to try, don't override your own settings - preferably back them up first with the extension, then reset extension's settings ( The startup time, responsiveness, less lag, smoothness, just usage in general -- everything is way better with vscodium-bin. Strange huh? I don't know why this is the case, but the difference is huge. Holy moly, I think I'm sticking with vscodium-bin :D |
😄 Thanks @sarpik, that's a fantastic write-up. Do you still think this is a sudo-prompt or VS Code issue then? |
Maybe there's something we could do though to help ArchLinux out? Any ideas? |
lmao, thank you for being awesome, Joran 😄
yeah I don't know, the only difference I see is whether vscode is packaged in binary form or not. This is probably to do with arch linux, but I'm not qualified to answer:D I'd love to help arch linux out, but honestly, I have no clue how. |
I have the same problem on NixOS, I can't save files as sudo in vscode. |
Hello,
This package is used in vscode.
In arch linux, we're unable to use the
Save as sudo
functionality throughvscode
.Please see microsoft/vscode#82266 -- it's the original issue, providing other related issues, useful comments with specific details & possible candidates for a fix.
Thank you!
The text was updated successfully, but these errors were encountered: