Visit Our UNIX and Linux User Community

KSH Terminal Settings

Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers KSH Terminal Settings
# 1  
Old 02-17-2006
KSH Terminal Settings

I've been doing a lot of searching through the forums to figure out how to:

1 - get my Backspace key to work in my ksh telnet session
2 - get the PWD to show up as the prompt

Solution to 1 - stty erase ^H
Solution to 2 - export PS1="$PWD>"

Or so I thought...type those commands on the command line only apply the settings for the current session, it seems. I've been reading about putting these lines in the .profile, but I don't know where that file can I locate and edit it?

Also, #2 is kinda weird...once I tried it and it worked fine (for the current session), then I tried it again and it would display the PWD that I was in when I ran that command, even if I moved to another directory.

Any help appreciated.
# 2  
Old 02-17-2006
.profile would be available in home directory

to retrieve your home directory get the entry from /etc/passwd file against your login id

then add the two solutions you had found out
run your .profile to effect for the current session by

. $HOME/.profile
. ~/.profile

for subsequent sessions it would be automatically effected
# 3  
Old 02-17-2006
OK, in this statement from passwd:


the u01/app/stg is my home directory, correct? There is no .profile in that directory.

Last edited by Perderabo; 02-17-2006 at 04:39 PM.. Reason: disable smilies for readability
# 4  
Old 02-17-2006
Then just make a .profile file.
# 5  
Old 02-17-2006
Oh...duh. OK, I did that...

Now, the backspace key is working : )
But the prompt is still showing my home directory regardless of where I cd to...
# 6  
Old 02-17-2006
Use single quotes:

export PS1='$PWD>'
# 7  
Old 02-17-2006
Smilie - Many thanks!!!

Previous Thread | Next Thread
Test Your Knowledge in Computers #996
Difficulty: Medium
Major Unix vendors, including Sun Microsystems, HP, IBM, and SGI, have been selling virtualized hardware since before 1990.
True or False?

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Print Terminal Output Exactly how it Appears in the Terminal to a New Text File

Hello All, I have a text file containing output from a command that contains lots of escape/control characters that when viewed using vi or view, looks like jibberish. But when viewed using the cat command the output is formatted properly. Is there any way to take the output from the cat... (7 Replies)
Discussion started by: mrm5102
7 Replies

2. UNIX for Dummies Questions & Answers

Terminal emulation settings help rlogin AIX to SCO

I use a program called TinyTerm to access our AIX machine. It works fine except for when I rlogin into our SCO unix server. Backspace doesn't delete, ctrl-c doesn't work (delete key does same thing), and the most annoying thing is vi acts very wierd. I have to press the down arrow like 3 times to... (11 Replies)
Discussion started by: herot
11 Replies

3. OS X (Apple)

What settings are required for login to CVS using Terminal in Mac OS X?

Hi All, I want to login to CVS using terminal. I am executing the following command in the terminal :- export CVSROOT=: cvs login But i get the following error : Afreens-iMac:buildTest Afreen$ export CVSROOT=:... (1 Reply)
Discussion started by: Afreen
1 Replies

4. Shell Programming and Scripting

What settings are required for login to CVS using Terminal in Mac OS X?

Hi All, I want to login to CVS using terminal. I am executing the following command in the terminal :- export CVSROOT=: cvs login But i get the following error : Afreens-iMac:buildTest Afreen$ export CVSROOT=:... (3 Replies)
Discussion started by: Afreen
3 Replies

5. Shell Programming and Scripting

Terminal is closing on exit in ksh

hi while executing the following script, my terminal window is getting closed if I enter a invalid option. I want the script should go back the the command prompt. how to do achive it. i execute the script as . ./test #! /usr/bin/ksh Printf " Type of Installer : \n\t\t 1. Whole Build... (3 Replies)
Discussion started by: vij_krr
3 Replies

6. OS X (Apple) keeps creating copies of my settings files

Under Leopard, I like to conveniently open Terminal windows onto remote systems. I've created several settings files in Terminal, one for each remote system that I want to access. To open window, I right-click on the Terminal icon in the Dock, expand the "New Window" menu item, and select the... (0 Replies)
Discussion started by: siemsen
0 Replies

7. Shell Programming and Scripting

ksh script as a login shell return "no controlling terminal"

I have created a ksh shell script and used it as a login shell for a user. </etc/passwd> lramirev:x:111:200:Luis:/export/home/menush:/usr/local/menush/menush My shell script is like this: </usr/local/menush/menush> #!/bin/ksh # if ] then . $HOME/.profile fi ... (8 Replies)
Discussion started by: lramirev
8 Replies

8. Solaris

Terminal settings from linux to solaris

When I log in from my linux workstation (CentOS4) to a solaris 8 server using SSH or telnet, the terminal settings don't seem to work well. When I tail or vi a file, I get a blank screen or no response, and I am no longer able to interact with the session. I have to type the escape sequence to... (2 Replies)
Discussion started by: tjlst15
2 Replies

9. UNIX for Dummies Questions & Answers

Terminal Video Settings

I am not a Solaris (Unix) guy so i need help. I am trying to get a Sun Ultra 5 running Solaris 8 to display the correct video for my KVM switch. I have set the CDE to 1024x768x75 and have no problem with video using this setting in CDE. When I shut down the server or boot up the server it is... (4 Replies)
Discussion started by: cchyzm
4 Replies

10. UNIX for Dummies Questions & Answers

Terminal settings on solaris

I am getting the following error when try to use vi vt100: Unknown terminal type Visual needs addressable cursor or upline capability : I have checked the TERM variable which is set to vt100. What could be the problem. This is on solaris 2.8 and i am doing telnet. (2 Replies)
Discussion started by: sssow
2 Replies

Featured Tech Videos