--- Jon Smirl <[EMAIL PROTECTED]> wrote:

> You did that from an xterm, right? Which console device is the xterm
> running on?
> 
> X starts up a process that knows which device it is running and it can
> remember that device since X stays running.
> 
Remember X opens the VC sepratly from it's console, hence it workes even
when run from a serial or ssh terminal.

> Maybe the answer is that this is something for the VC layer since the
> VC layer stays running and knows what device it was started on. An
> escape sequence could query the device from the VC terminal emulator.
> 
> Is there some way to figure this out from the environment? 
> 
> On Sat, 18 Sep 2004 21:57:32 -0400 (EDT), Vladimir Dergachev
> <[EMAIL PROTECTED]> wrote:
> > On Sat, 18 Sep 2004, Jon Smirl wrote:
> > > Isn't there an enviroment variable that tells what device is the
> > > console for the session? How do you tell what serial port you're on
> > > when multiple people are logged in on serial lines?
> > 
> > From any program you can do this:
> > 
> > [EMAIL PROTECTED]:~$ ls -l /proc/self/fd/0
> > lrwx------  1 volodya users 64 Sep 18 21:56 /proc/self/fd/0 ->
> /dev/pts/1
> > 
> > So you get the pointer to the actual device stdin is associated to.
> 
> -- 
> Jon Smirl
> [EMAIL PROTECTED]
> 



                
_______________________________
Do you Yahoo!?
Declare Yourself - Register online to vote today!
http://vote.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
--
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to