You are not logged in.

#1 2025-09-27 17:15:54

GavinX
Member
Registered: 2016-06-28
Posts: 23

[SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

I've installed Ptyxis in Gnome 49 and noticed that the option 'Open in Ptyxis' is not present when I right click in Nautilus. The option 'Open in Console' is present because I still have Gnome Console installed. I installed separately 'nautilus-open-in-ptyxis' and 'nautilus-open-any-terminal' but neither worked.

Is there a bug in Gnome 49 that prevents that option from showing in Nautilus? Is there a fix?

Last edited by GavinX (2025-10-10 00:12:47)

Offline

#2 2025-09-27 18:54:19

tekstryder
Member
Registered: 2013-02-14
Posts: 450

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

I wrote two Nautilus python plugins for my preferred terminals (foot & ptyxis).

They're both still available (and functional) on the context menu of Nautilus 49.

Are you sure you had that option available without a plugin?

https://gitlab.gnome.org/GNOME/nautilus/-/issues/2978

It's been requested to allow alternative terminals, but not yet implemented.

EDIT:

Oh, and this Settings one too:

https://gitlab.gnome.org/GNOME/gnome-co … ssues/3374

Last edited by tekstryder (2025-09-27 19:02:14)

Offline

#3 2025-09-27 20:41:56

GavinX
Member
Registered: 2016-06-28
Posts: 23

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

tekstryder wrote:

I wrote two Nautilus python plugins for my preferred terminals (foot & ptyxis).

They're both still available (and functional) on the context menu of Nautilus 49.

Are you sure you had that option available without a plugin?

https://gitlab.gnome.org/GNOME/nautilus/-/issues/2978

It's been requested to allow alternative terminals, but not yet implemented.

EDIT:

Oh, and this Settings one too:

https://gitlab.gnome.org/GNOME/gnome-co … ssues/3374

I installed ptyxis just a few days ago and then noticed the option was not available. Then when I checked console, I noticed it was there. So my guess is that this feature is not a part of Nautilus as yet.

Would you mind sharing your plugin for ptyxis?

Offline

#4 2025-09-28 11:39:13

tekstryder
Member
Registered: 2013-02-14
Posts: 450

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

You could try the popular, maintained, and supported nautilus-open-any-terminal plugin.

Offline

#5 2025-09-28 14:46:12

GavinX
Member
Registered: 2016-06-28
Posts: 23

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

tekstryder wrote:

You could try the popular, maintained, and supported nautilus-open-any-terminal plugin.

That's what I indicated in the original post; I tried that and nautilus-open-in-ptyxis but neither worked. But I will try again. Thanks.

Offline

#6 2025-09-28 16:34:40

tekstryder
Member
Registered: 2013-02-14
Posts: 450

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

GavinX wrote:

That's what I indicated in the original post.

Oops, yes I completely missed that.

Last edited by tekstryder (2025-09-28 16:34:54)

Offline

#7 2025-10-07 13:07:15

tekstryder
Member
Registered: 2013-02-14
Posts: 450

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

xref similar thread: https://bbs.archlinux.org/viewtopic.php?pid=2266471

Did you ever get this resolved @GavinX?

Offline

#8 2025-10-07 14:23:23

GavinX
Member
Registered: 2016-06-28
Posts: 23

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

tekstryder wrote:

Did you ever get this resolved @GavinX?

Unfortunately, no. Nothing I tried worked so I simply remained with Gnome Console as my terminal of choice. I will continue to explore, though.

Offline

#9 2025-10-07 16:36:07

tekstryder
Member
Registered: 2013-02-14
Posts: 450

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

Here, see if this works for you.

import os
from gi.repository import Nautilus, GObject

class OpenPtyxisExtension(GObject.GObject, Nautilus.MenuProvider):
    def menu_activate_cb(self, menu, foldername):
        os.system(f"ptyxis --new-window -d \"{foldername}\" &")

    def get_file_items(self, files):
        if len(files) != 1 or not files[0].is_directory():
            return []

        file = files[0]
        srcPath = file.get_location().get_path()

        if srcPath is None:
            return []

        item = Nautilus.MenuItem(
            name="OpenPtyxisExtension::Open_Dir",
            label="Open in Ptyxis",
        )
        item.connect("activate", self.menu_activate_cb, srcPath)
        return [item]

    def get_background_items(self, file):
        if not (file.is_directory() and file.get_uri_scheme() == "file"):
            return []

        currentDir = file.get_location().get_path()

        if currentDir is None:
            return []

        item = Nautilus.MenuItem(
            name="OpenPtyxisExtension::Open_Background",
            label="Open Here in Ptyxis",
        )
        item.connect("activate", self.menu_activate_cb, currentDir)
        return [item]

I've not distributed via git{hub,lab}, only for my own use.

Guess now I've opened myself up for code review... have at it Python pros.

Last edited by tekstryder (2025-10-09 11:38:16)

Offline

#10 2025-10-10 00:11:49

GavinX
Member
Registered: 2016-06-28
Posts: 23

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

tekstryder wrote:

Here, see if this works for you.

import os
from gi.repository import Nautilus, GObject

class OpenPtyxisExtension(GObject.GObject, Nautilus.MenuProvider):
    def menu_activate_cb(self, menu, foldername):
        os.system(f"ptyxis --new-window -d \"{foldername}\" &")

    def get_file_items(self, files):
        if len(files) != 1 or not files[0].is_directory():
            return []

        file = files[0]
        srcPath = file.get_location().get_path()

        if srcPath is None:
            return []

        item = Nautilus.MenuItem(
            name="OpenPtyxisExtension::Open_Dir",
            label="Open in Ptyxis",
        )
        item.connect("activate", self.menu_activate_cb, srcPath)
        return [item]

    def get_background_items(self, file):
        if not (file.is_directory() and file.get_uri_scheme() == "file"):
            return []

        currentDir = file.get_location().get_path()

        if currentDir is None:
            return []

        item = Nautilus.MenuItem(
            name="OpenPtyxisExtension::Open_Background",
            label="Open Here in Ptyxis",
        )
        item.connect("activate", self.menu_activate_cb, currentDir)
        return [item]

I've not distributed via git{hub,lab}, only for my own use.

Guess now I've opened myself up for code review... have at it Python pros.

Just tried it, and it works perfectly. Thank you soooooo very much for willingly sharing your code. It is very much appreciated. You rock! smile smile smile

Offline

#11 2025-10-13 14:23:24

tekstryder
Member
Registered: 2013-02-14
Posts: 450

Re: [SOLVED] - Gnome 49 - Ptyxis 'Open in Ptyxis' Missing from Nautilus

Cool. Glad to hear.

Looks like nautilus-open-any-terminal was busted by the upgrade:

https://github.com/Stunkymonkey/nautilu … issues/242
https://github.com/Stunkymonkey/nautilu … l/pull/250

It's got a lot more going on vs my little single-purpose script haha.

There were some innocuous warnings before nautilus-python 4.0.1 -> 4.1 was updated, but that's about it.

Didn't need to rebase any of my plugins for Nautilus 49, including my more extensive Meld script.

My various local nautilus patches were another story tho... all required rebasing... but are all applied cleanly and functional.

Offline

Board footer

Powered by FluxBB