We help IT Professionals succeed at work.

tty, how to set or change

waipahu
waipahu asked
on
5,451 Views
Last Modified: 2013-12-06
tty command
How do you set tty or change a tty?
Comment
Watch Question

CERTIFIED EXPERT
Top Expert 2007

Commented:
Please expand on your question.

Do you mean setting the tty characteristics? If so, use stty.
Do you mean the actual tty device?  If so, then you can't change it.

Author

Commented:
We are two different environments.
Example: TEST and DEV

in TEST when I type tty the following displays:
/dev/pts/tF

in DEV when I type ttyp the following displays:
/dev/pts/tc

How do I change the DEV tty to tF from tc?

Thanks
CERTIFIED EXPERT
Top Expert 2007

Commented:
Pseudo devices (/dev/pts) are assigned on a first come first served basis.  They will potentially be different everytime you login depending on who else has logged in previously.

Author

Commented:
I think I'm asking the wrong question. You are correct, it can change everytime I log on.
My keyboard mapping is screwed up on the the new environment.  All the keys work accept
the backtab key.  It displays the ~ character.
Do you think my environment or profile setting is set wrong?

What steps do I need to take to fix this problem.  My terminal emulation software is the same and the keyboard mapping is the same.

CERTIFIED EXPERT
Top Expert 2007

Commented:
Check the contents of your .profile.  They probably differ between your test and dev environments.
CERTIFIED EXPERT
Top Expert 2007

Commented:
Hi,

Please check the value of the TERM env. variable in both environments. You probably will see that they are different.

If this is the case, then in your login initiation files (e.g. .profile) you may  add a check for the TERM type and then use stty to set the right characteristics for you.

For example, in .profile:

case $TERM in
vt100)
stty ...... ;;
vt220)
stty .... ;;

esac

Please note that you need to put the right stty command in place of stty .....

Also, not the ;; and esac which are required.

Commented:

Can you confirm that the command:

tset -s

returns the same result in TEST and DEV ?

does the TERM value returned match 'echo $TERM' in both environments ?

have you compared the result of the command 'stty -a'  in both environments ?

if you could post the outputs to the above that would be very helpful if you require any further direction.


Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Hanno P.S.IT Consultant and Infrastructure Architect
CERTIFIED EXPERT

Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I will leave the following recommendation for this question in the Cleanup Zone:
Accept JJSmith's comment as answer.

Any objections should be posted here in the next 4 days. After that time, the question will be closed.
JustUNIX, Experts Exchange Cleanup Volunteer
Forced accept.

Computer101
EE Admin

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.