1832978 Members
3084 Online
110048 Solutions
New Discussion

profile problems...

 
Jonathan Caplette
Regular Advisor

profile problems...

Hi guys!!!

I've a big little problem... This problem, only one of my user have it... When this user logon to the system, his profile don't seem to be loaded at all, cause he have not access to all of the application here (seems the PATH and apps environement variables are not set well)... When I login as root and I do a "su - user" I can run all his apps with out a problem... This is very weird cause when I switch-user, I use the same profile has him...

Does somebody have seen something like this!! Please help!!!

Jonathan
13 REPLIES 13
Emiel van Grinsven
Valued Contributor

Re: profile problems...

Hi,

do pwck (-s for trusted system) /etc/passwd
maybe you'll find some fault in the passwd file.
Check uid's and grp id's for this user and all the files in his home dir. also permissions on this dir.

Good luck, E
Jeff Schussele
Honored Contributor

Re: profile problems...

What happens if you have the user re-source the .profile?

Have him do the following:

. $HOME/.profile

Then see if he still has problems. He may be changing shells or doing something else he's unaware of.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Bill Hassell
Honored Contributor

Re: profile problems...

.profile is executed if the user is running a POSIX shell (like ksh or /usr/bin/sh or even bash). If the user is running csh then the equivalent .profile features need to be edited into .cshrc (or have the user change to a more standard shell like the POSIX shell for application access).

Now if you are talking about workstations, the story is very different. The usual terminal window on 10.20 and 11.xx is CDE+dtterm and the defaults are to *NOT* run /etc/profile and .profile at all. While you can edit .dtprofile to turn on .profile, that still misses /etec/profile and both are needed for 'normal' Unix style support.

To fix this, have each user do this:

echo *loginShell: true" >> $HOME/.Xdefaults

Now, every terminal window (dtterm, xterm, hpterm) will truly login and run /etc/profile and then .profile).


Bill Hassell, sysadmin
Craig Rants
Honored Contributor

Re: profile problems...

Bill's answer utilizing the .Xdefaults file will solve your problem.

GL,
C
"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut
Jeff Schussele
Honored Contributor

Re: profile problems...

Bill,

Is that syntax correct on the echo command?
Should that be "loginShell: true" ?

Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Jonathan Caplette
Regular Advisor

Re: profile problems...

OK I'll try this, but Bill, like Jeff ask, is that echo "loginshell..." or echo "*loginshell..."

thanks...
Alex Glennie
Honored Contributor

Re: profile problems...

it was a typo .... just vi .Xdefaults and add the resource !

NB logout of CDE or use xrdb -merge for the changes to take effect.
Wodisch
Honored Contributor

Re: profile problems...

Hello,

care for both, the asterisk AND the uppercase!
The "loginShell: true" forces the terminal emulator programs to start the shell as a login shell (that way executing "/etc/profile" and "$HOME/.profile) and the asterisk means "don't care for the widget hierarchy inside the program"...

In your "$HOME/.Xdefaults" you should have:
*loginShell: true

or, using multiple lines:

xterm*loginShell: true
hpterm*loginShell: true
dtterm*loginShell: true

And the first few characters of the codefilenames could even be in uppercase, to use so-called "class-names" (read the man pages of xterm/hpterm/dtterm for this).

BEWARE: "loginshell" will never work, only "loginShell" does!

Just my $0.02,
Wodisch
Jonathan Caplette
Regular Advisor

Re: profile problems...

And if I don't have the .Xdefault file, should I have one??? What I mean is do I need anything else in that file (Xdefault)???

Bill Hassell
Honored Contributor

Re: profile problems...

Sorry for the typo:

echo "*loginShell: true" >> .Xdefaults

I specifically used >> to append to your current .Xdefaults file (but likely there isn't one). This file is sort of like .profile only for Xwindows. What it does is to set certain Xwindow default values. For example, the contents might look like this:

*loginShell: true
HPterm*scrollBar: true
HPterm*saveLines: 10s
HPterm*background: navy
HPterm*foreground: white
Xterm*background: darkslateblue
Xterm*foreground: white
Xterm*saveLines: 10s
Xterm*scrollBar: true
Dtterm*saveLines: 10s
Dtterm*scrollBar: true

and after adding these lines to .Xdefaults, all hpterm, xterm and dtterm windows will have a scroll bar plus 10 screens (800 lines) of history. hpterm will have a dark blue with white letter color scheme while xterm will have a more gray-blue background with white letters. dtterm will match the overall CDE color scheme.

.Xdefaults is one of the many ways to set window decorations or resources. Look at the man page for hpterm and you'll see the dozens of options and resources that can be set. They can be set generically for every window or they can be set for a window that has a specific title. man X is a start but a good book on Xwindows will also be worthwhile.

Does this help?



Bill Hassell, sysadmin
Jonathan Caplette
Regular Advisor

Re: profile problems...

Hi guys...

sorry for the delay, but none of these answer working.. :( I still stuck with the problem!!!
Steve Steel
Honored Contributor

Re: profile problems...

Hi

how is the user logging in.

Telnet
X
X-emulator.

When you login can you do set > file
Su as user set > file2
diff file file2

Then you will see.

Maybe he has a fault.

If CDE look at $HOME/.dt/startlog $HOME/.dt/errorlog.

Otherwise put set -x in users .profile
login and you will see the steps taken by the profile.


Steve Steel
If you want truly to understand something, try to change it. (Kurt Lewin)
Jonathan Caplette
Regular Advisor

Re: profile problems...

Hum.. sorry for the delay guys..

I solved my problem, it was with the application (I-deas 8) someone from SDRC came to resolved it!!

Thanks anyway!!
ciao!