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

Set default terminal to alacritty #273

Open
stevenhuyn opened this issue Sep 14, 2024 · 4 comments
Open

Set default terminal to alacritty #273

stevenhuyn opened this issue Sep 14, 2024 · 4 comments

Comments

@stevenhuyn
Copy link

Is useful when using the file explorer and right click contexts of open terminal here Also will update Ctrl + Alt + T behaviour.

I had to run sudo update-alternatives --config x-terminal-emulator to update the default terminal.

@Kasui92
Copy link
Contributor

Kasui92 commented Sep 17, 2024

We already have hotkeys for alacritty, so I'm not sure overwriting the default here is necessary. And I've found that it's actually nice to have a way to use the system terminal in case there are any issues with alacritty.

From #129

@dhh
Copy link
Member

dhh commented Feb 4, 2025

I would actually reconsider #129 if we could make it work with the "Open in Terminal" from the Gnome finder. But the patch there doesn't do that. It only changes Ctrl + Alt + T.

@iajrz
Copy link

iajrz commented Feb 11, 2025

After a bit of digging, nautilus seems to have predetermined terminal emulators it's happy to call. I got to this apparent location of the list via this stack overflow answer which is now pointing at the wrong line in the file -- expected, as it's pointing at main, not at a specific commit.

In any case, the workaround detailed in the linked StackOverflow answer did not work for me, and neither did a few other alternatives I tried.

There might be something that can be done if something around this SO answer and this SO answer work.

@iajrz
Copy link

iajrz commented Feb 11, 2025

Further investigation yields that gnome-terminal registers the menu item itself leveraging the nautilus extension facilities provided for the purposes.

libnautilus-extension has an official python wrapper. The Ubuntu package name is python3-nautilus.

To fully substitute gnome-terminal in omakub, including the nautilus context menu:

  • gnome-terminal itself needs to be uninstalled from the system (to remove the superfluous nautilus context menu item)
  • either a context menu extension is built into alacritty or a custom extension is developed and installed alongside alacritty via omakub (maybe with nautilus-python, which I thought would be straightforward by installing with apt install, but after too much annoyance python3 does not seem to find the gi module, so I couldn't get even the examples to work; I mildly suspect it has to do with the way python is set up in omakub, but my time and energy ran out for now).
  • sudo update-alternatives --set x-terminal-emulator /usr/bin/alacritty needs to run via omakub at installation time; --set because, unlike --config, it's not interactive.

This might be too much of a hassle for omakub.

A last thing: one of the nautilus-python examples appears to be exactly what is needed for this case.

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

4 participants