Run command on another(new) terminal window

This might be what you search:

gnome-terminal -e "bash -c \"!!; exec bash\""

or (shortly):

gnome-terminal -x sh -c "!!; bash"

It opens gnome-terminal with your last command (!!) executed and it stays open with the command output in the shell, even with an interactive command like top or less...

In your case its:

gnome-terminal -e "bash -c \"apropos editor; exec bash\""

or

gnome-terminal -x sh -c "apropos editor; bash"

Start another instance of whatever terminal is it you want to run:

xterm -hold -e 'apropos editor' & 

Note the -hold. Most terminals will exit after running the command you feed them. There are already a dozen or so questions about this on the site:

  • How can I make a script that opens terminal windows and executes commands in them?
  • How to run a script without closing the terminal?

An alternative to that is to use an application which needs to be exited. nano will stay open on its own. If you're just outputting to screen, you could pipe it into less:

xterm -e 'apropos editor | less' & 

That said, in your case (as the other two have said) it does seem easier that you just open another terminal and run your command.


Each terminal is even a program that you can launch as any other program, with & to put in background, giving a list of arguments and so on.

Which terminal to use it depends first from the availability of the system that you are using (if they are installed or not), after from their peculiarity and then from your personal taste.

  konsole   --hold -e "ls" &  
  xterm      -hold -e "ls" &  
  gnome-terminal   -e "ls" & ...  

Note the differences between -hold of xterm and --hold of konsole.

Each realization has different options that you have to check with the help. Even the help can be invoked in different way. You can find that man konsole doesn't function and so you have to ask directly to the executable with --help.

This is a list of terminal you can search on your system

aterm          - AfterStep terminal with transparency support
gnome-terminal - default terminal for GNOME
guake          - A dropdown terminal for GNOME
konsole        - default terminal for KDE
Kuake          - a dropdown terminal for KDE
mrxvt          - Multi-tabbed rxvt clone
rxvt           - for the X Window System (and, in the form of a Cygwin port, 
                 for Windows) 
rxvt-unicode   - rxvt clone with unicode support
xfce4-terminal - default terminal for Xfce desktop 
                 environment with dropdown support
Terminator     - is a GPL terminal emulator. It is available on
                 Microsoft Windows, Mac OS X, Linux and other Unix X11 systems.
Terminology    - enhanced terminal supportive of multimedia 
                 and text manipulation for X11 and Linux framebuffer
tilda          - A drop down terminal
wterm          - It is a fork of rxvt, designed to be lightweight, but still
                 full of features
xterm          - default terminal for the X Window System
Yakuake        - (Yet Another Kuake), a dropdown terminal for KDE