LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-04-2007, 09:32 PM   #1
DittoAlex
LQ Newbie
 
Registered: Oct 2003
Posts: 23

Rep: Reputation: 15
Running program from terminal with & does nothing, program stops


Sometimes (it may or may not happen, it goes through phases of cooperation), when I start a program with an ampersand afterwards, to background it, nothing happens. The next time I press the return key, I get a new terminal input and am also told the previous job stopped. I can then fg or bg it and it will draw and run properly.

This does not happen with only one program, it happens with many of them, though they all seem to be X-based. Vlc, openoffice, etc...

Code:
$ vlc file &
[1] 25189
$

[1]+  Stopped                 vlc file
$ fg
vlc file
VLC media player 0.8.6a Janus
My terminal of choice is Yakuake in Gnome, Debian 4.0r1.

Last edited by DittoAlex; 10-04-2007 at 09:34 PM.
 
Old 10-05-2007, 01:35 AM   #2
jlliagre
Moderator
 
Registered: Feb 2004
Location: Outside Paris
Distribution: Solaris 11.4, Oracle Linux, Mint, Debian/WSL
Posts: 9,789

Rep: Reputation: 492Reputation: 492Reputation: 492Reputation: 492Reputation: 492
My guess would be your program is waiting for one of stdin, stdout or stderr (or all of them) to be available.

Try
Code:
vlc file </dev/null >/dev/null 2>&1 &
 
  


Reply



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about running a program from terminal window ganoo Linux - Newbie 7 11-01-2010 12:44 PM
After running my program, it fails and gives my terminal strange characters that I ca RHLinuxGUY Programming 4 08-31-2006 04:24 AM
Running a Program in a new Virtual Terminal Johnsernickle Linux - Software 2 07-09-2004 11:50 AM
Running program when terminal closed? mikeshn Linux - General 9 11-23-2002 08:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 12:02 PM.

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