Operating System - HP-UX
1832973 Members
2530 Online
110048 Solutions
New Discussion

Re: /etc/profile question?

 
SOLVED
Go to solution
david_252
Frequent Advisor

/etc/profile question?

We have users coming in from PC (using ica client & citrix metaframe which runs on unix servers). So the users are listed on the unix server but they login from PC using citrix. Upon login, we have a feeling that /etc/profile is not getting executed. How do we check this?

Thanks

David.
13 REPLIES 13
A. Clay Stephenson
Acclaimed Contributor

Re: /etc/profile question?

I would do something in /etc/profile like export ZZ="Furpsplat" then after your user logs in, have them echo "${ZZ}". If ZZ (or whatever is choose) is set (or not), you have your answer.
If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: /etc/profile question?

David,

Export a variable in /etc/profile and check to see if it gets set for these users.

"export FOO=bar"


Then, after they log in, "echo $FOO"


Pete


Pete
Massimo Bianchi
Honored Contributor

Re: /etc/profile question?

hi,
check the environtment variables.

Some heavily depend on the one dclared in /etc/profile

Check if what is in the /etc/profile is also in the env of the user.

Massimo
Pete Randall
Outstanding Contributor

Re: /etc/profile question?

David,

To absolutely ensure that /etc/profile gets run by our users (who login via Reflections), we added the following lines to $HOME/.dtprofile:

DTSOURCEPROFILE=true
. /etc/profile;
. $HOME/.profile;


Pete


Pete
Piergiacomo Perini
Trusted Contributor

Re: /etc/profile question?

Hi,

in /etc/profile you can add something like this :

PS1=[`hostname`]
export PS1

or,if you have already set PS1, try to modify it.

When users log on to the system, a prompt
with hostname must appear.

Bye

Steven E. Protter
Exalted Contributor

Re: /etc/profile question?

/etc/profile gets soruced.

Its used for setting environment variables.

I would think based on my limited knowledge of Citrix that it would not source environment varaibles. Its not using a regular Unix session. Its probably using a TCP connection.

Its like visitors to your web site, they get processes running on port 80, but do the get environmetn variables from /etc/profile? No, they get their environment variables from the httpd server.

Citrix may be different, and the tests earlier in the thread might be a valid way of figuring it out, but I have no reason to believe that Citrix is going to run using /etc/profile or .profile for the user involved. I'm not sure it should.

I'd check with Citrix.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
david_252
Frequent Advisor

Re: /etc/profile question?

All:

I forgot to mention this. when the user gets the citrix login screen he is directly put on the xmotif application. He does not get a prompt.

Thanks

David.
Pete Randall
Outstanding Contributor

Re: /etc/profile question?

David,

Can you break out of the application to a shell prompt so you can check to see if the variable gets set or not?


Pete


Pete
Steven E. Protter
Exalted Contributor

Re: /etc/profile question?

Another better example.

Our print spooler is called easy spooler. It relies on the OS to validate users.

The environment /etc/profile and .profile is NOT sourced unless they are using the telnet/ssh version of the product.

The Windows GUI gets needed variables from the easyspooler server.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Giri Sekar.
Trusted Contributor
Solution

Re: /etc/profile question?

David:

Do this on a TEST BOX!!!!!

make a copy of your /etc/profile
edit your /etc/profile and add the following line towards the end...

exit 0

see if you can launch the application now for any user. If it executes the /etc/profile, you should not be able to launch

Thanks

Giri Sekar.
"USL" Unix as Second Language
david_252
Frequent Advisor

Re: /etc/profile question?

I put the exit 0 in /etc/profile and the application is not able to launch. so i guess it executes /etc/profile. Thank you all.

Thanks
David.
Elena Leontieva
Esteemed Contributor

Re: /etc/profile question?

David,

To have /etc/profile sourced for all users in all terminals, do the following:

cd /etc/dt/config/C
Edit (or create if it does not already exist)
sys.resources (644 root:sys) to contain
*loginShell: True

Elena.
Jack C. Mahaffey
Super Advisor

Re: /etc/profile question?

I had alot of problems when getting the Citrix MetaFrame client to work on my HP's a couple years back. Here's some of the things I did to get it working:

1 - Edit /opt/CTXSmf/lib/ctxsession.sh and uncomment the following lines:
< # if [ -f $HOME/.ctx.session.sh ] ; then
< # . $HOME/.ctx.session.sh
< # fi

2 - Create a .ctx.session.sh file in the home directory.
Here's what I use.
1 #!/bin/sh
2 # echo "Executing .ctx.session.sh ..."
3 export LOGNAME=`whoami`
4 . $HOME/.pshrc
5 ctx3bmouse middle=left,1

ctx3bmouse allows use of left shift and left mouuse click for two mouse click.


3 - Edited .profile and added the following:
# Citrix will not log on if ENV variable is set!!! for /usr/bin/sh shell
# ENV=/home/mqm/.pshrc
# export ENV
if [ "X${SHELL}" = "X/usr/bin/sh" ]; then

if [ `env | grep CITRIX_SESSION_ID | wc -l` -eq 0 ]; then
ENV=$HOME/.pshrc
export ENV
fi
fi

if [ ! "X${SHELL}" = "X/usr/bin/sh" ]; then
ENV=$HOME/.pshrc
export ENV
fi


Now I can't remember why I did all the changes. Citrix support was of no value.


You can see that .pshrc is executed.


Don't know if this fixes your problem.

Jack...