4
3
I would search for this, but I have no idea how to phrase it for the search engine..
Basically, when I start a gui program from a terminal window, that terminal cannot be further used until I quit the program. I've just started using dwm, and I don't want to have useless terminals littered around after starting up a few graphical programs.. Is there any way around this?
1In general, if you run a GUI app from a shell in the background, closing the shell does not close the app. – CarlF – 2011-04-04T14:02:06.583
@CarlF I don't know how your system is set up, but I'm using bash on gnome-terminal. If I run "emacs &" then close the console, emacs exits. – EMPraptor – 2011-04-04T18:06:44.737
1@EMPraptor, I just tested and whether I use xterm or GNOME Terminal (and bash as the shell), I can start programs (e.g. gedit, oowriter, firefox) and close the parent terminal without closing the GUI app. Ubuntu Lucid Lynx, both with default GNOME session and icwem. I don't have emacs installed to test. – CarlF – 2011-04-05T01:52:37.920
@CarF Close the terminal not through shell (e.g. "exit" or Ctrl-D) but close the window hosting the terminal with the method of window manager of your choice. For example, the "X" close window button on Gnome/KDE or "alt-shift-C" on dwm. Your shell will not detach the child process and the GUI application you started via "gedit &" method will close. – EMPraptor – 2011-04-05T04:11:51.733
@CarlF Thanks for pointing out that background processes don't stop when you exit through bash. I never tried exiting the terminal through bash in testing for this question. I edited my answer to reflect this. – EMPraptor – 2011-04-05T04:39:37.773