Installing vscode snap on Arch Linux

mborzecki

#1

I am not able to install vscode snap as it need classic confinement there. Is there be a work around ? Will classic confinement be available in Arch ?


#2

@zyga I can’t remember how to resolve this issue (did a quick bit of browsing but no luck)


#3

Symlink /var/lib/snapd/snap to /snap.


#4

I tried it now with snapd-git package and ran into problems. There’s something wrong with vscode snap itself. For starters

maciek@corsair:~ vscode 
/snap/vscode/19/usr/share/code/bin/../code: error while loading shared libraries: libselinux.so.1: cannot open shared object file: No such file or directory

Plus some other errors. I’ve posted the log here: https://paste.ubuntu.com/25979361


#5

I was able to run it, but only after snap run --shell vscode and going through the wrapper scripts to find the proper binary. The actual vscode binary is $SNAP/usr/share/code/code and it works if you start it from snap shell.

The problem is in $SNAP/bin/electron-launch helper (called by $SNAP/command-vscode.wrapper) which sets up LD_LIBRARY_PATH so that it picks up $SNAPusr/lib/x86_64-linux-gnu/libgio-2.0.so.0, and that glib version is linked against libselinux.so.1.


Snap on Arch/Liri OS