Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't use with Snap (Ubuntu) installation of Slack #32

Closed
EpicWink opened this issue May 14, 2018 · 2 comments
Closed

Can't use with Snap (Ubuntu) installation of Slack #32

EpicWink opened this issue May 14, 2018 · 2 comments

Comments

@EpicWink
Copy link

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.

@fsavje
Copy link
Owner

fsavje commented May 15, 2018

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.

@BlackHC
Copy link

BlackHC commented Apr 4, 2019

Hello,

here are instructions to make it work:

  1. Install overlay (see https://github.com/kyrofa/overlay-snap):
    snap install overlay

  2. Make slack/current rewritable:
    /snap/overlay/current/overlay /snap/slack/current

  3. Run:

    sudo bash math-with-slack.sh /snap/slack/current/usr/lib/slack/resources/app.asar.unpacked/src/static
    
  4. (Restart Slack.)

Steps 2-4 have to be repeated after every reboot.

BlackHC added a commit to BlackHC/math-with-slack that referenced this issue Apr 4, 2019
Still requires manually running `/snap/overlay/current/overlay /snap/slack/current`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants