Opening VLC with the terminal line so the terminal will go back to normal
I've been pottering around the command line for some time, so I have some knowledge of it but I'm still a newbie.
The 'problem' is that I want to experiment with opening a movie in VLC using the command line. I typed in vlc and there it was, so I selected my movie like this: Code:
vlc movies/legally \obtained \movie/movie.avi I've seem this with many other programs and this guy says that it's possible to make the prompt return by annexing it with &. But when I do that nothing changes! I was once programming in MatLab on my Linux computer, and it had to be opened through with the terminal and if I closed the terminal MatLab would close as well! I can't believe that you have to have two open terminals if you want to use MatLab and VLC (from the command line) at the same time! |
So you used the command $vlc movies/legally \obtained \movie/movie.avi & ? Try hitting enter in the terminal after VLC starts, if the first line of output after you run that is something like "[1] 29803" then the process has been backgrounded and hitting enter should produce a fresh prompt. Any output VLC produces will go into that terminal though, possibly obscuring the prompt again.
Most desktop's have a Run dialog you can popup, it's usually Alt+F2 but could be something else. That way you don't need a terminal open at all, but tab completion may or may not function. Another option would be to use screen, if you close your GUI terminal window, screen will detach your CLI session, itself running in the background, and any gui apps you've started from the CLI will keep runing. In the completely unscientific test I just ran, you can background a process from inside screen, exit the terminal(inside screen) which you started the process from (not just detach the screen), and the process will keep running. Doing the same from a regular terminal without screen kills the backgrounded process. I don't understand what the difference is though so hopefully someone can enlighten us. |
Quote:
How ever I didn't get any process ID. Ok, it's late and I'm a little daft. I looked for a PID when I was terminating the program. Yeah, I did get the PID [1] 7742. :) Quote:
I couldn't really understand that last part you said :tisk: it's not nice to talk about such complicated things to a noob |
You're correct, it is always nice to have options.
screen is like a window manager, but for terminals. Quote:
some Screen howtos: http://jmcpherson.org/screen.html http://khaoohs.wordpress.com/2006/08...nd-quickstart/ http://www.linuxdynasty.org/screen-howto-part-1.html http://www.linuxdynasty.org/screen-howto-part-2.html edit: what I confused you with before, I was saying that if you use an ampersand to background a process, from inside screen, even after you exit screen (this would be just like quiting your Xterm) the backgrounded process keeps running, unlike exiting a non-screen'd terminal you've backgrounded a process from (which causes the backgrounded process to also quit for some reason I cannot fathom). here's hoping this didn't just exacerbate the confusion. The howtos should help make screen's function clearer, then if you like you can try backgrounding a program from inside screen and then exiting screen to see the result. |
All times are GMT -5. The time now is 08:31 PM. |