5

How do I launch the default terminal emulator by command? x-terminal-emulator won't work because I'm not using a Debian and xdg-terminal doesn't seem to exist either. Is there any other way to launch the default terminal emulator?

It will be on GNOME although the terminal might not be gnome-terminal but e.g. tilix instead.

Already found this, but a hard-coded list or something similar probably won't do, because I'm looking for a single command that can perform this.

charlotte
  • 152

2 Answers2

2

There's no generic concept of default terminal emulator.

To get the GNOME desktop's default, use the following commands (taken from https://stackoverflow.com/a/18647630/4457671):

gsettings get org.gnome.desktop.default-applications.terminal exec
gsettings get org.gnome.desktop.default-applications.terminal exec-arg
egmont
  • 5,866
1

As egmont already described, there are no defaults for the terminal emulators, as the implementations vary greatly.

I have replied in longer format to a similar question on Super User, Find the default terminal emulator with this answer.

Greenonline
  • 1,851
  • 7
  • 17
  • 23
AlexLoss
  • 111
  • 1
    Some desktops do have a setting for default terminal though. In XFCE exo-open --launch TerminalEmulator should launch the terminal set in xfce-settings. Cinnamon also has a setting for default terminal. No idea where these are stored though. – Moilleadóir Feb 10 '23 at 02:49