Ubuntu – How to set Guake as preferred terminal emulator for “Run in Terminal”

command lineguakepreferences

I've recently installed Guake and like it a lot. I'd like to set it as my preferred terminal application. That is, when I right-click on a bash script file, click "Open", and choose "Run in Terminal", I want it to open in a new Guake tab.

I'm not sure where to set Guake as the preferred app for "Run in Terminal". And I'm guessing that I might need the command to be something like guake --new-tab=new --execute-command="COMMANDHERE", so how do I pass that parameter?

Ideally, I'd like a terminal invocation to open a new Guake tab, unless there is already one available. (Difficult to tell, what id there's already a command running in the existing tab?) Failing that, just opening a new Guake tab is ok. Also, is there an option to keep Guake hidden when this happens?

Already tried:

Based on How can I set default terminal used in Unity? I have already tried:

  • gconftool --type string --set /desktop/gnome/applications/terminal/exec guake – this made Guake appear when I type Ctrl-Alt-T.

  • setting x-terminal-emulator to \usr\bin\guake in Alternatives Configurator – this made no difference (having already made the previous change).

Best Answer

You could probably enjoy running gconf-editor — or maybe even dconf-editor since 12.04, — and navigate directly to the org.gnome.desktop.default-applications.terminal key:

dconf screenshot

The exec-arg parameter must be changed to Guake's -e. For the lazy:

gsettings set org.gnome.desktop.default-applications.terminal exec 'guake --new-tab'
gsettings set org.gnome.desktop.default-applications.terminal exec-arg '-e'