How to force Xmanager to execute .profile?

hello all
i created a login scrip and add it successfully to .profile
now i need to force this .profile to be executed if the user login using xmanager not a normal telnet
best regards

---------- Post updated at 09:05 AM ---------- Previous update was at 03:25 AM ----------

Ant updates ????

To make all users on a system get the settings you want you would put your changes into /etc/profile, you can then surround those extra entries with a test for if the user is in a telnet or X session, depending on what Unix you are using you may have ptree (Solaris) or pstree (Linux) followed by $$ for the current PID and what the parent processes are.

i don't need to put it in /etc/profile i need the script to run for an individual user and i put it in the .profile successfully.
i just need to make the .dtprofile run the script as well as the .profile

Set the DTSOURCEPROFILE variable in the .dtprofile as:

DTSOURCEPROFILE=true

i've enabled DTSOURCEPROFILE=true but the the result was very bad. once i enter the user name and password the X windows close

Have you tried to source the .profile in the /.dtprofile?

Make the last line in the .dtprofile file read:

DTSOURCEPROFILE=true

~/.profile will then get sourced as well.
See:
Solaris Common Desktop Environment: Advanced User's and System Administrator's Guide

not working :frowning:

---------- Post updated at 05:53 AM ---------- Previous update was at 04:27 AM ----------

finally my script run after i added it to .dtprofile but i faced another problem.
in fact my script echo a msg and wait for the user to enter a specific file name as a parameter if this parameter is not entered correctly the script will kill the session.
it's working fine with telnet from .profile but xmanager don't show the echo msg and don't wait for the user to enter the right parameter and then kill the session
any help with this complicated issue ????
thank you all for ur time and help

You will need to launch a terminal window to ask the question in, e.g.:

dtterm -e /patch/to/script_that_asks_question

where shell i add this line , in the .profile or in the .dtprofile ???

Try each in turn and see which is best?