- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- cde,reflection,dtterm,stty erase
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 12:58 AM
01-07-2003 12:58 AM
sh - shell as default. When I start a dtterm
from the taskbar my backspace doesnt work as erase character. How can I fix this? (please, no guessing)
Thanks for helping.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 01:05 AM
01-07-2003 01:05 AM
Re: cde,reflection,dtterm,stty erase
usually this will give you a ?
This usually will occur when an incorrect terminal type is being used. Check your .dtprofile/.profile or any other environment setting file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 01:10 AM
01-07-2003 01:10 AM
Re: cde,reflection,dtterm,stty erase
for ^H you have to press the backspace key or cntl-v and cntl-h keys
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 01:12 AM
01-07-2003 01:12 AM
Re: cde,reflection,dtterm,stty erase
Maybe user does not source his .profile
See .dtprofile or make .Xdefaults in users homedir as read for all and containing the line
*loginShell: true
Then every screen opened works as a login shell and reads all profiles
Steve Steel
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 01:14 AM
01-07-2003 01:14 AM
Re: cde,reflection,dtterm,stty erase
.profile, .dtprofile, .dtprofile : SOURCEPROFILE=TRUE,.login
doesnt work. These files are not read when I start dtterm from taskbar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 01:15 AM
01-07-2003 01:15 AM
Re: cde,reflection,dtterm,stty erase
During login, erase has it's default value as #. This is a standard and described in the termio man page (man 7 termio). Since 10.X, it is possible for the superuser to work around that default value and change those settings by using the /dev/ttyconf device file.
This option is documented towards the end of the stty man page (control char default assignment).
To solve the problem, as the user root execute the following command:
stty erase '^H' < /dev/ttyconf
Try to login again.
Note: The system console is the only device that requires a reboot before this change takes effect.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 01:15 AM
01-07-2003 01:15 AM
Re: cde,reflection,dtterm,stty erase
I'm agree wih Michael, also pls check in Reflection client the "Terminal Keys" configuration inside the "Terminal Setup", the option "VT Backspace Sends" must be "Backspace".
Rgds.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 01:18 AM
01-07-2003 01:18 AM
Re: cde,reflection,dtterm,stty erase
This command should return the following output:
keycode 21 = BackSpace Delete
Run: $ /usr/bin/stty -a
This command should contain the following setting in the output:
erase = ^H
Run: $/usr/bin/X11/xmodmap -e "keycode 111 = BackSpace
This command sets the keysyms (in this case 'BackSpace') to the indicated keycode (in this case 111).
Also note RX has a setting to allow you to remap keys : it needs to be enabled.
Also fyi : dtterms will not execute the contents of your .profile unless you create a $HOME/.Xdefaults file containing :
Dtterm*loginShell:true I'd also advise adding :
*ttyModes: erase ^H intr ^C kill ^U start ^Q stop ^S swtch ^@ susp ^Z
save the file, quit CDE and then try again, if that all checks out/fails : please post contents of your .profile please and/or similar files.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-07-2003 01:26 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-08-2003 05:47 AM
01-08-2003 05:47 AM
Re: cde,reflection,dtterm,stty erase
So I type "stty erase ", then hit the backspace key, then hit return. But I'm lazy. That's too much to type. So I shove this into my .profile.
echo "hit the backspace then hit return."
read BACKSPACE
stty erase $BACKSPACE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-14-2005 06:59 PM
08-14-2005 06:59 PM
Re: cde,reflection,dtterm,stty erase
Surely there is a better way to do backspace key mappings. surely this is basic?
I've noticed that a lot depends on which shell you are running. For example, the root user runs the posix shell, but ordinary users use the korn shell. it seems the posix shell handles backspaces better than the korn shell does. Why is this? Is there a way to fix the korn shell so that it maps the backspace key properly (so I don't have to change the default shell for all our users to posix shell)?
for example, if I use the korn shell and telnet from windows, the backspace key doesn't work. But if I change the shell to posix, then the backspace key works.
If I use putty for ssh, then the backspace key works with either shell though?
What's going on here?
Ta
- Andy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2005 02:19 AM
08-15-2005 02:19 AM
Re: cde,reflection,dtterm,stty erase
ls /usr/lib/terminfo/*
It is quite common for some emulators to default to sending the DEL character when you press the backspace key. Putty, like Hypertermianl, Reflection for HP, QCterm and dozens of termnnal emulators, define what to do with special keys. While you might assume that the backspace key on your terminal or your PC will send the ASCII code 0x08, many emulators default to the Tru64/DEC standard of DEL which is code 0x7f and will sometimes be displayed as ^? via the shell.
While many Unix users assume that all terminals are VT100, this is far from the case and a PC is not a terminal!! A PC can be used as a terminal by running a special program which may or may not be a true vt100 emulation. To understand what a 'real' vt100 looks like, visit: http://vt100.net/
But to answer the question about Reflection/X, WRQ's designers have gone back and forth on the best default for the backspace key for both their Reflection for Unix (was known as Reflection/2) and Reflection/X which has a Reflection/2 emulator built-in. The consensus for the last several years has been to set:
backspace sends DEL
(which makes DEC/Tru64 users very happy). So the issue is not the shell (the shell just follows the current stty definitions), nor is it stty (since some emulators don't even send the backspace character when you press backspace). This is why CTRL-H works but backspace doesn't. Your emulator has remapped the backspace key.
So start by standardizing your emulators to backspace=backspace (sorry if you have DEC/Tru64 users...), then realize that ssh, telnet and Xwindows do not always run the same profile at login. Make sure that you setup your .Xdefaults file to handle Xwindows and sshd config will do the same. Note also that POSIX shells (HP's sh, ksh, bash, etc) all start with /etc/profile but csh, tcsh and other non-POSIX shells have their own profiles (a good reason to limit shell choices for users).
Note also that /etc/profile is run when a normal login takes and includes su - user_name. The problem is that many batch or cron jobs will use something like su - oracle or similar to start with a normal environment. In this case, stty should never be executed or you'll get the cryptic error message "Not a typewriter". So in your /etc/profile, you need to protect all commands that require a tty device. These include:
tset ttytype tput stty tabs
And while you're at it, protect parts of the script that are really only for a normal login, things like /etc/motd and /etc/copyright, traps, mail, news and backup notes. To protect them, use something like this:
if tty -s
then
eval $(ttytype -s)
stty erase "^H" kill "^U" intr "^C" eof "^D" -parity ixoff
cat /etc/motd
cat /etc/copyright
...more interactive items...
fi
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
08-15-2005 10:08 AM
08-15-2005 10:08 AM
Re: cde,reflection,dtterm,stty erase
So why is it that when I use the same terminal program on the PC, to the same user account on the HP-UX server, but using different shells, than my backspace key works with posix shell but not with korn shell? Everything else is the same, including the stty erase setting, Except for the shell, and so that appears to be making the difference.
I really am struggling to fully understand this... :-(
Thanks though.
- Andy