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

Wrong permissions, editor not starting #38

Closed
ingo-h opened this issue Sep 12, 2018 · 6 comments
Closed

Wrong permissions, editor not starting #38

ingo-h opened this issue Sep 12, 2018 · 6 comments

Comments

@ingo-h
Copy link

ingo-h commented Sep 12, 2018

I installed textern following the Installation instructions. But the editor (gvim) does not open when I hit Ctrl+Shift+D. After looking what's going wrong I realized that native files have no global read permission. This is because I do not use the default umask 022 on my system for reasons. Instead I use umask 007. That means new created directories and files have the permission rw-rw---- on my system.

I have tried to correct (I would not like to set absolute permissions e.g. chmod 644):

sudo find /usr/lib64 -type d -exec chmod o+rx {} \;
sudo chmod o+r /usr/lib64/mozilla/native-messaging-hosts/textern.json
sudo find /usr/local/libexec -type d -exec chmod o+rx {} \;
sudo find /usr/local/libexec -type f -exec chmod o+r {} \;
sudo chmod o+x /usr/local/libexec/textern/textern.py

But this is not enough. If I install textern for the current user then everything is working.

What is to do to run textern system wide in this case?

@jlebon
Copy link
Owner

jlebon commented Sep 12, 2018

It's hard to say to be honest. I run with the default umask here so haven't hit this. Is it Firefox complaining it can't start the native app or is it the native app complaining it can't e.g. read the tmpfile?

@ingo-h
Copy link
Author

ingo-h commented Sep 12, 2018

In the browser console I get:

No such native application textern  NativeMessaging.jsm:99
    NativeApp</this.startupPromise< resource://gre/modules/NativeMessaging.jsm:99:9

Where is the tmpfile located?

@jlebon
Copy link
Owner

jlebon commented Sep 13, 2018

OK, right, that indeed sounds like it can't find/execute Textern. To confirm, is Firefox installed under /usr? Or /usr/local or e.g. ~/bin?

@ingo-h
Copy link
Author

ingo-h commented Sep 13, 2018

~$ which firefox
/usr/bin/firefox
~$ lsb_release -d
Description:    Debian GNU/Linux 9.5 (stretch)

Firefox is installed from the default repositories, no special.

@ingo-h
Copy link
Author

ingo-h commented Sep 13, 2018

Just for testing I have started firefox as root but get the same error message in the browser console.

@ingo-h
Copy link
Author

ingo-h commented Sep 13, 2018

I have found what's wrong. Seems firefox on Debian only looks at
/usr/lib/mozilla/native-messaging-hosts/textern.json
for the native messaging manifest and does not know
/usr/lib64/mozilla/native-messaging-hosts/textern.json
the installation is made. Reference: Manifest location. I will make a pull request.

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

2 participants