Share your knowledge at the LQ Wiki.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 06-06-2010, 04:37 PM   #1
Registered: Nov 2004
Distribution: Debian Testing+Sid
Posts: 712
Blog Entries: 1

Rep: Reputation: 33
Post detaching a (graphical)process invoked without "&" from terminal

If I run a graphical(or any process) process like music player "exaile" from terminal ,Is there a way without using "nohup" or "screen"(terminal multiplexer) to detach "exaile " from the terminal when ran without appending "&" on to exaile(like "exaile &").
If I press CTRL-Z to stop ,some programs errs out , "watch dog time out" and "aborts" the process.

The problem is bg,disown or jobs etc does not list the process if I ran from another terminal.

I want to know ways by Which I can detach a graphical/non-graphical process from a terminal as well as to re-attach to the terminal.


Last edited by deepclutch; 06-06-2010 at 05:04 PM.
Old 06-06-2010, 06:51 PM   #2
LQ Guru
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
1. Remember to start with "&" (or, better, "nohup XYZ &")
... or ...
2. <Ctl-Z>, bg
Old 06-07-2010, 10:20 AM   #3
Registered: Nov 2004
Distribution: Debian Testing+Sid
Posts: 712
Blog Entries: 1

Original Poster
Rep: Reputation: 33
I knew of CTRL-Z(Stop) and "do bg 1" .
[1]+  Stopped                 gxine
prakash@dcbox:~$ bg 1 
[1]+ gxine &
(gxine:3464): Gdk-WARNING **: gdk_window_set_user_time called on non-toplevel

^^^^ and it works also.then,I can "exit".

Another solution to exit terminal after having the process moved to background ,is to type :
disown -h & exit
now,the process id(pid) of gxine is not "1"(as expected);but it has changed -for eg,here gxine has pid of "3796"
As regarding catching program running on background to another terminal ,I tried "fg 1" ,but which tells "bash: fg: 1: no such job" or pid of gxine(My example) :
"bash: fg: 3796: no such job" ,but the process is not attched to the newly invoked terminal.Any use of "disown -h" while doing "bg 1" ?How Will it be possible to attach the process to current terminal?

Thanks For the Replies


bg, detach, fg, jobs

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
ns:"error when calling class OldSim"&tclsh:"invalid command+child process exits abn." shojaru Linux - Newbie 0 03-05-2009 05:23 AM
glibc 2.9 "make check" fails on rt/tst-cputimer with "timer sig[12] invoked to soon" shachter Linux - Software 2 02-14-2009 02:24 PM
"Graphical Terminal-Session" from Windows to Linux mwildam Linux - Desktop 14 09-19-2006 06:23 PM
"kdesu" daemon gives error message & all terminal emulators hang hari_seldon99 Mandriva 0 07-28-2004 05:30 AM
"kdesu" daemon gives contradictory error message & all terminal emulators hang hari_seldon99 Linux - General 0 07-24-2004 04:42 PM

All times are GMT -5. The time now is 03:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration