Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

EDIT:

Ok, fair enough - probably using a standalone launcher is the way to go as Daniel Andersson suggest below. But this leads to following questions:

Either;

  1. How do I get bash-like command completion with Tab to work in xfrun4 or:
  2. Is there some other launcher (for xfce) that opens instantly enough (as fast as xterm) does not need crapload of KDE or Gnome libs that has tab-completion?

For instantly enough reference:

$ time $(xterm echo)

real    0m0.064s
user    0m0.048s
sys     0m0.004s

The original question was:

Old habits die hard, so on my Linux desktop I launch applications by opening a terminal and running the (X) application from the command line. I would like to turn one of my Xterm windows into an application launcher so that I can just type google-chrome or charm and the application is launched in the background without suffixing the command with & or Ctrl-Z followed by bg.

Is there an easy way to make an Xterm window / shell that runs all command in the background? Preferably a script that I can just source (in bash) or even better, something that is run automatically when I disembiggen the font by Ctrl-Shift--

share|improve this question

1 Answer 1

up vote 3 down vote accepted

If your question really is "I want an application launcher", then there are plenty to choose from. It sounds like this is the easiest way to solve your actual problem. I use gmrun which is very light-weight and has completion. Wikipedia keeps a bigger list of such applications. Bind a keyboard shortcut to one of these, and then you can simply issue this shortcut instead of Ctrl+Shift+- and run the program.

If you question is "I don't want to have to type & to launch programs in the background in Bash", then you could do a script such as

#!/bin/sh
while true; do
    read command
    ${command} &
done

When run, you can enter a command, press Enter, and it will be launched in the background.

If you want the shell to automatically think "ah, this is a graphical program that he wants to run in the background" and only then add a &, then you'd need to keep some sort of list on all these binary names, and it would most likely be a great annoyance to other operations.

If your question is "How do I catch Ctrl+Shift+- in xterm and act on it?", then I don't know.

All in all: I strongly recommend to just use a stand-alone application launcher, and get used to the shortcut for that.

share|improve this answer
    
Ok. gmrun seems to be available in the default repositories and seems to be quick enough. –  Kimvais Apr 20 '12 at 7:54

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.