jlebon / textern

A Firefox add-on for editing text in your favourite external editor!
GNU General Public License v3.0
138 stars 21 forks source link

Does not work on Centos 7 #29

Closed khanc closed 6 years ago

khanc commented 6 years ago

Nothing happens on Centos 7. python36 is available in the system. Installed native app with USER=1, installed addon, trying ctrl-shift-E. Absolutely nothing happens.

jlebon commented 6 years ago

Can you check if there are any errors in the browser console? (Ctrl+Shift+J)

khanc commented 6 years ago

Sorry for the delay. Good news is I was able to go a bit further. The textern.py looks for python3 which doesnt exist in Centos 7, so I put a symbolic link to /bin/python3.6. So far so good.

However there is still trouble. The only editor I was able to successfully use was gedit. I want to use vim (not gvim). The konsole suggestion (https://github.com/jlebon/textern) does not work, it is opening a file in a directory which does not exist, which seems to be the same problem as using gnome-terminal --command. Then I tried to use https://raw.githubusercontent.com/jlebon/files/master/bin/gnome-terminal-wrapper, which also does not work (no error message, nothing on browser console). When I tried "gnome-terminal-wrapper vim filename" (in the shell), I get the error:
usage: new-session [-AdDP] [-F format] [-n window-name] [-s session-name] [-t target-session] [-x width] [-y height] [command] which seems to be coming from tmux. I am at a loss how to fix this. Thanks for the help.

khanc commented 6 years ago
tmpf=$(mktemp)
trap "rm -f $tmpf" EXIT
cmd="flock $tmpf $@"
session=$(tmux new -d -P "$cmd")
gnome-terminal --command "tmux attach -t $session"
flock $tmpf true

Above works for me for gnome-terminal-wrapper.

jlebon commented 6 years ago

Happy you got this working! Gonna close this one now.