Changing the default terminal that i3 uses

I have i3 setup as my window manager and I edited my config and changed the following line in config to get alacritty to launch as my default terminal.

bindsym $mod+Return exec alacritty

But whenI reload i3 and I get a config error and click on the button to edit the config, it loads xcfe-terminal with vim running in it.

How do I make Alacritty the default terminal system-wide?

It might help to edit file
value of variable

Could it be that under `assign [class=“xfce4-terminal”] $ws1’

You have not yet changed it to alacritty? You can also comment it with # if you prefer no assigning terminal to workspace 1.

Same for the for_window command. I would just search the config for xfce4-terminal and replace with your preferred terminal.

1 Like

I created a .profile in my home directory and added the line:

export TERMINAL=alacritty

I then edited .config/i3/config

and added the following line:

bindsym $mod+Return exec i3-sensible-terminal

But most of thre EndeavorOS stuff still pops XFCE-Terminal.

Now, when I right click on a file on thunar and try to open it in vim, vim opens in xfce4-terminal. That may be an xfce4 issue, and an EndeavorOS specific issue.

That might be some configuration the i3wm Endeavour maintainer did. I installed thunar again and tried it myself, and it also does open in xfce4-terminal, even though my default terminal emulator is set to st.

When I try it in pcmanfm, the gui file manager I use, it just works and opens neovim inside st.

Maybe Joe Kamprad could help you on that?

If you need to get it to work quickly, I would advise you to use another file manager, either through a GUI or a CLI (pcmanfm and ranger/vifm/lf are some choices).

thunar is an xfce4 application :wink: we do not set this up to open in xfce4 terminal. but you can change that in thunar afaik…

uses exo-open in thunar:

and on eos apps it is set to choose the first one it finds to be used… so you can try uninstalling xfce4-terminal or set one in configs:
edit: /etc/eos-script-lib-yad.conf
and change + uncomment this line:
# EOS_YAD_TERMINAL="terminator"

1 Like

Hi, I have the exact same issue, so I’m necrobumping this because given solutions don’t work.

The ‘Open terminal here’ right-click menu works, however, but opening files (with terminal vim) from thunar doesn’t. I’ve uninstalled xfce4-terminal, but that results in a popup “Unable to find terminal required for application” when trying to open a file in terminal vim.

I have edited /etc/eos-script-lib-yad.conf and set EOS_YAD_TERMINAL="alacritty" and as instructed in said file, checked that alacritty is indeed supported.

Also tried reinstalling thunar, vim, and alacritty. I’ve also installed xfce4-settings, and by running xfce4-settings-manager I can go and set my Default Applications, but even this doesn’t help. Only fishy thing I noticed while setting Terminal Emulator in Default Applications is, that when I choose alacritty, the app thumbnail isn’t loaded, while with other apps it is.
I noticed that /usr/share/applications/Alacritty.desktop is capitalized, but playing around with that doesn’t help. exo-open --launch TerminalEmulator launches alacritty as it should. I also tried editing /etc/xdg/xfce4/helpers.rc

Even pcmanfm doesn’t work: ‘open with vim’ doesn’t do anything and clicking on a text file tries to open xterm.

For now the only way is to use terminal or terminal based file manager and open file explicitly in vim. Running out of ideas…

same as before this is not an issue with i3 and more with thunar or vim itself…

so it will need to set the terminal as an environment variable somewhere in your configs … in ~/.profile ~/.config/environment.d/*.conf

something like this?


export $TERMINAL=alacritty

Thanks! And sorry for bringing in issues that may not be i3 specific. I recently used EOS bspwm edition, and using xfce4-settings-manager was enough then to fix the issue, so that lead me to suspect i3.

I’ve now fixed the issue, but given advice didn’t work. I had set the environment variable and the issue still persisted with other file managers, so there definitely is something else going on than just thunar. Maybe I have just misconfigured something, but I’ve pretty much reset everything I could think of.

While searching around for my error message “Unable to find terminal required for application” I found this comment in unrelated project, where is said

This [error message] is because gnome has a hardcoded list of terminals that it looks for. Issue filed here

Here is the list of hardcoded terminals

(The list contains gnome-terminal mate-terminal xfce4-terminal nxterm color-xterm rxvt dtterm xterm)

Real upstream issue is at butwhile there is activity, it is 11 years old and still open. So I would jot hold my breath.

So now it started to look like gnome / glib issue.

Two little bit ugly fixes I found were

  1. ln -s /usr/bin/alacritty /usr/bin/xterm.

and other from this reddit thread (this I prefer, because it’s user specific)

  1. copy /usr/share/applications/vim.desktop to ~/.local/share/applications/vim.desktop and change the Exec-line to Exec=alacritty -e vim %F and set Terminal=false.

I had tried the latter before, but without Terminal=false because that didn’t seem to make any sense. But I now realize that the desktop file effectively launches a terminal emulator, which itself is not opened in any terminal, so I guess that’s why…

I still don’t know why all this trouble was needed this time and not before. But now everything works and I’m happy! :slight_smile: I hope this helps if someone else has the same issues.

1 Like