[prev in list] [next in list] [prev in thread] [next in thread] 

List:       qubes-devel
Subject:    Re: [qubes-devel] Re: [GSoC] Qubes-MIME-Handlers Weekly Progress Report #7
From:       Marek =?utf-8?Q?Marczykowski-G=C3=B3recki?= <marmarek () invisiblethingslab ! com>
Date:       2017-07-26 1:23:04
Message-ID: 20170726012304.GT1095 () mail-itl
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

On Tue, Jul 25, 2017 at 05:52:56PM -0700, Andrew Morgan wrote:
> On 07/24/2017 02:33 AM, Andrew Morgan wrote:
> > ## Nautilus
> > 
> > The patch for Nautilus is finally getting going! After some hiccups with
> > Nautilus' build process, I've now switched to [GNOME
> > Builder](https://wiki.gnome.org/Apps/Builder) for the compilation and
> > run management of Nautilus. Builder provides a much cleaner experience
> > when building and compiling, and after only hearing about it here and
> > there, it was exciting to finally download and try it out.
> > 
> > After a couple hiccups with importing the Nautilus code and checking out
> > the correct branch (gnome-3-22 in this case) with the help of some fine
> > folks on #gnome-builder, Nautilus was building and launching as expected:
> > 
> > ![Nautilus built and running from
> > Builder](images/nautilus-gnome-builder.png)
> > *Nautilus built and running from Builder*
> > 
> > The other advantage GNOME Builder holds is its ability to build all
> > projects as flatpaks. This makes it much easier to share testing builds
> > of Nautilus without asking people to install Nautilus' [horrible list of
> > dependencies](https://ubuntuforums.org/showthread.php?t=1678656&p=10426119#post10426119),
> >  and instead just run a single command to start it up!
> > 
> > In addition to Nautilus, GNOME Builder is also helping me with patching
> > [nautilus-python](https://wiki.gnome.org/Projects/NautilusPython/),
> > which are the python bindings that allow extensions written in python to
> > interact with Nautilus' C API.
> > 
> > [This
> > folder](https://git.gnome.org/browse/nautilus-python/tree/src/nautilus-python-object.c)
> >  houses the definitions of functions that can be referenced in
> > `nautilus-python` extensions. Nautilus' maintainer, Carlos Soriano, also
> > kindly pointed out where these methods connect to Nautilus itself, which
> > turns out to be
> > [here](https://git.gnome.org/browse/nautilus/tree/libnautilus-extension).
> > 
> > The typical workflow in a `nautilus-python` extension is to define a
> > function that corresponds to the data or action you desire, then return
> > some data based on some logic you have in your extension. My plan is to
> > create another function here that will be called when a file is
> > determined to be opened. The file will then be opened depending on
> > whether the extension returns a `True` or a `False`.
> > 
> > A new DisposableVM with the file in question can be launched from within
> > the extension, so there is no need for any Qubes-specific code to go
> > into this patch.
> > 
> To clarify on this after some digging today, Nautilus officially only
> supports extensions written in C. There are a few extensions that are
> included in Nautilus' source tree (such as the sendto extension), but
> all one needs to do to install an extension is to place the extension
> library in `/usr/lib(64)/nautilus/extensions-3.0/`, restart Nautilus and
> it should be installed.
> 
> NautilusPython is a Nautilus C extension. It's purpose is just to read
> python scripts that perform extension actions and translate those into
> the C actions Nautilus is used to. It's a completely separate
> compatibility layer.
> 
> This is all fine and dandy, and means that if needed, really only
> Nautilus (not NautilusPython) would have to be patched to include new
> bindings for file open events, and a C Nautilus extension could be
> written to make use of it.
> 
> I'm going to strive to have NautilusPython be compatible with the new
> bindings though, since writing extensions in C is a heck of a lot more
> work and setup then their Python counterparts.

+1

> One blocker I'm having at the moment is getting the gnome-builder
> version of Nautilus to recognize extensions. The 'gnome-3-22' branch
> version, to my knowledge, does not support building with Flatpak (or at
> least there was no manifest defined, even though it could be built and
> ran from gnome-builder).

I'm not really sure if you need to spend time on getting Flatpak build
working. If you build the same (or similar) Nautilus version as is
already installed in the template, all dependencies should be already in
place, so it should be still easy.

> The version that was built couldn't find installed extensions however,
> which lead me to think it was packaged as a Flatpak, with a policy that
> prevented reading it from the extensions directory. (Though I could
> navigate to the extensions directory in Nautilus, so presumably you can
> access it??)
> 
> Checking out the master branch did reveal a Flatpak manifest
> (org.gnome.Nautilus.json), however I am unable to build the latest
> version due to a dependency on glibc v2.51.2 on Fedora 25 (v2.50.3 is
> installed).
> 
> Also not even sure if the latest version is compatible with Qubes since
> we use 3.22 Nautilus at the moment..
> 
> Anyways, that's where I stand with all that. IRC has been helpful with
> some answers, but I still have a lot of questions :)

Maybe, just guessing, it looks for extensions somewhere else? Like /lib
instead of /usr/lib or such. I'd check ./configure (or equivalent)
options. And if still nothing, use strace to check where it really looks
(log to a file, then grep for "extensions" or some similar phrase). See
"-s ..." and "-v" options if paths are truncated in log.

- -- 
Best Regards,
Marek Marczykowski-Górecki
Invisible Things Lab
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCAAGBQJZd+74AAoJENuP0xzK19csyRwH/1yODam87a7KootM/SY3M+0Y
AAy9pDRvJ3vCh1VAQ6bd6hJ7XtwdPDLgbVGXRfvwIt9AcOf0hZGcEGwyQGwbfp+p
JDuLwBl+GYcjXbq3jidnCKF0Ds5LAzbjDIH+PXBfCXUza5tGLi7d8CGy4gdfBKW6
0UAjExpAEI4Iayw8kugNw3ddYh9usAcW9qs7J0TlmKOEK9V8OfzwNuH4BJymt/WE
fGhn6fJOYwP35evYprZX7WOiOzPqy6SNWAhTamCrHubVGfK76lmleSryepMz7tws
GE2wF9MntoXr/C1TGmmoWDeS/fIU4gqwJEc4ij7qUBtmqunbs91+Cpw4H+upULA=
=pVw7
-----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups \
"qubes-devel" group. To unsubscribe from this group and stop receiving emails from \
it, send an email to qubes-devel+unsubscribe@googlegroups.com. To post to this group, \
send email to qubes-devel@googlegroups.com. To view this discussion on the web visit \
https://groups.google.com/d/msgid/qubes-devel/20170726012304.GT1095%40mail-itl. For \
more options, visit https://groups.google.com/d/optout.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic