this post was submitted on 03 Sep 2024
20 points (100.0% liked)

Linux

5165 readers
199 users here now

A community for everything relating to the linux operating system

Also check out [email protected]

Original icon base courtesy of [email protected] and The GIMP

founded 1 year ago
MODERATORS
 

I've tried every tutorial I could find. From symlinking the desired terminal to gnome-terminal, or using the update-alternatives command to using the gsettings command to set the default terminal. Nothing works.

What is the definitive way to set the default terminal for this GUI action? And why is this so hard to do?!

I'm on Fedora if it's relevant.

top 11 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 2 months ago (1 children)

Went down the rabbit hole for you while drinking some tea listening to the rain - it looks like in the future there is a new app/proposal for FreeDesktop to use xdg-terminal-exec as the new/default way and it's hard coded into the GNOME "gio" code over here (ctrl+f search xdg-terminal-exec): https://gitlab.gnome.org/GNOME/glib/-/blob/main/gio/gdesktopappinfo.c

That said, it looks like the nautilus-open-terminal Nautilus extension is shipped as part of gnome-terminal so it's hard coded to run that terminal not using the above code. Instead, you'd need to leverage a different extension called nautilus-open-any-terminal for now until the landscape changes: https://github.com/Stunkymonkey/nautilus-open-any-terminal

(disclaimer: not using GNOME/Nautilus or Fedora, theorycraft from me)

[–] [email protected] 5 points 2 months ago (1 children)

I hope it won't take too long until this is implemented. It's baffling that such a thing is not possible in an easy and accessible way and instead is hardcoded.

[–] [email protected] 3 points 2 months ago

This is unfortunately a choice the Nautilus (GNOME) folks have taken; in other file managers (Thunar for XFCE, Caja for MATE, etc.) the ability to use custom actions are a first class citizen. Within Nautilus, the nautilus-actions project was superseded by the filemanager-actions project which was then archived: https://gitlab.gnome.org/Archive/filemanager-actions - a custom GNOME action might be something like gio open /path/to/terminal.desktop %d (where %d is the directory from Nautilus)

There are 3rd party attempts to recreate what was stripped out of/abandoned in Nautilus such as this one: https://github.com/bassmanitram/actions-for-nautilus

[–] [email protected] 4 points 2 months ago

Probably not what you want, but you could change your file manager from Nautilus to one that supports this feature. I like Thunar since it comes with a bulk file renamer that works pretty well (I hoard TV shows and movies).

[–] [email protected] 4 points 2 months ago (1 children)

Since you have Nautilus, i'm assuming you have the rest of GNOME too.

GNOME Settings should have a default apps tab, so you should be able to change it from there.

Otherwise, org.gnome.desktop.default-applications.terminal exec 'desired-terminal', and obviously don't forget to swap that for whichever one you want to use

[–] [email protected] 4 points 2 months ago

As I said I have tried this and it isn't working.

[–] [email protected] 4 points 2 months ago (1 children)

I don't have a Fedora workstation in front of me right now, but it memory serves me right there's a "default applications" or similar menu in Gnome's settings.

[–] [email protected] 3 points 2 months ago

That doesn't apply to the "Open in Terminal" option in Nautilus right click menu.

[–] refalo 3 points 2 months ago

Depending on your gnome version, you can't

[–] [email protected] 3 points 2 months ago* (last edited 2 months ago)

There is an extension that lets you open in a different terminal. I don't have GNOME or Nautilus installed, so no idea if and how it works, just found it through a web search. Maybe it helps: https://github.com/Stunkymonkey/nautilus-open-any-terminal

Edit: Never mind. I see it's already posted in the replies.

[–] WhosDonlee 1 points 1 month ago

I ran into the same problem some time ago. My solution is not ideal, but it works fine. In gnome-terminal --preferences go to profile -> command, and as custom command I put open-wezterm-here. This could be the terminal you're using. Set 'when commands exits' to Exit terminal. It does show gnome-terminal for a split second. But that doesn't really bother me anymore.