- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: LPDEST
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2011 03:18 AM
тАО06-15-2011 03:18 AM
I would like to edit the spooler destination.
I know that LPDEST from env is the place to make the change.
1. Is there a possible to edit the env itself (i guess not, but just to be sure).
2. How can I set env parameters?
3. where can I define the spooler destination?
BR,
Yaron
Solved! Go to Solution.
- Tags:
- LPDEST
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2011 06:33 AM
тАО06-15-2011 06:33 AM
Re: LPDEST
export LPDEST=prn32
Now, this user will automatically print to prn32.
On the other hand, if you only have one printer, just use the command:
lpadmin -dprn678
and now, all users will print to the same printer without having to use the lp -d option.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2011 06:39 AM
тАО06-15-2011 06:39 AM
Solution"env" is not a file or a place: it is one of the many ways to display all the environment variables that are currently set.
To see all the configured spooler destinations, run "lpstat -p". The output should look like this:
$ lpstat -p
printer foobar is idle. enabled since Jan 28 15:00
fence priority : 0
In the above example, there is only one spooler destination, "foobar".
If you want to configure more spooler destinations (= printers), use SAM/SMH, or commands "lpadmin" or "addqueue" (for network printers only).
To set environment variables like LPDEST, you first need to know which shell you're using. The command "echo $SHELL" might be helpful here.
If you're using tcsh or csh (yuck), you can set/overwrite environment variables with commands like:
setenv VARIABLE value
i.e.
setenv LPDEST foobar
If the variable already exists, the new value will overwrite the old one automatically.
To unset (remove) a variable with tcsh or csh:
unsetenv VARIABLE
With most other shells (i.e. the Bourne/POSIX-style shells) like sh, ksh, bash and zsh, the commands are slightly different.
In these shells, there are two common ways to set an environment variable:
VARIABLE=value
export VARIABLE
or
export VARIABLE=value
To unset(delete) an environment variable in Bourne/POSIX-style shells:
unset VARIABLE
The environment variables are specific to each process. A child process receives a copy of its parent's environment variables at the moment of its creation.
(That is, assuming the variable is *exported*: in csh/tcsh, all environment variables are exported by default. In Bourne/POSIX shells, if the "export" command is not used, the variable will not be copied to the environment of the child processes; it will be available for the shell itself only.)
Each process can only change its own environment variables.
The environment variables are not persistent: if you set them in your login session and then log out, you'll need to set them again in your next session. To set an environment variable persistently, you'll need to add a command to set the variable in your login script, so that the variable will be automatically set as you want it each time you log in.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-15-2011 11:27 PM
тАО06-15-2011 11:27 PM
Re: LPDEST
I know you all avoid of working with tcsh but this is the shell running here.
(This is due to comfortable environment reasons for users, such as up arrow for last command) hence setenv (so does export) is not available.
The users use a print script called sps which defines the $LPDEST for pe2 printer.
So, how and where can I set LPDEST (script; env).
I attached the script as well.
BR,
Yaron.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2011 02:20 AM
тАО06-16-2011 02:20 AM
Re: LPDEST
Of course setenv is available, you are using the scummy C shell or its improved derivative, tcsh.
This script assumes that LPDEST has already been exported before you invoke it.
So as MK said, you can export it in your scummy C shell ~/.login profile:
setenv LPDEST some-printer
Or the user can invoke that setenv in his session, sometime before printing.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-16-2011 02:58 AM
тАО06-16-2011 02:58 AM
Re: LPDEST
> comfortable environment reasons for users,
> such as up arrow for last command) [...]
http://www.gnu.org/software/bash/
http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.2/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 12:28 AM
тАО06-19-2011 12:28 AM
Re: LPDEST
Dear Steven,
I would like to download bash from the link you sent http://hpux.connect.org.uk/hppd/hpux/Shells/bash-4.2/) for 11.11v.
It is with .gz extension.
Should I copy it to /sbin and istall it there? How to Install?
BR,
Yaron
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 04:55 AM
тАО06-19-2011 04:55 AM
Re: LPDEST
This is pretty common knowledge. Did you try
anything simple like a Web search for, say,
.gz
? Google works for me. Or:
man gzip
Or the FAQ link at the top of that Web page?
http://hpux.connect.org.uk/hppd/answers/
[...]
4. SOURCE PACKAGE DISTRIBUTIONS
4.1 How do I unpack the sources?
[...]
http://hpux.connect.org.uk/hppd/answers/4-1.html
If this remains a mystery, then you might try
to find some local help.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 05:04 AM
тАО06-19-2011 05:04 AM
Re: LPDEST
> Should I copy it to /sbin [...]
No.
Normally, anyone who has the "root" password
should already know these things. Or be
reading much more about HP-UX (or UNIX in
general) then he'll find in answers here.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-19-2011 10:34 PM
тАО06-19-2011 10:34 PM
Re: LPDEST
Handling with .gz is well known. That was not the issue.
Obviously, I am not the scholar sys admim and I just try to learn the matter.
I probably should go back to the books. Thank you for your help.
BR,
Yaron