Operating System - HP-UX
1751847 Members
4962 Online
108782 Solutions
New Discussion

Ho do I define LPDEST for printer?

 
SOLVED
Go to solution
Yaroki
Super Advisor

Ho do I define LPDEST for printer?

Hi all,

 

I would like to know how I can determine the LPDEST so when I type

# echo $LPDEST

It will bring up the requested result that I set before.

(On HP-UX B.11.11)

 

Thanks,

 

Yali

10 REPLIES 10
Patrick Wallek
Honored Contributor

Re: Ho do I define LPDEST for printer?

You have to manually set LPDEST in your personal .profile if you want it set every time you log in.

 

For example, add the following to your .profile if you want printer BR549 set as your LPDEST:

 

export LPDEST=BR549

 

 

Yaroki
Super Advisor

Re: Ho do I define LPDEST for printer?

I did it but it does not make any change. Still the old destination is set, evev after I opened new terminal.

BTW

I am sorry but it is HP-UX B.10.20

 

Dennis Handly
Acclaimed Contributor

Re: How do I define LPDEST for printer?

>I did it but it does not make any change. Still the old destination is set, even after I opened new terminal.

 

What's your shell?  Did you login when you opened a new terminal?  And what type of terminal?

Did you put that export at the end of your .profile?

Yaroki
Super Advisor

Re: How do I define LPDEST for printer?

My shell is tcsh. I know that the export command dosen't work on this shell, but I set the LPDEST at the .profile file. It supose to work?

I opened a new terminal when with and without loggin.

I put the export at the end of my .profile.

 

Thanks

Dennis Handly
Acclaimed Contributor

Re: How do I define LPDEST for printer?

>My shell is tcsh. I know that the export command doesn't work on this shell

 

(If you are not using a real shell, you need to mention that.)

 

>I set the LPDEST at the .profile file. It suppose to work?

 

Only if you use a real shell.

 

For tcsh and scummy C shell you need to use: setenv LPDEST printer

Yaroki
Super Advisor

Re: How do I define LPDEST for printer?

Sorry, but I didn't know that tcsh consider as not real shell.

Any way, I worte setenv LPDEST printer on .profile but still has no effect.

I edited the .profile file for the specific user I ment. Should I edit the .profile for root?

 

Dennis Handly
Acclaimed Contributor
Solution

Re: How do I define LPDEST for printer?

>I didn't know that tcsh consider as not real shell.

 

Only ksh and the Posix shells are.

 

>I wrote setenv LPDEST printer on .profile but still has no effect.

 

Of course not.  Only real shells use .profile.  The scummy C shell uses ~/.cshrc and ~/.login

 

>Should I edit the .profile for root?

 

No.  Root should only use the Posix shell.  And in that case, use export.

Yaroki
Super Advisor

Re: How do I define LPDEST for printer?

Thanks for the answer,

I have to say that this shell (tcsh) used by the users and is suitable to the work.

Yali

Dennis Handly
Acclaimed Contributor

Re: How do I define LPDEST for printer?

>this shell (tcsh) used by the users and is suitable to the work.

 

Of course if that's what they are used to using.  ;-)

But it isn't useful for scripting, compared to a real shell.

And it appears they don't know how to export variables?