.dtprofile is profile used when logon by CDE, and .profile is used when logon by command line. The two files do not refer to each other. If we want to make .profile effective when logon by CDE, we need to remove the comment character # for the last line #DTSOURCEPROFILE=true in .dtprofile.
If .kshrc ise used, the following command export ENV=$HOME/.kshrc should be added into .dtprofile or .profile.