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.

If I use Gedit or Subl (sublime text) commands in the terminal to open a file, I can't do anything else in the terminal until I close the text editor. How can I fix this?

share|improve this question
add comment

4 Answers

up vote 10 down vote accepted

Opening gedit in background should allow you to use the terminal

gedit &

Hope you know this .

share|improve this answer
    
In that case & is unnecessary isn't it? –  seriousdev Aug 23 '12 at 14:45
1  
@seriousdev to make it run in background you need & –  devav2 Aug 23 '12 at 15:01
    
Well I thought you were implying that the user opens gedit first, my bad. –  seriousdev Aug 23 '12 at 15:03
    
One issue... after issuing the command with &, it opens the text editor in the background. Then, I save the text and close the editor. Now if I enter another command in the same window, it will show something like this at the end : [1]+ Done subl a.txt –  EApubs Aug 23 '12 at 16:59
    
Once a process is completed it will just throw a message on terminal saying Done –  devav2 Aug 24 '12 at 17:16
add comment

Use setsid, which runs a program in a new session; for example:

setsid gedit

Also you can close terminal and gedit will stay running.

share|improve this answer
add comment

If you've started the editor already, you can send it to the background as if you had started it via

gedit &

in the first place:

Return to the blocked terminal, and press CTRL - Z. Notice that the terminal is now usable, but the program is now suspended.

Enter bg on that terminal to make it run again, and enjoy the unblocked terminal.

share|improve this answer
add comment

Just adding different kind of approach:

You could also use a terminal that supports multiples tabs at once. Here are some examples: Gnome Terminal (the one that comes preinstalled on Ubuntu), Guake, Terminator, Tilda etc

Shortcut: CTRL + Shift + T = almost always the create new tab shortcut

share|improve this answer
add comment

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.