Operating System - HP-UX
1835355 Members
3785 Online
110078 Solutions
New Discussion

alias, .profile and XDMCP logins

 
SOLVED
Go to solution
Sébastien N
Advisor

alias, .profile and XDMCP logins

Hi,

When i connect my HP-UX server with XDMCP, the aliases defined in the .profile of the user are not loaded in the Terminal windows. (I uncomment the DTSOURCEPROFILE in the .dtprofile so that the .profile is loaded)

How to load aliases when I open Terminal windows ?

Thanx.
6 REPLIES 6
Pete Randall
Outstanding Contributor

Re: alias, .profile and XDMCP logins

Aliases typically go in the shell's rc file (i.e. kshrc for korn shell). That works for us.

Pete

Pete
Alex Glennie
Honored Contributor
Solution

Re: alias, .profile and XDMCP logins

vi $HOME/.Xdefaults (create one if it doesn't exist)

add :

Dtterm*loginShell : True

wq!

exit out of CDE then log back in ?

Nb terminals , dtterm, xterm etc do not reference the users .profile by default : see man dtterm -> -ls and login*Shell references.
Sébastien N
Advisor

Re: alias, .profile and XDMCP logins

Do you put the .kshrc in the HOMEDIR of the user ?
I just tried with no result :-(

Any ideas ?

-rw-r--r-- 1 test test 16 15 nov 17:32 .kshrc

the .kshrc :
alias ll ls -la
Jean-Louis Phelix
Honored Contributor

Re: alias, .profile and XDMCP logins

hi,

.profile is executed only in the login shell. It should set a ENV variable pointing to a file (usually $HOME/.kshrc) which will be executed by every child processes. That's the right place to define aliases.

Regards.
It works for me (© Bill McNAMARA ...)
Pete Randall
Outstanding Contributor

Re: alias, .profile and XDMCP logins

Alex makes an excellent point and I assume that would extend to the rc files as well. Try his suggestion.

Pete

Pete
Wodisch
Honored Contributor

Re: alias, .profile and XDMCP logins

Hi,

what I usually do is to set and "export" the environment variable "ENV" to point to the user's ".shrc" script and I do that in the user's ".dtprofile".
So, every time s/he logs ins (CDE) that variable is set and inherited by all the subsequent processes, including shells and terminal windows, of course.
And if a POSIX or Korn shell has that variable set when it starts, then it does execute the script referenced by that variable - even if the shell is NOT a login shell...
The "csh" does executes the user's ".cshrc" anyway.

FWIW,
Wodisch