Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   CentOS Development (http://www.linux-archive.org/centos-development/)
-   -   /dev/pts/?? (http://www.linux-archive.org/centos-development/219953-dev-pts.html)

"Michel Donais" 12-29-2008 11:26 PM

/dev/pts/??
 
In Centos or RHEL terminal devices are created as
/dev/pts/1 .../2* .../3 etc.
On*Some others Unix*they are defines as
dev/tty01 ..../tty02* .../tty03
How do I can get theses*terminals
identites*in Centos when I open a Terminal of any kind?
*

---
Michel Donais
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel

Dag Wieers 12-30-2008 12:18 AM

/dev/pts/??
 
On Mon, 29 Dec 2008, Michel Donais wrote:

> In Centos or RHEL terminal devices are created as /dev/pts/1 .../2 .../3 etc.
> On Some others Unix they are defines as dev/tty01 ..../tty02 .../tty03
> How do I can get theses terminals identites in Centos when I open a Terminal of any kind?

Do you mean this:

[root@lisse root]# tty
/dev/pts/5

tty is used for console terminals
pts is used for 'virtual/pseudo' terminals (like created by ssh or screen)

There are other character terminal devices that are used for specific
purposes, like ttyS for serial ports.

--
-- dag wieers, dag@centos.org, http://dag.wieers.com/ --
[Any errors in spelling, tact or fact are transmission errors]
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel

"Michel Donais" 12-30-2008 12:48 AM

/dev/pts/??
 
Subject: Re: [CentOS-devel] /dev/pts/??
> Do you mean this:
>
> [root@lisse root]# tty
> /dev/pts/5

Yes, when I open a terminal or login in text mode
via Telnet or SSh, the terminals ID is /dev/pts/1
In Sco Openserver it was /dev/tty01

My goal is to use tty's devices when I execute in a terminal
and old SCO text application under Centos using linux_abi
who stcck to identify a tty and getting is definition
thru /etc/inittab and /etc/ttytype

>
> tty is used for console terminals
> pts is used for 'virtual/pseudo' terminals (like created by ssh or screen)
>
> There are other character terminal devices that are used for specific
> purposes, like ttyS for serial ports.
>
I understand these above lines, but want to operate with tty's for this
application

---
Michel Donais

_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel

Dag Wieers 12-30-2008 01:45 AM

/dev/pts/??
 
On Mon, 29 Dec 2008, Michel Donais wrote:

> Subject: Re: [CentOS-devel] /dev/pts/??
>
>> tty is used for console terminals
>> pts is used for 'virtual/pseudo' terminals (like created by ssh or screen)
>>
>> There are other character terminal devices that are used for specific
>> purposes, like ttyS for serial ports.
>
> I understand these above lines, but want to operate with tty's for this
> application

A pts device is also a tty. I have troubles understanding what you want to
achieve (and to be frank, none of your mails are explaining), but if the
problem is that your application is SCO-centric and cannot work with pts
devices, then you'll have to find the source code or ask your vendor.

(Or simply log on to the console instead of using SSH ?)

The way the tty command finds its tty is by following the
/proc/self/fd/0 symlink.

[root@moria root]# ls -l /proc/self/fd/0
lrwx------ 1 root root 64 Dec 30 03:40 /proc/self/fd/0 -> /dev/pts/3

Not sure what your application is doing to, try stracing it to find out.

--
-- dag wieers, dag@centos.org, http://dag.wieers.com/ --
[Any errors in spelling, tact or fact are transmission errors]
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel

"Michel Donais" 12-30-2008 03:06 AM

/dev/pts/??
 
> A pts device is also a tty. I have troubles understanding what you want to
> achieve (and to be frank, none of your mails are explaining), but if the
> problem is that your application is SCO-centric and cannot work with pts
> devices, then you'll have to find the source code or ask your vendor.

You've got it; the application is SCO-centric
The application need to find a /dev/tty01 or more but can't work with
dev/pts/1.

The developper is no more active and I don't have the sources.
One of my last resource is to find a way to start a terminal and have Centos
allowing me to start the application on a terminal as tty instead of a
pseudo-terminal.
The other way is to re-install an SCO Server wich is not a small task for
the time we have to recover some archived data.

> (Or simply log on to the console instead of using SSH ?)
This haven't been tried, and I will to morrow; but our best will be to use
it a text terminal.

> Not sure what your application is doing to, try stracing it to find out.
There is no possibility to trace at start-up.

---
Michel Donais

_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel

Dag Wieers 12-30-2008 03:27 AM

/dev/pts/??
 
On Mon, 29 Dec 2008, Michel Donais wrote:

>> A pts device is also a tty. I have troubles understanding what you want to
>> achieve (and to be frank, none of your mails are explaining), but if the
>> problem is that your application is SCO-centric and cannot work with pts
>> devices, then you'll have to find the source code or ask your vendor.
>
> You've got it; the application is SCO-centric
> The application need to find a /dev/tty01 or more but can't work with
> dev/pts/1.

If you run the application as root, you could create a device node that is
identical to the real device as /dev/tty01 (since Linux uses /dev/tty1
they will not clash).

This can only work if you understand how the application is constructing
/dev/tty01 (I am sure this is not hardcoded, because that would not even
work on SCO).


> The developper is no more active and I don't have the sources.
> One of my last resource is to find a way to start a terminal and have Centos
> allowing me to start the application on a terminal as tty instead of a
> pseudo-terminal.

Even on SCO the application needs to figure out its own tty. So there
should be a way to influence its decision. I don't even understand why it
would go with /dev/tty01 over an SSH connection, unless it is hardcoded as
a silly fallback default if all other measures have failed.

Finding what these other measures are, may be the source of a solution ?


>> (Or simply log on to the console instead of using SSH ?)
> This haven't been tried, and I will to morrow; but our best will be to use
> it a text terminal.

You can also tru using 'conspy' to take over the real /dev/tty1 from an
SSH or screen session and then start the SCO application. However if the
SCO application expects /dev/tty01 then that would fail similarly.

Creating a device node identical to the current tty is probably the best
way forward if it really is /dev/tty01. You can do this simply by doing:

cp -aLv /proc/self/fd/0 /dev/tty01

or maybe a symlink would work as well:

cp -av /proc/self/fd/0 /dev/tty01

The advantage if a symlink is simply that you have a visual confirmation
to what tty it is linking without having to decipher the major and minor
device numbers.


>> Not sure what your application is doing to, try stracing it to find out.
> There is no possibility to trace at start-up.

Man, aren't you glad that your SCO days are (almost?) (finally?) over ? ;-)

--
-- dag wieers, dag@centos.org, http://dag.wieers.com/ --
[Any errors in spelling, tact or fact are transmission errors]
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel

Hugo van der Kooij 12-30-2008 08:13 PM

/dev/pts/??
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michel Donais wrote:
>> A pts device is also a tty. I have troubles understanding what you want to
>> achieve (and to be frank, none of your mails are explaining), but if the
>> problem is that your application is SCO-centric and cannot work with pts
>> devices, then you'll have to find the source code or ask your vendor.
>
> You've got it; the application is SCO-centric

Didn't you burn them all just like you did burn all your gif files?

Hugo.

- --
hvdkooij@vanderkooij.org http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc

A: Yes.
>Q: Are you sure?
>>A: Because it reverses the logical flow of conversation.
>>>Q: Why is top posting frowned upon?

Bored? Click on http://spamornot.org/ and rate those images.

Nid wyf yn y swyddfa ar hyn o bryd. Anfonwch unrhyw waith i'w gyfieithu.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAklaju4ACgkQBvzDRVjxmYHIxACaAmbwgzrfoX 6yVwOuP+9iQSl6
bvIAn2vXCyxJCpbO1By2lgratFBewLDA
=WhiC
-----END PGP SIGNATURE-----
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel

Hugo van der Kooij 12-30-2008 08:24 PM

/dev/pts/??
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Michel Donais wrote:
> In Centos or RHEL terminal devices are created as /dev/pts/1 .../2
> .../3 etc.
> On Some others Unix they are defines as dev/tty01 ..../tty02 .../tty03
> How do I can get theses terminals identites in Centos when I open a
> Terminal of any kind?

Try to read this:
http://en.wikipedia.org/wiki/Pseudo_terminal
http://en.wikipedia.org/wiki/Tty_(Unix)

You could try to write a wrapper that can create the dummy link to
please that patent infested historic application. (SCOrne intended.)

But I guess the application is quite old as pseudo terminals are around
for a long time.

Hugo.

- --
hvdkooij@vanderkooij.org http://hugo.vanderkooij.org/
PGP/GPG? Use: http://hugo.vanderkooij.org/0x58F19981.asc

A: Yes.
>Q: Are you sure?
>>A: Because it reverses the logical flow of conversation.
>>>Q: Why is top posting frowned upon?

Bored? Click on http://spamornot.org/ and rate those images.

Nid wyf yn y swyddfa ar hyn o bryd. Anfonwch unrhyw waith i'w gyfieithu.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAklakXkACgkQBvzDRVjxmYGtYQCfRFr4gRpmiR QrAMO6Tag99qSJ
QfoAoIEIdRsGP0jEql9iEQUTAYvR9QyR
=9uTq
-----END PGP SIGNATURE-----
_______________________________________________
CentOS-devel mailing list
CentOS-devel@centos.org
http://lists.centos.org/mailman/listinfo/centos-devel


All times are GMT. The time now is 07:10 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.