Skip to content

Opened new tabs in existing terminal no longer makes the terminal grab focus (focus stays in nautilus) #189

@arigit

Description

@arigit

Since I upgraded my desktop to Ubuntu 24.01.1 (LTS) / GNOME 46 and switched to a Wayland desktop, nautitlus-open-any-terminal (latest master as of now) works but has a problem.

with this configuration:

image

right clicking on any script in nautilus and "Executing in Ptyxis" opens a new tab in the existing ptyxis window and runs the script however the Window focus remains in Nautilus. Before (on ubuntu 22.04 / X11 environment) the new tab always got the focus.

This is kind of annoying as I usually run interactive scripts this way. Can the same old behavior be implemented on modern wayland/gnome? (or: make the focus behavior configurable)

Activity

arigit

arigit commented on Sep 13, 2024

@arigit
Author

I tested with two different terminals, ptyxis (flatpak) and tilix (deb package), both have the same problem, the new tabs do not grab the focus.

I tried to test with gnome-terminal as well but the "new tab" functionality of nautilus-open-any-terminal does not work with it for some reason.

arigit

arigit commented on Sep 14, 2024

@arigit
Author

Hi, I tested with various different terminal apps, in X11 it works, the new tab is created in the terminal, and focus shifts from nautilus to the terminal app / new tab.

In Wayland, the new tab is created and the command runs in it but focus gets stuck in nautilus, no matter what terminal app you are using. This is not a terminal app setting I believe, at least I couldn't find one. There must be a way to tell Wayland to move the focus to the terminal window.

This app (gnome shell extension) is able to raise specific windows if they exist and set focus to them, or create new ones and set the focus, and works perfectly on both Wayland and X11, so somehow this is doable in wayland: https://github.com/CZ-NIC/run-or-raise

arigit

arigit commented on Sep 14, 2024

@arigit
Author

See here how they set the focus to the gnome-shell window they want:

https://github.com/CZ-NIC/run-or-raise/blob/main/lib/action.js

it's in javascript though

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @arigit

        Issue actions

          Opened new tabs in existing terminal no longer makes the terminal grab focus (focus stays in nautilus) · Issue #189 · Stunkymonkey/nautilus-open-any-terminal