Running a snap installed side-by-side/parallel to a Debian package?

I'm on Ubuntu 18.04, and the default VLC here is:

$ vlc --version
VLC media player 3.0.4 Vetinari (revision 3.0.4-0-gf615db6332)
...
$ which vlc
/usr/bin/vlc

I want to keep this version, and then try out a nightly via snap. So I tried:

$ sudo snap install --channel=edge vlc
vlc (edge) 4.0.0-dev-5939-gee31d91 from VideoLAN✓ installed
$ snap list 
Name                  Version                  Rev   Tracking  Publisher    Notes
core                  16-2.36.3                6130  stable    canonical✓   core
...
vlc                   4.0.0-dev-5939-gee31d91  767   edge      videolan✓    -

Now I know I have this dev version of vlc installed, and it is in my system here:

$ ls -la /snap/bin/
total 8
drwxr-xr-x  2 root root 4096 Jan  4 09:25 .
drwxr-xr-x 13 root root 4096 Jan  4 09:25 ..
...
lrwxrwxrwx  1 root root   13 Jan  4 09:25 vlc -> /usr/bin/snap

But /snap/bin/vlc is a symlink (apparently) to /usr/bin/snap, so when I run it:

$ /snap/bin/vlc 
cannot change current working directory to the original directory: No such file or directory

So when I type vlc, I still get the old Debian version, which is how I want it.

But how do I run the snap version of VLC in this case?


The following command to start the snap version of vlc is easier to remember. Open the terminal and type:

snap run vlc  

snap run <snap-package> also works with all snap packages generally.


Found the answer, via:

cannot change current working directory to the original directory: No such file or directory · Issue #5 · smoser/pdftk · GitHub
https://github.com/smoser/pdftk/issues/5

Snaps do not have access to all directories.
Try using pdftk from your home directory.

Right, so I did this:

$ cd ~
$ /snap/bin/vlc 
VLC media player 4.0.0-dev Otto Chriek (revision 4.0.0-dev-5939-gee31d91)
[00000000023c93b0] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
...

... and now it runs... except it really cannot access many directories - it can't even list videos I have in /tmp, so now I have to symlink them to ~

... except symlink from /tmp to ~/ is not visible by snap VLC either, so now I have to copy those files...