1836455 Members
2578 Online
110101 Solutions
New Discussion

remsh & tset -sQ

 
SOLVED
Go to solution
Peter Lachnitt
Advisor

remsh & tset -sQ

Hi all,

I have a problem with the command tset
On AIX & Solaris it is workig, but on HPUX
the tset produce the Errormessage "Not a terminal" with remsh.

remsh hpxxxxx 'eval `tset -sQ vt100` '
Not a terminal

How could I solve this problem ?

Thank you very much.


Peter Lachnitt
3 REPLIES 3
Yang Qin_1
Honored Contributor

Re: remsh & tset -sQ

try
remsh hpxxxxx "eval ` tset -s -Q -I -m ':vt220' `"

Yang
spex
Honored Contributor
Solution

Re: remsh & tset -sQ

Hi Peter,

The output you are receiving is correct: there is no terminal associated with the command. To prove this to yourself, open a shell on the server and then do 'remsh hpxxxxx sleep 60' from your remote system. While the remsh command is running, from the shell, issue 'ps -ef | grep sleep 60'. You will see a '?' in the TTY column.

The solution is to run 'eval `tset...`' from /etc/profile or ~user/.profile so that it is executed upon login.

PCS
Bill Hassell
Honored Contributor

Re: remsh & tset -sQ

As mentioned, this is very normal because your remsh is logging in, probably because you are doing something like su - oracle or some other user. Most .profile files need to be rewritten for batch mode, that is, where there is no controlling tty device such as remsh or cron. So you locate all the interactive terminal commands in /etc/profile and .profile:

tabs tset ttytype tput stty clear

(not a complete list) and protect these commands like this:

if tty -s
then

fi

Now when you login, if the connection is not-interactive, the command(s) will be bypassed.


Bill Hassell, sysadmin