Operating System - HP-UX
1753837 Members
9106 Online
108806 Solutions
New Discussion юеВ

exceed and cde what happend to aliases

 
SOLVED
Go to solution
eric stewart
Frequent Advisor

exceed and cde what happend to aliases

I am running exceed that opens the cde
environemnt. I see that users .profile gets
executed. When I open a terminal session thru the personal application popup window and the dtterm window opens I have a session.
1. when I do the alias command, how come the aliases set in the .profile are not there?
They were exported.
2. PS1 was set in the .profile. How come I just get the geneic prompt of $
Thanks in advance
Eric Stewart
Good help is easy to find within forums
12 REPLIES 12
Andy Monks
Honored Contributor

Re: exceed and cde what happend to aliases

you need to set things like that in the .cshrc and similiar
eric stewart
Frequent Advisor

Re: exceed and cde what happend to aliases

I read the .dtprofile where it tells how to uncomment out the line DTSOURCEPROFILE=true
It will then execute your .profile, which it does.
Also the default shell is ksh.
Am I missing something here?
Is ther something that gets executed after the .profile that removes the aliases set in the .profile?
Good help is easy to find within forums
Bill Hassell
Honored Contributor

Re: exceed and cde what happend to aliases

CDE is not a 'standard' Unix environment so when you start a terminal window with the CDE button, you get an immediate login that bypasses both /etc/profile and also .profile - the reason being that character mode interfaces are not common in a graphical environment.

Look at the comments near the bottom of .dtprofile in your $HOME directory and uncomment the DTSOURCEPROFILE env variable. This file is read by the dtsession manager (parent for dtterm and other icons in the window manager) so you'll have to log completely out and back in again to get the new .dtprofile to source .profile.

Now you could add the necessary customizations to .dtprofile since .profile might have settings or tests that require an interactive shell and these might fail when starting a graphics program. By selecting the ones you need, you can keep your graphical session separate from remote telnet logins.


Bill Hassell, sysadmin
Brian M. Fisher
Honored Contributor
Solution

Re: exceed and cde what happend to aliases

As another option, you could set these variables in $HOME/.dtprofile or /etc/profile

Or you can also add the following line to the .dtprofile to force .profile to be read:
DTSOURCEPROFILE=true; export DTSOURCEPROFILE
and create a $HOME/.Xdefaults file and add "*loginShell : True"

Brian
<*(((>< er

Perception IS Reality
curt larson
Frequent Advisor

Re: exceed and cde what happend to aliases

I'm using exceed, but I'm using xdm to get the CDE desktop. But I found out that my alias' were only set when i put them into the .kshrc file. Which is what i my ENV shell variable set to. But my PS variable is set in the .profile, so I'm suspecting that your not sourcing your dot files.

When logging in via the gui you need to set DTSOURCEFILE=true as explained in the .dtprofile file.

when just starting a dtterm window, you'll probably need to specify the -ls option to dtterm to have the shell read it's dot file. dtterm's default is not to read them.

You'll probably want to add a few other things such as geometry(window size), scroll bars, etc.

Look at the man page for dtterm for the various options and their syntax.
nobody else has this problem
Kofi ARTHIABAH
Honored Contributor

Re: exceed and cde what happend to aliases

Hi!

you would have to edit your /usr/dt/config/sys.dtprofile to uncomment the line

# DTSOURCEPROFILE=true

to read

DTSOURCEPROFILE=true

good luck.
nothing wrong with me that a few lines of code cannot fix!
eric stewart
Frequent Advisor

Re: exceed and cde what happend to aliases

Here is the .profile:
# @(#) $Revision: 72.2 $
if [ ! "$DT" ]; then
#
# commands and environment variables not appropriate for desktop
#
DISPLAY=mydisplay:0
stty erase "^?" kill "^U" intr "^C" eof "^D" columns 132
stty hupcl ixon ixoff
tabs
fi

# Set up the search paths:
PATH=$PWD/bin:$PATH

# Set up the shell environment:
set -u
trap "echo 'logout'" 0

# Set up the shell variables:
EDITOR=vi
export EDITOR

# Set up alias
alias px='ps -aef|grep -v grep | grep '
export px

PS1='${PWD} >'

Here is the display from the CDE terminal window:
$ alias
autoload=typeset -fu
false=let 0
functions=typeset -f
hash=alias -t -
history=fc -l
integer=typeset -i
nohup=nohup
r=fc -e -
stop=kill -STOP
suspend=kill -STOP $$
true=:
type=whence -v
$

Where is the prompt and aliases I expect?
Good help is easy to find within forums
curt larson
Frequent Advisor

Re: exceed and cde what happend to aliases

Have you tried sourcing your .profile from the command line.

I take it that works? This would work for me, alias' included. but like I said
the at login the alias only were set when placed in the ENV file, which
for me is my .kshrc file.

You can also use brian fisher suggestion of using the .Xdefaults file to set up your scrollbars by adding:

Dtterm*saveLines: 8s
Dtterm*scrollBars: true

nobody else has this problem
Kofi ARTHIABAH
Honored Contributor

Re: exceed and cde what happend to aliases

I think you should not export px - rather, you should export PS1 - the PS1 line should read

PS1="`pwd` >"
export PS1
nothing wrong with me that a few lines of code cannot fix!