thisiscam / math-with-slack

Rendered math (MathJax) with Slack's desktop client
MIT License
306 stars 28 forks source link

How to make it work with the snap installation of Slack? #9

Closed LortKrassbeter closed 4 years ago

LortKrassbeter commented 4 years ago

Hi, I have Slack installed via snap on Ubuntu 20.04.1 LTS 64-bit. When running the script I get the following error:

sudo python math-with-slack.py
Several versions of Slack are installed.
0) /snap/slack/30/usr/lib/slack/resources/app.asar <== (default)
1) /snap/slack/current/usr/lib/slack/resources/app.asar
2) /snap/slack/29/usr/lib/slack/resources/app.asar
Choose from above:"0"   
Using Slack installation at: /snap/slack/30/usr/lib/slack/resources/app.asar
[Errno 30] Read-only file system: '/snap/slack/30/usr/lib/slack/resources/app.asar.mwsbak'
Cannot make backup. Make sure the script has write permissions.

I don't know how the app.asar.mwsbak works nor how this is somehow mounted as a filesystem.. How to fix this permissions problem?

thisiscam commented 4 years ago

Currently this repo does not support Snap installed Slack. Reason is that Snap directories are read-only. Please see: https://askubuntu.com/questions/919091/why-can-snap-files-not-be-modified-in-any-way https://askubuntu.com/questions/1046606/cannot-edit-system-file-snap-phpstorm-even-with-root-account-in-ubuntu-18-04

Is there anything preventing you from installing from .deb package?

thisiscam commented 4 years ago

If you so'd like, you could potentially use one of the directions given above to unmount the file system -> run math-with-slack.py -> remount.

I'd prefer not to bake that functionality into math-with-slack since that seems dangerous and could break things. However, if you found a good solution feel free give it a PR!

LortKrassbeter commented 4 years ago

Currently this repo does not support Snap installed Slack. Reason is that Snap directories are read-only. Please see: https://askubuntu.com/questions/919091/why-can-snap-files-not-be-modified-in-any-way https://askubuntu.com/questions/1046606/cannot-edit-system-file-snap-phpstorm-even-with-root-account-in-ubuntu-18-04

Is there anything preventing you from installing from .deb package?

Thanks for pointing me to those questions! I fixed it by using the .deb install as you suggested.

thisiscam commented 4 years ago

No problem!