How to use Python extensions when using org.gnome.Nautilus.Devel (beta version)?

Hello dear community

Context

  • I found a little bug in nautilus-python project
  • I created a (tested, POF) test Python extension (available here) that I’m using as a POC to track the bug
  • I’m using Ubuntu 24.04, and the available Nautilus version in this stable distrib is 46.4
  • I’ve to test if the bug I’m tracking is still here in more recent versions of Nautilus; ie 49 or even 50

So I installed nightly build - not from Gnome nightly flatpak repo, contrary to what’s seems to be indicated there - but from org.gnome.Nautilus.Devel

Problem

I’m struggling to run my python extension with the nighly Nautilus (49, or 50, I tested both).

Details

  • I copied my test.py file to $HOME/.var/app/org.gnome.Nautilus.Devel/data/nautilus-python/extensions/ (there’s also another copy in ~/.local/share/nautilus-python/extensions/ in case the devel version is searching there for it)
  • I gave org.gnome.Nautilus.Devel Flatpak the permissions to r/w home
  • but Nautilus didn’t load the script at all
$ flatpak info --show-permissions org.gnome.Nautilus.Devel

[Context]
shared=ipc;
sockets=x11;wayland;
devices=dri;
filesystems=host-etc;/tmp;~/.config/dconf:ro;home;xdg-run/dconf;xdg-run/gvfsd;host;host-os;

[Session Bus Policy]
org.gnome.Settings=talk
org.gnome.DiskUtility=talk
org.gnome.Mutter.ServiceChannel=talk
org.gnome.NautilusPreviewer=talk
org.gnome.NautilusPreviewerDevel=talk
org.gtk.vfs.*=talk
org.gnome.Console=talk
org.gtk.MountOperationHandler=talk
ca.desrt.dconf=talk
org.gnome.OnlineAccounts=talk

[Environment]
DCONF_USER_CONFIG_DIR=.config/dconf

[Policy Tracker3]
dbus:org.freedesktop.Tracker3.Miner.Files=tracker:Audio;tracker:Documents;tracker:FileSystem;tracker:Pictures;tracker:Music;tracker:Video;

I probably missed something.
Where am I supposed to put the Python scripts for devel version ?

Thank you

Hi, I have never used extensions with the flatpak, this would be good to figure out probably. I suppose there is no indication on the extension failing to load? Does the extension work in a non-flatpak installation?

Hi, I have never used extensions with the flatpak, this would be good to figure out probably. I suppose there is no indication on the extension failing to load? Does the extension work in a non-flatpak installation?

Yes the extension works in a non-flatpak installation (Nautilus 1:46.4-0ubuntu0.1). I’m sure the extension is not loaded, nothing in logs.
With my other Nautilus version, if the extension fails to loads, something is added to Nautilus logs.

Apparently you need to package it as a flatpak extension point Extensions - Flatpak documentation for it to work. Hope that helps.

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.