flozz / nautilus-terminal

A terminal embedded in Nautilus, the GNOME's file browser
GNU General Public License v3.0
323 stars 24 forks source link

Does not work with Nautilus 43.rc on Fedora Linux 37 beta #82

Closed TomaszGasior closed 1 year ago

TomaszGasior commented 2 years ago

I am unable to start this extension in new Nautilus ported to GTK4 on Fedora 37. Extension is installed by my RPM package. nautilus-terminal-4.0.2-1.fc37.noarch.zip

This is error output when launching Nautilus:

/usr/lib/python3.11/site-packages/nautilus_terminal/crowbar.py:1: PyGIWarning: Gtk was imported without specifying a version first. Use gi.require_version('Gtk', '4.0') before import to ensure that the right version gets loaded.
  from gi.repository import Gtk
Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/gi/importer.py", line 142, in load_module
    introspection_module = get_introspection_module(namespace)
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/gi/module.py", line 263, in get_introspection_module
    module = IntrospectionModule(namespace, version)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/gi/module.py", line 110, in __init__
    repository.require(namespace, version)
gi.RepositoryError: Requiring namespace 'Gtk' version '3.0', but '4.0' is already loaded

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/share/nautilus-python/extensions/nautilus_terminal_extension.py", line 22, in <module>
    from nautilus_terminal.crowbar import Crowbar  # noqa
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/nautilus_terminal/crowbar.py", line 5, in <module>
    from .nautilus_terminal import create_or_update_natilus_terminal
  File "/usr/lib/python3.11/site-packages/nautilus_terminal/nautilus_terminal.py", line 14, in <module>
    from gi.repository import GLib, Gio, Gtk, Gdk, Vte, Pango  # noqa: E402
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/gi/importer.py", line 144, in load_module
    raise ImportError(e)

System information


NAUTILUS TERMINAL
=================
Version: 4.0.2
System-wide extension: Installed
Current user extension: Absent
Installation path: /usr/lib/python3.11/site-packages/nautilus_terminal

OPERATING SYSTEM
================
OS: Linux
Platform: Linux-5.19.8-300.fc37.x86_64-x86_64-with-glibc2.36
Version: #1 SMP PREEMPT_DYNAMIC Thu Sep 8 19:14:17 UTC 2022
Distribution issue: \S
Kernel \r on an \m (\l)

PYTHON
======
Python version: 3.11.0

SYSTEM DEPENDENCIES
===================
Nautilus Python: Absent
TomaszGasior commented 2 years ago

Since you didn't use GitHub releases to publish new versions after v4.0.2 I didn't get notification from GitHub about new versions so I didn't update my RPM package. :( However, with up-to-date version of the source code the issue still occurs.

I guess it won't be trivial to make your extension compatible with GTK4 and new Nautilus so for now I will make my package not installable with Nautilus 43.

flozz commented 2 years ago

Since you didn't use GitHub releases to publish new versions after v4.0.2 I didn't get notification from GitHub about new versions so I didn't update my RPM package. :(

You are right, I will use the Github release feature in the future... if there is any future

I guess it won't be trivial to make your extension compatible with GTK4 and new Nautilus so for now I will make my package not installable with Nautilus 43.

I will try to port Nautilus Terminal to GTK 4 once Nautilus 43 released in Ubuntu (in about a month). We will see if it is doable or if it is too complicated :)

palto42 commented 2 years ago

Hi @flozz , just want to add that I face the same issue on Solus which was just upgraded to Gnome 43.

flozz commented 2 years ago

Currently, it will not be possible to port Nautilus Terminal to Nautilus 43+. The LocationWidgetProvider that was used to integrate with Nautilus does not exist anymore. From the doc:

LocationWidgetProvider

The Nautilus.LocationWidgetProvider was removed without replacement. If your script requires it, you can request a new model-based API for your specific use case on the Nautilus issue tracker.

flozz commented 2 years ago

I had a look to currently available APIs ; it seems there is no obvious way to integrate Nautilus Terminal with them.

Nautilus Terminal was never a "first class citizen" in Nautilus: it hijacked existing APIs to slip into Nautilus. It used a lot of hacks to work around limitations and to work (you can read the comments in nautilus_terminal.py if you're curious).

I already wrote a quite long blog post about Nautilus Terminal years ago where I stated that its future was unsure.

There may be some APIs in the future to integrate a terminal in Nautilus (and if that happens, everything will have to be redeveloped from scratch), but I think that for now, after 12 years of existence, it is the end of the project.

A big thanks to all users and contributors of Nautilus Terminal.

toccata10 commented 2 years ago

hi Flozz, This is very sad: it's my most used extension in my daily life/work: switching from graphical to command-line is awesome. Saved my hours of repetitive tasks. So thanks a lot for making my life so much easier for such a long time. It's so useful I can't understand why it's not a standard feature of nautilus: when you've tasted it, you just can't stop using it. I wonder if there's any alternative as you seem pessimistic about the future of this. Once more: thanks a lot

flozz commented 2 years ago

I wonder if there's any alternative as you seem pessimistic about the future of this.

Currently there is no alternative for Nautilus itself but there are Nautilus forks like Caja and Nemo that may be able to integrates older (or patched) versions of Nautilus Terminal. There is also Dolphin, the KDE file manager integrates natively a terminal.

Nautilus developers are open to discussion so you may open a thread of their discourse to ask if it is possible to add APIs to integrate a terminal properly in Nautilus. :)

Batwam commented 1 year ago

this is such a shame, I loved nautilus-terminal :-(

flozz commented 1 year ago

There is currently a discussion on GNOME forums about Nautilus Terminal:

wood-j commented 1 year ago

What a pitty to hear that. (:< Quite inconvenient with out this plugin after a system update and no way to downgrade. Have to switch to nemo and nemo-terminal for me right now, but still looking forward for the day you come back. Thanks for your effort @flozz

tekkamanninja commented 1 year ago

Really hope this can work on Fedora 38

TomaszGasior commented 1 year ago

@tekkamanninja No, this extension will not work anymore in any new version of Nautilus. nautilus-terminal relied on unsupported hacks and these hacks does not work anymore in current Nautilus, without replacements. https://github.com/flozz/nautilus-terminal/issues/89#issuecomment-1564290313