Operating System - HP-UX
1830410 Members
2362 Online
110002 Solutions
New Discussion

allocating fixed tty name

 
Juan Chipoco
Contributor

allocating fixed tty name

Thanks for all answers.

maybe I focus the problem wrongly.
My problem is as follow:
I have a HP/UX server with 20 windows 9x workstations running a informix/4GL aplication. Some of the windows boxes have epson's printers. They connect the server via telnet and can print their reports onto any printer. They write in the aplication the terminal where they wants to send printing. So they ask the person who has a printer his ttyxx and print their reports. The problem is that when a user with a printer logout the system reallocate him a new ttyzz and users have to ask him his new ttyzz. I would like to avoid this. Some guy can send me any idea.
Thanks a lot.
Juan Chipoco
4 REPLIES 4
Anu Mathew
Valued Contributor

Re: allocating fixed tty name

Hi,

To save users from asking for the new "tty", why dont you give them a nice little shell script which would show the users the tty details of the logged-in users? They can then choose the tty from your output.

TTY assigned to logins would differ everytime unless they are connected through serial ports/mux/MDP.

HTH,

~AM
Colin Topliss
Esteemed Contributor

Re: allocating fixed tty name

Nope,

Not possible I'm afraid. Do a man on tels - it goes through the process of pty allocation (not something you can change to ensure that a certain user always gets a particular tty).

Sorry!
Patrick Wallek
Honored Contributor

Re: allocating fixed tty name

As said in your previous thread, you can not dedicate a tty port to a user.

You can see what users are on which tty's via the 'who' command.
Jordan Bean
Honored Contributor

Re: allocating fixed tty name


Sounds link something similar to pass-through printing, but you want users to send print jobs to others' terminals...

Why not work with symlinks? Attached is a posix shell script designed to be a wrapper for the 4GL application. When it scarts, it creates a symlink by username to the tty. If it already exists and the target tty is owned by the effective user, it skips. Otherwise it attempts create a new link. Then it invokes the 4GL program. When that's done, it deletes the symlink if it was previously created.

So the users do not need to know the tty, just the standard symlink path, /dev/print/joeuser.