Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal command doesn't work if x-terminal-emulator is unavailable #37

Closed
OPNA2608 opened this issue Feb 23, 2024 · 4 comments
Closed

Comments

@OPNA2608
Copy link
Contributor

With version 0.1.0 on a non-Debian distro, I'm unable to use the Terminal command:

[2024-02-23 09:05:03.714707] < -warning- > miral: Failed to execute client ("x-terminal-emulator") error: No such file or directory
!!! Fatal signal received. Attempting cleanup, but deadlock may occur.
Mir fatal error: Unsupported attempt to continue after a fatal signal: SIGSEGV
!!! Fatal signal received. Attempting cleanup, but deadlock may occur.
Mir fatal error: Unsupported attempt to continue after a fatal signal: SIGABRT
[2024-02-23 09:05:04.737998] < - debug - > mirserver: Handling Child exited from pid=4895

x-terminal-emulator doesn't exist on this distro, and none of the other POSSIBLE_TERMINALS entries get attempted.

@AlanGriffiths
Copy link

@mattkae

            for (auto const& terminal : POSSIBLE_TERMINALS)
            {
                if (external_client_launcher.launch({terminal}) > 0)
                    break;
            }

Doesn't do what you think. external_client_launcher.launch() does a fork()/exec() and returns the pid of the forked process. The fork() will always succeed, even if the exec() doesn't.

The approach I took with Miriway was to allow the user to configure the terminal command (and provide a fallback to a script that tries to identify an installed terminal).

@mattkae
Copy link
Owner

mattkae commented Feb 24, 2024

Doesn't do what you think. external_client_launcher.launch() does a fork()/exec() and returns the pid of the forked process. The fork() will always succeed, even if the exec() doesn't.

Oh that's unfortunate

The approach I took with Miriway was to allow the user to configure the terminal command (and provide a fallback to a script that tries to identify an installed terminal).

I think that I will follow this same approach

@mattkae
Copy link
Owner

mattkae commented Feb 25, 2024

Hi agan @OPNA2608 👋 Would you give this PR try when you get a chance: #40

It should work in both a snap and non-snap context. You should be able to install the AMD snap from this page: https://github.com/mattkae/miracle-wm/actions/runs/8038897957?pr=40. I'll add the fix to a release/0.1.1 later this week if all is good.

Thanks for finding the bug!

@mattkae
Copy link
Owner

mattkae commented Feb 25, 2024

Also, I am testing out #39 now. I will cherry-pick it into release/0.1.1 alongside the terminal fix once approved 👍

@mattkae mattkae closed this as completed Feb 26, 2024
mattkae added a commit that referenced this issue Feb 26, 2024
…ommand, and notifying when we can't open it (#40)

* feature: selecting a sensible terminal, configurable terminal command, and notifying when we can't open it

* bugfix: using CMAKE_INSTALL_BINDIR for  miracle-wm-sensible-terminal

Co-authored-by: Cosima Neidahl <opna2608@protonmail.com>

* enhancement: update program_exists check wihout bounds check

---------

Co-authored-by: Cosima Neidahl <opna2608@protonmail.com>
Conan-Kudo pushed a commit to Conan-Kudo/miracle-wm that referenced this issue Apr 23, 2024
…minal command, and notifying when we can't open it (mattkae#40)

* feature: selecting a sensible terminal, configurable terminal command, and notifying when we can't open it

* bugfix: using CMAKE_INSTALL_BINDIR for  miracle-wm-sensible-terminal

Co-authored-by: Cosima Neidahl <opna2608@protonmail.com>

* enhancement: update program_exists check wihout bounds check

---------

Co-authored-by: Cosima Neidahl <opna2608@protonmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants