Setting $TERMINAL variable mentioned in i3-sensible-terminal

Hi my fellow i3 users,
I just finished a new Manjaro-i3 installation and wanted to change the from i3 used Terminal Emulator. The default installed Emulator is urxvt. i3 by default will start ì3-sensible-terminal, wich will try to open the in $TERMINAL stored terminal emulator. The documentation to i3-sensible-terminal says one can change the system variable $TERMINAL in order to set the preferred terminal emulator.

After a lot of searching and reading I couldn’t find a liable solution to set said variable. If you try
export TERMINAL=alacritty
from command line, this variable will not hold its assigned value after closing the used terminal window.

This is not a Manjaro specific problem, as there are same questions from Debian and Arch users.

I am specifically not asking for a workaround. The comment on the man page of i3-sensible-terminal suggests this should more or less be a well known standard move.

Please don’t complain about the order: If the user has any preference, they will have $TERMINAL set or modified their i3 configuration file.

Thank you all for any Advice or Ideas.

A better and more popular way is to change i3-sensible-terminal to your preferred terminal:

# start a terminal
bindsym $mod+Return exec xfce4-terminal
1 Like

Change the content in

$HOME/.local/bin/terminal

to

alacritty $@

Thats it.

1 Like

Open the file ~/.profile and add this line

export TERMINAL=/usr/bin/alacritty

Save the file and logout/login for the changes to have effect.

As mentioned in the i3 documentation, the $TERMINAL variable is the first in the order, so it has the highest precedence in the system for your user.

2 Likes

Thank you for your answer .
Sadly that’s one of the workarounds I already knew of and wanted not to do. I was looking to set the $TERMINAL variable as mentioned in i3-sensible-terminal, so that for example if I open vim , it will be nested in my preferred Terminal
Emulator.

Thank you.
That was the solution I was looking for !

1 Like

Thank you.
That was actually very helpful!
My terminal executable was stored at /usr/bin/terminal/ as mentioned in following forum article :

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.