LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2008, 05:42 PM   #1
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Rep: Reputation: 30
Little confused on virtual and pseudo terminals, how to open and use, etc.


I'm not certain, but after reading 873 volumes of information about both of these I think I'd want to use one of these if I want my webserver to launch a program that keeps running (especially if that program needs to use oh, say, a sound device).

Is this correct? If not, I'll take any input on either:

1) what these terminal types are for anyway, cause they seem useful

2) how I DO go about launching a program from php, for example (could be python, whatever--it's the linux part of it that I'm unclear about. The php script for example doesn't want to terminate until the program it has launched terminates. I need for php to launch it and be done, move on to other things--meanwhile the launched program keeps going).

Any help is appreciated.

Gutsy Server, btw, running LAMP.
 
Old 04-30-2008, 06:23 PM   #2
jailbait
LQ Guru
 
Registered: Feb 2003
Location: Blue Ridge Mountain
Distribution: Debian Jessie, Linux Mint 17
Posts: 7,750

Rep: Reputation: 271Reputation: 271Reputation: 271
Quote:
Originally Posted by lumix View Post
I'm not certain, but after reading 873 volumes of information about both of these I think I'd want to use one of these if I want my webserver to launch a program that keeps running (especially if that program needs to use oh, say, a sound device).

Is this correct? If not, I'll take any input on either:

1) what these terminal types are for anyway, cause they seem useful

2) how I DO go about launching a program from php, for example (could be python, whatever--it's the linux part of it that I'm unclear about. The php script for example doesn't want to terminate until the program it has launched terminates. I need for php to launch it and be done, move on to other things--meanwhile the launched program keeps going).

Any help is appreciated.

Gutsy Server, btw, running LAMP.
If you go into any public library you will find a row of terminals with chairs in front of each terminal. A user can sit down at any unused terminal and log into the library's computer network to use the Internet, browse the catalog, or whatever. Virtual terminals simulate the line of independent terminals on a single terminal. You can bounce from virtual terminal to virtual terminal and it is the same as moving from seat to seat among the library's terminals.

A pseudo terminal is a convenience to a programmer. A pseudo terminal is a virtual device which simulates a physical terminal. A programmer can read and write to a pseudo terminal without having to know the real physical specifications of the actual physical terminal that the program is ultimately dealing with. You only have to worry about pseudo terminals if you are programming at a fairly low level.

As to your php problem have your php program launch its subprogram in the background.

-------------------
Steve Stites

Last edited by jailbait; 04-30-2008 at 06:25 PM.
 
Old 04-30-2008, 06:53 PM   #3
lumix
Member
 
Registered: Mar 2007
Distribution: Hardy (Gnome on Ubuntu 8.04) on Compaq N600c laptop
Posts: 323

Original Poster
Rep: Reputation: 30
Thanks for the response. How do I run the program in the background? I've tried:

1) <?php system("mplayer myfile.mp3") ?>

2) <?php system("nohup mplayer myfile.mp3 &") ?>

etc., and it seems to execute, but without a terminal, no sound, etc. Mplayer seems to want a terminal, that's why I'm wondering if I should be using some kind of simulated terminal session to execute it.
 
  


Reply


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
find the total number of pseudo terminals of all logins RajRed Linux - General 5 04-18-2006 05:30 AM
How to add pseudo-terminals to /dev directory (Mandrake 10.1 & udev) blubery Mandriva 1 08-06-2005 01:46 PM
Regarding Pseudo tty, Pseudo terminals ? mqureshi Programming 0 07-30-2005 11:51 AM
How can I make a fax/virtual/pseudo printer? spindles Linux - Newbie 0 06-05-2005 02:19 PM
managing pseudo terminals in an ssh session kirkhamster1 Linux - Newbie 1 10-08-2003 01:26 AM


All times are GMT -5. The time now is 03:13 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration