Also having the same issue as 99linesofcode (https://aur.archlinux.org/packages/visual-studio-code-bin#comment-942412)
/opt/visual-studio-code/chrome-sandbox has 0755 perms but requires 4755 perms or vscode silently fails to open. AFAIK this only affects those with the kernel flag unprivileged_userns_clone = 0 set for security hardening, but can be remediated by the correct file permissions set.
Ofc, until this is fixed in packaging/upstream, updates will overwrite chrome-sandbox and reset its perms. In the interim, the following, placed in /etc/pacman.d/hooks/, offers a workaround:
# /etc/pacman.d/hooks/60-visual-studio-code-bin.hook
[Trigger]
Operation = Install
Operation = Upgrade
Type = Path
Target = opt/visual-studio-code/chrome-sandbox
[Action]
Description = "Fixing file permissions on /opt/visual-studio-code/chrome-sandbox"
When = PostTransaction
Exec = /usr/bin/chmod 4755 /opt/visual-studio-code/chrome-sandbox
NB, the lack of / before opt in Target = isn't a typo.
Pinned Comments
dcelasun commented on 2017-11-15 06:20 (UTC) (edited on 2026-01-23 13:07 (UTC) by dcelasun)
FREQUENTLY ASKED QUESTIONS (read before flagging or commenting!)
This is the official binary distribution from Microsoft. The one in the community repo is an unofficial build made from source. Beyond the licence difference and branding, there are some proprietary features not available in the open-source version.
This package depends on both the official tarball and files from GitHub. Please check this page AND this page before flagging as out-of-date. If the new version isn't on both pages, this package cannot be updated! If you can see the new version on both pages, but the AUR package is still not updated, flag it and give it time. It's usually done within hours.
Sometimes AUR helpers do weird things. Download the tarball and install it manually with
makepkg -si. If that works, report the problem to your AUR helper's upstream, not here.xdg-openuses vscode, not my file manager! How do I fix this?Install
shared-mime-info-gnomegnome-sessionwhich now includes mimemapps.Just because $X is not required to open the app, doesn't mean there is nothing that depends on it. Always search the comment history on AUR to see if that dependency has been previously discussed before writing your own comment. Still nothing? Then use namcap to make sure it's really not needed. If namcap doesn't complain, please leave a comment here and I'll investigate.
The problem might be a packaging issue (wrong paths, dependencies, icons), so please write a comment here first. If you don't get a reply, or if someone says it's an upstream issue, you can report it on GitHub.
No, you won't get a reply. Please stop doing this. Leave a comment here instead and be patient.