Operating System - HP-UX
1836414 Members
2256 Online
110100 Solutions
New Discussion

Re: /usr/bin/ksh: ac9: not found:

 

/usr/bin/ksh: ac9: not found:

I have installed another version of ARCGIS9. In my .profile I have a line that reads alias ac9=$ARCHOME/bin/arc. I also have a number of other alias that are in the profile. I created a new user and if I try and use any of the alias the programs will not launch, I get the error /usr/bin/ksh: : not found:. If I exit that user and login in as my old self the old alias still work. Any ideas.

Thanks,
Conrad
8 REPLIES 8
Sanjay_6
Honored Contributor

Re: /usr/bin/ksh: ac9: not found:

Do you have the variable ARCHOME defined in the new user profile before you define the variable ac9 in the profile.

Hope this helps.

regds
Muthukumar_5
Honored Contributor

Re: /usr/bin/ksh: ac9: not found:

.profile file settings are local if you define in the user's specific home directory.

If you want to maintain common alias informations then go to /etc/profile file. It will be capable to all normal users.

And alias ac9=$ARCHOME/bin/arc say's,
$ARCHOME/bin/arc is it an executable there?

If you want to move into that directory then as,
alias ac9='cd $ARCHOME/bin/arc'

And /usr/bin/ksh: : not found: says,
you tried to execute as,

$alias:

If you did not export /usr/bin on PATH variable then normal execution of alias too get's error there.

$/usr/bin/alias

Give all alias information's


IF you want to maintain personal settings based on user then,

user $HOME/.profile

change the permission to 400

HTH.
Easy to suggest when don't know about the problem!

Re: /usr/bin/ksh: ac9: not found:

Greetings,

I'm sorry if I may have mislead you. The error remains /usr/bin/ksh: ac9: not found, where ac9 is the alias. Which is defined by 'export ARCHOME=/opt/esri/arcexe9x' then further down 'alias ac9=$ARCHOME/bin/arc'.

The paths are as follows:
# Set up the search paths:
PATH=$PATH:/usr/local/bin:.

export PATH=$PATH:/usr/dt/bin:$ARCHOME/programs:$ARCHOME/bin:/usr/bin/X11:$AVHOME3/bin/arcview:/opt/omni/bin:.

I tried changing the permissions too 400 with no effect on the operation. Previously the files where at 644.

I suspect the key to what is going on is that if I login with my original .profile all of my (3)alias work. Then I login in with the new account which has had a few changes to the .profile where I modified only one alias and none of the three alias work.

Thanks for you time,
Conrad
Muthukumar_5
Honored Contributor

Re: /usr/bin/ksh: ac9: not found:

New Settings of,
export ARCHOME=/opt/esri/arcexe9x --> will export the /opt/esri/arcexe9x to ARCHOME environment variable.

Then alias ac9=$ARCHOME/bin/arc, will do as,

$ ac9
as, /opt/esri/arcexe9x/bin/src executed on shell.

But error /usr/bin/ksh: : not found say's,
alias binary is not there in search path or on shell /usr/bin/ksh binary

Normal alias will be in /usr/bin/alias and builtin with shell too.

Let us give information as,
which alias
what /usr/bin/alias

/usr/bin/alias
If it is executing then then /usr/bin path is not exported on PATH variable

PATH=$PATH:/usr/bin

And finally what you are expecting from export ARCHOME=/opt/esri/arcexe9x, alias ac9=$ARCHOME/bin/arc there. Do you want cd in to that directory or executing the src file there?!
Easy to suggest when don't know about the problem!

Re: /usr/bin/ksh: ac9: not found:

I've attached the profiles as one txt file. Profile1.txt works if I login as myself, profile2.txt does not work if I login as tester. I tried inserting into the PATH the :/usr/bin so the line looked like 'export PATH=$PATH:/usr/bin:/usr/dt/bin:$ARCHOME/programs:$ARCHOME/bin:/usr/bin/X11:$AVHOME3/bin/arcview:/opt/omni/bin:. This did not change the results.

I expect alias ac9 to launch the program 'arc' at /opt/esri/arcexe9x/bin.

When looking at the attachements the other alias av3 should launch the program arcview at /opt/esri/arcview32/arcview3/bin. While the alias imagine should launch the program imagine at /opt/erdas/imagine/840/bin.

Re: /usr/bin/ksh: ac9: not found:

I've attempted a few more things. If I have someone SU to the user then the alias works. If I login in as the user and at the prompt line type alias ac9=$ARCHOME/bin/arc, hit enter and type ac9 hit enter then it launches. It remains working until I logout and back in.

Re: /usr/bin/ksh: ac9: not found:

Greetings all,

Well I finally have it working. The problem was that when the new account was created it did not create a .Xdefaults file in the /home/username directory. All this file contains is;
*enableEtchedInMenu: False
*loginShell: true
With this file in the users directory all works well. Not sure why SAM does not create this file when a new user is added. Thanks for all the suggestions and support in solving this problem.

Cheers,
Conrad

Re: /usr/bin/ksh: ac9: not found:

Well I finally have it working. The problem was that when the new account was created it did not create a .Xdefaults file in the /home/username directory. All this file contains is;
*enableEtchedInMenu: False
*loginShell: true
With this file in the users directory all works well. Not sure why SAM does not create this file when a new user is added. Thanks for all the suggestions and support in solving this problem.