Gmrun – Substitute for gnome run dialog in Ubuntu

Sponsored Link
‘Gmrun' is a run-program utility that provides bash-like TAB completion and history, the ability to run commands in a terminal using CTRL-Enter. CTRL-R/CTRL-S may be used for history searches, similar to ‘bash'.

Gmrun Features

Here is a list of features provided by this simple and wonderful tool:

  • Provides bash-like TAB completion, only nicer (shows a list containing all possible completions and let the user chose from it; yes, it's also possible to choose with the mouse, but you'll see that the keyboard is outstanding :).
  • Enter simply runs the command line, CTRL-ENTER runs it in a terminal. Of course, the terminal command is configurable in the configuration file, located usually in "~/.gmrunrc".
  • Can run files that do not have "execute" permission 🙂 More specifically, you set a handler for ".doc" files in your .gmrunrc, and it uses that handler to open ".doc" files.
  • Maintains a list of previous commands (history). One can interactively search a command in this list using CTRL-R / CTRL-S (something like interactive search in Emacs), or prefixing the command with an exclamation sign "!" --- like in bash, only the user has a chance to see the command before running it, therefore has a chance to change his mind.
  • It has a small window, not bloated with useless buttons and space-wasting things like "gnome-run".
  • Allows URLs (but they have to be configured in the ~/.gmrunrc file). No matter what, if the input string is in the form "whatever://address" then it looks for an URL handler associated with the "whatever" URL and passes to it the "address" string.
  • Allows user to specify a list of commands that will be always run in a terminal, regardless if the fired key is ENTER or CTRL-ENTER.
  • When started, if a history file exists shows the last command as selected text, such as the user can press ENTER directly to run it again or type another text and the old one will be erased.

Install gmrun Ubuntu

sudo aptitude install gmrun

This will complete the installation.

Once you open gmrun you can see similar to the following screen

Sample examples screens

Keyboard Shortcuts

While running the program, the following keys and key combinations are possible:

ENTER -- Of course, this fires the program entered --- in case there is one.

CTRL-ENTER -- This combination runs the entered command in a terminal. If no command is there (the input line is empty) then it starts a fresh terminal.

CTRL-R -- Starts the "search mode" backward in the history list. The keys pressed in this mode will fire incremental search through history. Pressing CTRL-R again after finding some line will show the next line backward in history that contains the highlighted text.

-- The same as the previous, only it searches forward. It is useful only in the middle of an incremental search, when the history prompt is not at the end of the history list, so that if you pressed "CTRL-R" too much times you can go back. This feature misses from bash, I would really need it --- or maybe it's there and I don't know it...

‘!' (SHIFT-1) -- This is a special key only if pressed as the first character in the input line. It starts a special history search mode where the only lines that match are the ones that start with the entered text. After this mode is started, CTRL-R and CTRL-S can be used as usual but they will only match lines that start with the highlighted text.

TAB -- Completes the word at the cursor position. It can complete executables from $PATH; but if the input line starts with a "/" then it will look in the filesystem for some file that matches the input string. Tilda character (‘~') is converted to the value of $HOME environment variable, when TAB is pressed. This key cannot complete filenames containing SPACE character (other special characters may also not work, but SPACE is the most important bug right now, probably).

Sponsored Link

Related posts

You may also like...

3 Responses

  1. Shubuntu says:

    nice article. it’ll be helpful.

  2. Pepe Gonzales says:

    I’m using the ALT+F2 keyboard shortcut to launch the default “Run Application” dialog. Do you know how I would go about configuring it to launch gmrum instead?

  3. Yogendra Rampuria says:

    I have suffered with a similar issue.
    I liked the whole compiz stuff. So on my laptop I configured windows like shortcuts for nautilus, and firefox and stuff. And the trouble was when i removed the gnome panel and replaced it with awn. “Run Application” Dialogue would not show up.

    So I installed gmrun and assigned it the key r (similar to windows run) from compiz config wizard (General > Command > Commands(add gmrun as a command here) then General > Commnads > Commnads > Key Bindings (Put the key binding here).

    Also, you may remove Alt+F2 as shortcut for run dialog from the compiz-manager (General > Key Binding > Run Dialog) or from the gnome key binding dialog

    Hope it helps few searches for some people

Leave a Reply

Your email address will not be published. Required fields are marked *