Can't use with Snap (Ubuntu) installation of Slack
EpicWink opened this issue · 2 comments
I'm on Ubuntu 18.04, and I've installed Slack (Direct Download 3.1.1 64-bit) via Snap (a multi-distribution package manager). I can't seem to be able to install the math-with-slack
injection: it gives me errors:
$ sudo bash math-with-slack.sh /snap/slack/current
Cannot find Slack file: /snap/slack/current/ssb-interop.js
$ sudo bash math-with-slack.sh /snap/slack/current/usr/lib/slack/resources/app.asar.unpacked/src/static
Cannot write to Slack file: /snap/slack/current/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
It seems to be the same error with the Windows Store version of Slack, where the program files are write-protected, however I haven't tested this.
Thank you @EpicWink for the report.
Have you made sure that /snap/slack/current/usr/lib/slack/resources/app.asar.unpacked/src/static/ssb-interop.js
exists? If so, it is probably the write protection that causes problems, as you suspect.
It's beyond the scope of the script to bypass the different types of write protections methods that package managers use, so I'm going to close this issue. However, if you find a way to write to the directory, then you should be able to install this. You could, for example, try to run the script as root or as the user Snap uses to install the apps.
Hello,
here are instructions to make it work:
-
Install overlay (see https://github.com/kyrofa/overlay-snap):
snap install overlay
-
Make slack/current rewritable:
/snap/overlay/current/overlay /snap/slack/current
-
Run:
sudo bash math-with-slack.sh /snap/slack/current/usr/lib/slack/resources/app.asar.unpacked/src/static
-
(Restart Slack.)
Steps 2-4 have to be repeated after every reboot.