cvfosammmm / Setzer

LaTeX editor written in Python with Gtk
https://www.cvfosammmm.org/setzer/
Other
394 stars 36 forks source link

Doesn't start from .tex file and gnome menu #277

Open aybed opened 2 years ago

aybed commented 2 years ago

I am using Debian 11 (gnome). Due to problems encountered using Flatpak, I have decided to install Setzer by following instructions presented in github page. I have installed Setzer as it is described in github page. Now, I am able to run Setzer locally by using command below. ./scripts/setzer.dev

However, the application doesn't open from the gnome menu and .tex file directly (even using ''open with other application'' option). Starting from the terminal is useless for me. Is there a solution for this issue? Have a good day...

sebastiaanfranken commented 2 years ago

I suspect you can create a (new) setzer.desktop file in ~/.local/share/applications/ where you can set the appropriate options to launch Setzer. An example:

[Desktop Entry]
Name=Setzer
Exec=<path to your setzer.dev executable>
Type=application
Categories=GNOME;GTK;Science;Office;
Keywords=latex;bibtex;editor;
MimeType=application/vdn.setzer.session.stzs;text/x-tex;text/x-bibtex;

This is just a very simple/plain example though!

oscfdezdz commented 1 year ago

To workaround this you can also set Exec=setzer %F to Exec=env PYTHONPATH=/usr/local/lib/python3/dist-packages setzer %F, either in ~/.local/share/applications/org.cvfosammmm.Setzer.desktop or /usr/local/share/applications/org.cvfosammmm.Setzer.desktop

Output when trying to run Setzer from the terminal in Debian 12:

Traceback (most recent call last):
  File "/usr/local/bin/setzer", line 31, in <module>
    from setzer.workspace.workspace import Workspace
ModuleNotFoundError: No module named 'setzer'

Still not sure what can be done to address this, since in Fedora is working as expected.