How do I change default terminal emulator?
I'm currently using Ubuntu 25.04 and recently tried changing the default terminal from gnome-terminal to ghostty.
I tried running sudo update-alternatives --config x-terminal-emulator, but ghostty wasn't listed.
I then ran sudo update-alternatives --install /usr/bin/x-terminal-emulator x-terminal-emulator /snap/bin/ghostty 50
After that I could see ghostty in update-alternatives, but, even after rebooting, when I open the terminal with Ctrl+Alt+T, gnome-terminal still opens instead.
What am I missing here?
Top Answer/Comment:
I don't know whether you had already solved your problem,
but as a solution for the future, here the required steps...
- Check the name of your corresponding 'Snap'
.desktop shortcut:
ls -la /var/lib/snapd/desktop/applications/
We will see, that in case of 'Ghostty' this is ghostty_ghostty.desktop
2. Create or edit our xdg-terminals.list file, to define 'Ghostty' as our preferred terminal client:
nano ~/.config/xdg-terminals.list <- This is our user's one, but it is up on us, if we want the system level alternate of it.
Put ghostty_ghostty.desktop (in case of 'Snap' apps, we should use their desktop entries) into it as the first line, as in case of multiple choices, the priority will be counted from the top/first entry.
Save it, close the editor.
3. First time test it from terminal with:
xdg-terminal-exec ghostty_ghostty.desktop
If it works, it should work from any other application, which uses the 'xdg' way to open it, like Nautilus, or GNOME default keyboard shortcut, etc.
As of 2026-03-30, there is no way to open the new terminal as a new tab in an already available 'Ghostty' window, but there are lot of requests for it.
상단 광고의 [X] 버튼을 누르면 내용이 보입니다