GNOME Shell Fix the Open in Terminal Option
I'm writing this guide in the time setting up Kali Linux as my primary desktop operating system, but this happens to me also with other distributions which have multiple desktop environments.
The issue is that: When I want to open a terminal window from the context menu of the desktop within GNOME nothing happening.
Debug the Issue
Open a terminal window run the following command inside and keep it open, then use the option Open in Terminal – Screen 1.
sudo journalctl /usr/bin/gnome-shell -f -o cat
DING: x-terminal-emulator: unrecognized option '--working-directory=/home/<user>/Desktop'
DING: QTerminal 0.16.1
DING: Usage: qterminal [OPTION]...
DING: -d, --drop Start in "dropdown mode" (like Yakuake or Tilda)
DING: -e, --execute <command> Execute command instead of shell
DING: -h, --help Print this help
DING: -p, --profile Load qterminal with specific options
DING: -v, --version Prints application version and exits
DING: -w, --workdir <dir> Start session with specified work directory
The output of the command shown above lead me to the assumption the default Gnome's extension Desktop Icons NG, which generates the context menu, doesn't handle my default terminal application correctly and in the same time this application isn't GNOME Terminal.
The Solution
The solution that I've applied in this certain case was to switch my default terminal emulator application to GNOME Terminal.
sudo update-alternatives --config x-terminal-emulator
There are 2 choices for the alternative x-terminal-emulator (providing /usr/bin/x-terminal-emulator).
Selection Path Priority Status
------------------------------------------------------------
* 0 /usr/bin/qterminal 40 auto mode
1 /usr/bin/gnome-terminal.wrapper 40 manual mode
2 /usr/bin/qterminal 40 manual mode
Press <enter> to keep the current choice[*], or type selection number: 1 [Press Enter]
References
- It's FOSS: How to Change the Default Terminal in Ubuntu
- Stack Overflow: How do I set default terminal to Terminator?
- Desktop Icons NG Issue at GitLab: Desktop icons randomly break and can't open folders located on the desktop.