Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Possible Duplicate:
How to clean launch a GUI app via the Terminal (so it doesn't wait for termination)?

If I have a terminal open in X-window, I can start a GUI app from the terminal. If I give Ctrl+C, the GUI app closes and you get back the prompter in the terminal so you can write commands again.

For example: If I run gedit, it starts but it doesn't return control to that console so I cannot reuse it for other commands, If I want to regain control I need to do Ctrl+C, but that closes the GUI app. I need the GUI app to keep running but also to use further the console to start other apps or run other commands.

How to start a X-window app from terminal console, without leaving that console occupied solely by that app?

share|improve this question
add comment

marked as duplicate by Takkat, hexafraction, Stephen Myall, devav2, Jorge Castro Oct 8 '12 at 15:10

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2 Answers

up vote 15 down vote accepted

Simply add & to your call to start it as background process.

Example:

gedit sometext.txt &
share|improve this answer
1  
That is the answer, so simple yet is the stuff I needed. +1/accept –  Eduard Florinescu Oct 8 '12 at 11:16
1  
cool, this one I didn't know :) –  Evandro Silva Oct 8 '12 at 11:16
    
What is really cool about it, is that if you run the first gedit in background & the subsequent gedit can be ran without the & if gedit is still open. –  Eduard Florinescu Oct 8 '12 at 11:51
1  
If you forgot to add the &, no problem. Just press Ctrl+z which will pause the program. Then enter bg which will let it continue in the background. –  AmanicA Oct 16 '12 at 23:42
add comment

I advise you to use gksudo if that app needs administrative access with the &

gksudo gedit sometext.txt &
share|improve this answer
    
thanks, good to know (+1) –  Eduard Florinescu Oct 8 '12 at 11:17
add comment

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