You are not logged in.

#1 2009-04-29 19:07:44

whoops
Member
Registered: 2009-03-19
Posts: 844

[SOLVED]Start application from (x)terminal without blocking it?

Hi!

How can I start an (x/gtk) - application from a terminal without it being "blocked" while the application runs (p.e. to run a file manager as another user while being able to still use the terminal I'm logged inton as that user)?

(Also things like this are very hard to find, if you don't already know what you're searching for - at least for me. Is there a wiki article about some "common general stuff" like that or would it make sense to start one? )


Thanks!

Last edited by whoops (2009-04-29 19:21:36)

Offline

#2 2009-04-29 19:12:08

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: [SOLVED]Start application from (x)terminal without blocking it?

app &>/dev/null &

Offline

#3 2009-04-29 19:13:41

rson451
Member
From: Annapolis, MD USA
Registered: 2007-04-15
Posts: 1,233
Website

Re: [SOLVED]Start application from (x)terminal without blocking it?

$ appname &

$ appname
<ctrl-z>
$ bg

$ nohup appname & <-- allows you to kill the terminal without losing the app.

$ appname &
$ disown <-- also allows you to kill the terminal without losing the app.

These are the few I've used in the past.  It's quite possible that these don't work with all shells.


archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson

Offline

#4 2009-04-29 19:14:31

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: [SOLVED]Start application from (x)terminal without blocking it?

If i understand you correctly, you want to "background" the job... To do that, you start it with an ampersand (&) behind it's name, like so

pcmanfm &

if you forgot to do that, you can always press CTRL-z to put the job on hold and then issue "bg" to put it in the background. Use the "jobs" command to view all currently running jobs.
The jobs will die when you close the terminal. If you don't want that, have a look at gnu screen

Also google "bash job control". That should get you up to speed

EDIT: thanks for the nohup and disown things smile Didn't know those yet

Last edited by klixon (2009-04-29 19:16:21)


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

#5 2009-04-29 19:22:57

whoops
Member
Registered: 2009-03-19
Posts: 844

Re: [SOLVED]Start application from (x)terminal without blocking it?

Jupp, that does it, thx!

Offline

Board footer

Powered by FluxBB