What does this TTY info mean?


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers What does this TTY info mean?
# 1  
Old 04-17-2009
What does this TTY info mean?

When I do a who command I get the following:

Code:
mohit    :0           2009-04-07 14:07
mohit    pts/0        2009-04-07 17:25 (:0.0)
mohit    pts/1        2009-04-09 12:07 (:0.0)
mohit    pts/2        2009-04-16 11:38 (:0.0)
mohit    pts/3        2009-04-16 16:09 (:0.0)
mohit    pts/4        2009-04-16 18:05 (:0.0)

I only have four TERMINAL sessions open: 0, 2,3,4.

So what does does pts/1 refer to and what is the :0 referring to?

Last edited by Yogesh Sawant; 04-20-2009 at 04:33 AM.. Reason: added code tags
# 2  
Old 04-18-2009
Probably you have an X-server running and there are some processes you are not aware of.

The ":0.0" is a way in X-Windows to specify where output of a program (a "X-client") should go. This is what the $DISPLAY-variable is for.

The generic form is

DISPLAY=<hostname>:<display-number>.<screen-number>

<hostname> is a normal hostname, specifying the hostname (or directly the IP-adress) of the host which should receive the output to display it.

<display> is the number of the display on this host. A display is one (or more, see below) screen(s), a mouse and a keyboard. In most cases this is 0 because hosts (like PCs) tend to have only one display, but back then hosts were big systems and had several displays attached to them so that many users could work simultaneously. For these hosts there had to be a way to specify which display was to be adressed.

<screen> is the number of the screen. If you are sitting in front of a PC with only one monitor this is always 0, but suppose you would have several monitors. In this case you would still have one "display", but this display would consist of several "screens". (If you are using one of these graphic cards which can use several monitors you might still have one screen which spans several monitors, but this is just a workaround for Windoze systems which couldn't adress several screens originally.) You number these screens (again starting at 0) and can so decide where the output should go. For instance, if you have 3 monitors "localhost:0.0" would adress your left monitor, "localhost:0.1" would adress the middle one and "localhost:0.2" the right one.

You can find further information about X-Windows at the X-Free86 website (X-Free86 project).

Find the manual page describing the above here: X(7) manual page

I hope this helps.

bakunin
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Python: Redirecting to tty and reading from tty

In bash, you can do something like this: #!/bin/bash echo -n "What is your name? " > /dev/tty read thename < /dev/tty How can I do the same in python? I have a python script that has the following content: #!/usr/bin/python2.7 import getpass import sys import telnetlib import... (2 Replies)
Discussion started by: SkySmart
2 Replies

2. UNIX for Advanced & Expert Users

tty changes?

I am not sure if I am using the correct terminology but somehow my tty keeps changing on me. The man pages are confusing to me on what exactly the tty is. This is what I see when I run the tty command. Could anyone explain why my tty keeps changing? ~ $ tty /dev/pts/1 ~ $ tty /dev/pts/0 (6 Replies)
Discussion started by: cokedude
6 Replies

3. Solaris

tty hack

hi all, what i want to do when user open terminal like tty5 and do his work i want to see his terminal how can i do this (1 Reply)
Discussion started by: xxmasrawy
1 Replies

4. Linux

Killing the tty

It's happened multiple times and I can't figure out why it's happening or how to undo it, but hitting CTRL-S seems to disable the given TTY on 'nixes of various flavors. Killing the pid doesn't bring the tty back, I end up having to use other tty's until I reboot. Anyone got some information for... (2 Replies)
Discussion started by: thmnetwork
2 Replies

5. UNIX for Dummies Questions & Answers

TTY Insane

Hi All, Long time reader, first time poster. I have a tip session to a v480 serial console running Solaris 9. Look at this mess I'm getting back... connected... (16 Replies)
Discussion started by: danny.hudson
16 Replies

6. AIX

Tty Over Run

dears i have two IBM p630 application servers, they are running hacmp 5.2 as the clustering software. from the output of errpt on one of the nodes i am receiving the following error: 9D30B78E 0530020007 T S tty1 RECEIVER OVER-RUN ON INPUT please are there any ideas about how... (0 Replies)
Discussion started by: TheEngineer
0 Replies

7. AIX

tty

Hi All can anyone tell me what is the meaning of tty,or give me an example of this? (1 Reply)
Discussion started by: magasem
1 Replies

8. UNIX for Dummies Questions & Answers

tty remote IP

I am fairly new to Unix Terminal outputs and I have a server that is sending print jobs to a PortServer 8 RJ45 situated in a remote location. It is working fine however we need to change the Subnet of that location and I am unable to find where the IP associated with the terminal is located. ... (4 Replies)
Discussion started by: martin_Montreal
4 Replies

9. Programming

TTY programming

Hi gurus, Need help to code some tools dealing with all the tty thingies, raw mode etc .... Can you juss point me to some cool links related to tty programming, i've tried google but found none so far :confused: Thanks all. (2 Replies)
Discussion started by: andryk
2 Replies

10. Shell Programming and Scripting

kill the tty

Hello Experts i'm having some trouble with a script. the purpose is to kill all processes from a distinct tty in a HP-UX machine, given the User TTY. it's to use like this: killtty pts/tnb pts/tr pts/tD here it is #!/usr/bin/ksh i=1 for i do || exit kill -9 `ps -ft "${i}" |... (9 Replies)
Discussion started by: vascobrito
9 Replies
Login or Register to Ask a Question