1850314 Members
3067 Online
104054 Solutions
New Discussion

CDE Terminal behavior

 
SOLVED
Go to solution
John Dvorchak
Honored Contributor

CDE Terminal behavior

I just setup a 715/50 HPUX 10.20 and all is working just fine except when I click on the "Terminal" icon. The "Terminal" starts ok but I don't have any of the customizations that were setup when I telnet to the machine. I have a custom prompt and I use history. I can su - root or any other user and it seems to read the local .profile just fine. I would like to avoid having to start a terminal then su evertime I want to actually use it. I am new to CDE and X so please forgive me if this is something that everyone knows except me.
If it has wheels or a skirt, you can't afford it.
3 REPLIES 3
Stefan Schulz
Honored Contributor
Solution

Re: CDE Terminal behavior

HI,

if you open a new terminalwindow in CDE a dtterm is opend. Dtterm uses the settings from .dtprofile and not from .profile.

If you log in using telnet .profile is read.

You can use this behavior to set GUI specific stuff in the .dtprofile and everything else in th .profile.

Then you use DTSOURCEPROFILE=true in your .dtprofile. This will read all the GUI specific stuff from your .dtprofile and then the complete .profile. So you will have the same settings in your CDE Terminal as in your telnet session.

Hope this helps


Regards Stefan
No Mouse found. System halted. Press Mousebutton to continue.
Steve Steel
Honored Contributor

Re: CDE Terminal behavior

Hi


PROBLEM
--------
How to make sure in CDE that profile is used.

SOLUTION:
----------
1: Setup the ttymodes and login shell for CDE.

1)For user specific change Create a $HOME/.Xdefaults file

1b)For system wide changes copy the file /usr/dt/config/C/sys.resources to the
/etc/dt/config/C directory.

2)In the file selected apply the following lines for the tty modes and the force of sourcing the profile, each time you open a new shell.

*ttyModes: erase ^H intr ^C kill ^U start ^Q stop ^S swtch ^@ susp ^Z
*loginShell: True

NOTE: make sure that you have no blanks in front of *ttyModes ..... and no blanks i front of *loginShell ....

3) Make sure to have the latest shell patches installed to avoid known problems with the ksh and Posix shell.
hp-ux_patches/s700_800/10.X/PHCO_20018
hp-ux_patches/s700_800/10.X/PHCO_19052

4) Modify the /etc/profile and the $HOME/.profiles to have a IF-Statement around and settings for DISPLAY, stty and other
services, which should not be executed under CDE..
Everything between these lines, will not be executed when the login comes from CDE:
if [ ! "$DT" ]; then
.
.
.
fi # if !DT


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Alex Glennie
Honored Contributor

Re: CDE Terminal behavior

John,

Check out man dtterm and look at the loginShell resource and/or -ls option .... by default CDE's terms - dt,X & hp terms : do not source the users .profile.

simply do this :

vi $HOME/.Xdefaults

Dtterm*loginShell : True

wq!

exit out of CDE then log back in your .profile will now be executed.

or just run "dtterm -ls &" from within an existing dtterm window.