1754274 Members
3303 Online
108813 Solutions
New Discussion юеВ

User's CDE environment

 
Tarek
Super Advisor

User's CDE environment

Hi all there..
i have created a nis user. I have set his shell to posix shell (/usr/bin/sh). I have also set .profile and .kshrc. If I work remotely as that user, for ex. with a remote shell or with su - user my terminal reads .profile and have that environment i've set such as PS1, aliases and so forth..
But if i enter locally usring CDE on the ws with username and password when i open a terminal my environment isn't set. It seems as .profile and .kshrc aren't read. So PS1 isn't set (i have only $) and also aliases... Another thing is that when i try to use ESC to complete a filename this doesn't work..it gives me ^[^[
Do i have to set something so my .profile will be read when i enter using CDE locally??
Thanks...
8 REPLIES 8
Roberto Gallis
Regular Advisor

Re: User's CDE environment

Hi,
edit .dtprofile to load your .profile

Regards

Roberto
Tarek
Super Advisor

Re: User's CDE environment

Thanks Roberto..
now aliases work and also ESC file name completition but the prompt isn't as i set in my .profile.
It is:
PS1='gehp180: $PWD > '
Is it wrong? Because as i told before with remsh and rlogin it works.
Thanks
Printaporn_1
Esteemed Contributor

Re: User's CDE environment

HI,

please check $HOME/.drprofile
make sure that this following line was not comment.
DTSOURCEPROFILE=true
enjoy any little thing in my life
Roberto Gallis
Regular Advisor

Re: User's CDE environment

Hi,
my .profile has

PS1=`hostname`':$PWD#>'

but try just uncomment the bottom line in .dtprofile where

DTSOURCEPROFILE=true

Regards
Roberto
Tarek
Super Advisor

Re: User's CDE environment

Hi..
as i told you before i have Uncommented that line in .profile but it seems as it isn't read. If i put PS1 in .profile my prompt doesn't change. But if i put it in .kshrc it changes. It seems as only .kshrc is read.
Roberto Gallis
Regular Advisor

Re: User's CDE environment

Hi,
are you sure the shell is /usr/bin/sh in /etc/passwd ?
Tarek
Super Advisor

Re: User's CDE environment

Yes that is the shell. But the user is a nis user, i don't know if this changes or not.
It is really strange..now also .kshrc isn't read. I can't set my prompt as i want. Now also aliases aren't read and the file completetion name isn't working.
I don't know what to do.
Does my .profile need special entries??
Steve Steel
Honored Contributor

Re: User's CDE environment

Try This

How to make sure in CDE that /etc/profile get read

SOLUTION:
Here is the info about the questions with the sourceing of the
/etc/profile or $HOME/.profile.

1: Setup the ttymodes for CDE.
1a) Create a$HOME/.Xdefaults file for user specific settings
or copy the file /usr/dt/config/C/sys.resources to the
/etc/dt/config/C directory

1b) Apply the following lines for the tty modes and to force of sourcing
the /etc/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 ....

2: Make sure to have the latest shell patches installed to avoid known
problems with the ksh and Posix shell.

3: Motify the /etc/profile and the $HOME/.profiles to have a
IF-Statement around and settings for DISPLAY, stty and other
services, which make no sence to get executed under CDE..
Everything between the follow lines, will not executed when login
from CDE:
if [ ! "$DT" ]; then
.
.
.
fi # if !DT


If you want truly to understand something, try to change it. (Kurt Lewin)