Stunkymonkey / nautilus-open-any-terminal

GNU General Public License v3.0
513 stars 51 forks source link

Extension not working using AUR Install Method #128

Closed Anthony-Fiddes closed 5 months ago

Anthony-Fiddes commented 5 months ago

Hi!

I installed the extension but am not seeing any change in my nautilus. I'm running arch and Gnome 45.3. I figure maybe I missed something simple, so I'll walk through how I installed per the wiki instructions:

yay -S nautilus-open-any-terminal
gsettings set com.github.stunkymonkey.nautilus-open-any-terminal terminal kitty

The second command responded No such schema “com.github.stunkymonkey.nautilus-open-any-terminal”.

I figured maybe I missed something so I ran

sudo glib-compile-schemas /usr/share/glib-2.0/schemas, which did complete, and

glib-compile-schemas ~/.local/share/glib-2.0/schemas/, which complained about the folder not existing.

Ofc I ran nautilus -q and reopened a couple times throughout and still did not see the option. I also tried restarting/logging in and out, and restarting Gnome.

When I run nautilus, this is the output:

❯ nautilus
** Message: 10:01:36.643: Connecting to org.freedesktop.Tracker3.Miner.Files
Initializing Nextcloud-client-nautilus extension
Using python version sys.version_info(major=3, minor=11, micro=6, releaselevel='final', serial=0)

** (org.gnome.Nautilus:20092): WARNING **: 10:01:37.037: Unable to create connection for session-wide Tracker indexer: The name is not activatable

Screenshot of my context menu:

image

Screenshot of the setting in dconf:

image

Version:

image

lvxnull commented 5 months ago

What's the output of ls /usr/share/glib-2.0/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml?

Anthony-Fiddes commented 5 months ago
❯ ls /usr/share/glib-2.0/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml
ls: cannot access '/usr/share/glib-2.0/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml': No such file or directory
lvxnull commented 5 months ago

That's weird. What's the output of pacman -Ql nautilus-open-any-terminal? Have you tried installing from the AUR manually, without using yay?

Anthony-Fiddes commented 5 months ago

Hey @lvxnull, here's the output you requested:

❯ pacman -Ql nautilus-open-any-terminal
nautilus-open-any-terminal /home/
nautilus-open-any-terminal /home/anthonyfiddes/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal-0.5.0-py3.11.egg-info/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal-0.5.0-py3.11.egg-info/PKG-INFO
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal-0.5.0-py3.11.egg-info/SOURCES.txt
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal-0.5.0-py3.11.egg-info/dependency_links.txt
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal-0.5.0-py3.11.egg-info/top_level.txt
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/__init__.py
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/__pycache__/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/__pycache__/__init__.cpython-311.opt-1.pyc
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/__pycache__/__init__.cpython-311.pyc
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/__pycache__/nautilus_open_any_terminal.cpython-311.opt-1.pyc
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/__pycache__/nautilus_open_any_terminal.cpython-311.pyc
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/de/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/de/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/de/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/es/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/es/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/es/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/fr/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/fr/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/fr/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/pl/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/pl/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/pl/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/pt_BR/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/pt_BR/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/pt_BR/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/ru/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/ru/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/ru/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/sw/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/sw/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/sw/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/tr/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/tr/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/tr/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/zh_CN/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/zh_CN/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/locale/zh_CN/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/nautilus_open_any_terminal.py
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/schemas/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/lib/python3.11/site-packages/nautilus_open_any_terminal/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/glib-2.0/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/glib-2.0/schemas/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/glib-2.0/schemas/com.github.stunkymonkey.nautilus-open-any-terminal.gschema.xml
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/de/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/de/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/de/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/es/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/es/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/es/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/fr/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/fr/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/fr/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/pl/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/pl/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/pl/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/pt_BR/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/pt_BR/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/pt_BR/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/ru/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/ru/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/ru/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/sw/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/sw/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/sw/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/tr/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/tr/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/tr/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/zh_CN/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/zh_CN/LC_MESSAGES/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/locale/zh_CN/LC_MESSAGES/nautilus-open-any-terminal.mo
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/nautilus-python/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/nautilus-python/extensions/
nautilus-open-any-terminal /home/anthonyfiddes/.pyenv/versions/3.11.6/share/nautilus-python/extensions/nautilus_open_any_terminal.py
Anthony-Fiddes commented 5 months ago

Regarding your other question, I gave it a try really quick:

~ ······························································································· 17:49:11
❯ yay -R nautilus-open-any-terminal 
[sudo] password for anthonyfiddes: 
checking dependencies...

Package (1)                 Old Version  Net Change

nautilus-open-any-terminal  0.5.0-1       -0.12 MiB

Total Removed Size:  0.12 MiB

:: Do you want to remove these packages? [Y/n] 
:: Processing package changes...
(1/1) removing nautilus-open-any-terminal                       [-----------------------------------] 100%
~ ···························································································· 3s 17:49:21
❯ mkdir /tmp/build && cd /tmp/build
/tmp/build ······················································································ 17:49:26
❯ curl -L -O https://aur.archlinux.org/cgit/aur.git/snapshot/nautilus-open-any-terminal.tar.gz
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   807    0   807    0     0    765      0 --:--:--  0:00:01 --:--:--   765
/tmp/build ······················································································ 17:49:53
❯ ls
nautilus-open-any-terminal.tar.gz
/tmp/build ······················································································ 17:49:55
❯ tar -xf nautilus-open-any-terminal.tar.gz 
/tmp/build ······················································································ 17:50:07
❯ ls
nautilus-open-any-terminal/  nautilus-open-any-terminal.tar.gz
/tmp/build ······················································································ 17:50:09
❯ cd nautilus-open-any-terminal/
/tmp/build/nautilus-open-any-terminal ··························································· 17:50:14
❯ ls
PKGBUILD
/tmp/build/nautilus-open-any-terminal ··························································· 17:50:15
❯ makepkg -s --install
...
/tmp/build/nautilus-open-any-terminal ························································ 5s 17:50:24
❯ nautilus -q
** Message: 17:51:55.623: Connecting to org.freedesktop.Tracker3.Miner.Files
/tmp/build/nautilus-open-any-terminal ····················································· ✘ 255 17:51:55
❯ nautilus
** Message: 17:51:57.994: Connecting to org.freedesktop.Tracker3.Miner.Files
Initializing Nextcloud-client-nautilus extension
Using python version sys.version_info(major=3, minor=11, micro=6, releaselevel='final', serial=0)

** (org.gnome.Nautilus:42099): WARNING **: 17:51:58.249: Unable to create connection for session-wide Tracker indexer: The name is not activatable

Unfortunately still no context menu:

image

And still no schema:

/tmp/build/nautilus-open-any-terminal ··························································· 17:53:14
❯ gsettings set com.github.stunkymonkey.nautilus-open-any-terminal terminal kitty
No such schema “com.github.stunkymonkey.nautilus-open-any-terminal”
lvxnull commented 5 months ago

For some reason pyenv seems to override the install location of the python package. Try switching to the system python interpreter with pyenv global system, rebuild and see if it works

Anthony-Fiddes commented 5 months ago

Huh... I could have sworn the extension used to work, maybe it stopped working when I installed pyenv and I just didn't notice straight away. I tried running pyenv global system but unfortunately the context menu still isn't showing up. I'll try again after a quick restart.

lvxnull commented 5 months ago

Rebuild the package with the system python interpreter and see if it works then.

Anthony-Fiddes commented 5 months ago

We're getting closer!

The schema actually appears in dconf now:

image

Unfortunately though, the context menu isn't showing up yet and there's some weirdness now where nautilus -q is not closing my existing nautilus windows like it used to. I'll try logging out and logging back in to see if that helps.

Anthony-Fiddes commented 5 months ago

Success!

image

Anthony-Fiddes commented 5 months ago

I'm not quite sure what the solution to help other users who use both pyenv and nautilus-open-any-terminal is here.

Would it just be to put a little note in the README? Or maybe to check for the existence of pyenv and set pyenv global to system and then back to whatever it was before installation (seems like that could maybe get complicated in ways I'm not seeing immediately)?

Edit: Or maybe this could be seen as an issue to submit with pyenv. I'm happy to do so, just not sure what I would say yet.

lvxnull commented 5 months ago

This is an issue with the aur package, not pyenv. I'll see if the command I use to build the debian version would work, but the long term solution is to avoid setup.py install.

Anthony-Fiddes commented 5 months ago

I see! Thanks for looking into it, and lmk if there's any way I can help!

lvxnull commented 5 months ago

I found a way to fix this issue.

package() {
  cd "${pkgname}"

  python3 setup.py install --root "${pkgdir}" --home /usr

  # Don't install the module
  rm -rf "${pkgdir}/usr/lib"
  find "${pkgdir}" -name "__pycache__" -type d -exec rm -rf {} +
}

@Stunkymonkey please add this to the AUR package or give me write access so I can add this myself

Stunkymonkey commented 5 months ago

hey together,

was a bit bussy. Thanks for solving. new package version is pushed.

Stunkymonkey commented 4 months ago

@lvxnull can you post your AUR username, so I can add you as maintainer?

lvxnull commented 4 months ago

@Stunkymonkey it's lvxnull