- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: aliasing LP commands in the .profile
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
Forums
Discussions
Discussions
Discussions
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
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
04-29-2005 06:37 AM
04-29-2005 06:37 AM
I am trying to dummy proof printing for a group of my users.. We have an app on our UX box that make it possible for them to use a default printer.. Simple enough, I at the
export LPDEST=
Now I need to alias or have some way for them to print compressed and vsi7.27
my normal lp command for the printer would be
lp -d
I've tried defining the lp as an alias to itself by doing an alias in the .profile and all in a script that would be ran from the .profile.
alias lp='lp -ovsi7.27 -oc'
I thought would work, tried is several ways.. Could someone point in a direction?? Thanks in advance..
Rex M
Solved! Go to Solution.
- Tags:
- alias
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 06:53 AM
04-29-2005 06:53 AM
SolutionAnother option is to create another print queue just to do the compressed print. If this is a LaserJet, create the print queue and then you can modify the script in /etc/lp/interface/model.orig. Edit the options line:
from options="$5"
to options=$5" vsi7.27 c"
I've got dozens of print queues set up this way. It works well.
Marlou
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 07:03 AM
04-29-2005 07:03 AM
Re: aliasing LP commands in the .profile
Try changing the alias to
alias lp='/usr/bin/lp -ovsi7.27 -oc'
- Biswajit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 07:04 AM
04-29-2005 07:04 AM
Re: aliasing LP commands in the .profile
I didn't think of placing the full path to the executable.. I will try it..
Thanks ..
Rex
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 07:22 AM
04-29-2005 07:22 AM
Re: aliasing LP commands in the .profile
here is the .profile I am using as a template.
# Set up the terminal:
if [ "$TERM" = "" ]
then
eval ` tset -s -Q -m ':?hp' `
else
eval ` tset -s -Q `
fi
stty erase "^?" kill "^U" intr "^C" eof "^D"
stty hupcl ixon ixoff
tabs
# Set up the search paths:
PATH=$PATH:.
# Set up the shell environment:
set -u
trap "echo 'logout'" 0
trap "" 1 2 3
# Set up the shell variables:
EDITOR=vi
export EDITOR
export FGLGUI=1
# Define Default Printer
export LPDEST=elkadm8150
# "setcompprint calls an alias for LP"
# alias lp='/usr/bin/lp -ovsi7.27 -oc'
. setcompprint
## Application
. menufpsadm
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 07:44 AM
04-29-2005 07:44 AM
Re: aliasing LP commands in the .profile
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 07:52 AM
04-29-2005 07:52 AM
Re: aliasing LP commands in the .profile
then remove the LPDEST VARIABLE Correct?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 07:56 AM
04-29-2005 07:56 AM
Re: aliasing LP commands in the .profile
Is your . menu... at the end going to a subshell? You may need alias -x.
Marlou
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 07:58 AM
04-29-2005 07:58 AM
Re: aliasing LP commands in the .profile
The way, would be defining default printer with lpadmin -d "xxss"
and setting an alias as follows.
lp='/usr/bin/lp -ovsi7.27 -oc' - tis should work after defining default printer.
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 08:02 AM
04-29-2005 08:02 AM
Re: aliasing LP commands in the .profile
Tried alias lp='lp -d ............'
nothing seems to be clicking and my brain isn't functioning too well, it must be friday. Maybe it will come to me when I am out metal detecting this weekend..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 08:14 AM
04-29-2005 08:14 AM
Re: aliasing LP commands in the .profile
You can also look in /var/adm/lp/log for more information.
Marlou
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 08:26 AM
04-29-2005 08:26 AM
Re: aliasing LP commands in the .profile
Changing the model script is not an option because they may have 4 other orientations that need to be ran through the device..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2005 11:59 AM
04-29-2005 11:59 AM
Re: aliasing LP commands in the .profile
I assume the app is a compiled binary and thus is probably using a 'system()' or 'exec()' type call to call the LP binary directly, of which wouldn't be affected by any shell aliases.
This leaves you with making the printer interface more intelligent to automatically set the options based on the input file.
Well, that's my take on what you've said so far.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 01:22 AM
05-02-2005 01:22 AM
Re: aliasing LP commands in the .profile
The App is a "4gl" program that has defined printers in the database. However in lieu of printing through the select a printer they use can print to "default" printer. It still requires a "unix" que defined as LPDEST variable.
Can one define "LPDEST" with the command line switches?
ie:
export LPDEST=quename -ovsi7.27 -oc
??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 01:32 AM
05-02-2005 01:32 AM
Re: aliasing LP commands in the .profile
Now, does your app, use lp?? You sure about it??
type lp. What does it return??
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 01:34 AM
05-02-2005 01:34 AM
Re: aliasing LP commands in the .profile
the app makes calls to the lp subsystem, (or other wise defines output devices), It also CAN parse through PDF, EZ Spool, Optio and other various types of output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:00 AM
05-02-2005 02:00 AM
Re: aliasing LP commands in the .profile
What does "whence -v lp" report?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:08 AM
05-02-2005 02:08 AM
Re: aliasing LP commands in the .profile
lp is /usr/bin/lp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:12 AM
05-02-2005 02:12 AM
Re: aliasing LP commands in the .profile
"lp is an alias for lp -ovsi7.27 -oc"
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:15 AM
05-02-2005 02:15 AM
Re: aliasing LP commands in the .profile
I can define the alias from the Command line, but when I put it in the .profile, it fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:25 AM
05-02-2005 02:25 AM
Re: aliasing LP commands in the .profile
Have you tried putting it in the rc file for whichever shell you're using?
Pete
Pete
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:29 AM
05-02-2005 02:29 AM
Re: aliasing LP commands in the .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:35 AM
05-02-2005 02:35 AM
Re: aliasing LP commands in the .profile
We use korn shell so we set aliases in the .kshrc file.
$ more .kshrc
alias bdf="/usr/local/bin/bdfmegs"
alias lp="lp -o nb"
$ whence -v lp
lp is an alias for lp -o nb
That seems to work for us.
Pete
Pete
- Tags:
- .kshrc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:41 AM
05-02-2005 02:41 AM
Re: aliasing LP commands in the .profile
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-02-2005 02:41 AM
05-02-2005 02:41 AM
Re: aliasing LP commands in the .profile
Thanks..