Jyothi's Weblog

« Solaris for newbies | Main | Using man pages in... »

http://blogs.sun.com/jyothi/date/20070309 Friday March 09, 2007

Printing basics on Solaris

Here are some basic print commands to help you overcome your intial printing hurdles on Solaris.

The simplest usage of the print command is

$ lp file

To print multiple files at the same time, type:

$ lp file1 file2....

And to print multiple copies of the file,type

$ lp -n file

where ā€œnā€ is the number of copies you want to print.

When you issue a print command on your Solaris system, it prints to the default printer. To know your system's default printer, type

$ lpstat -d

To set your default printer, add the following line in your .bashrc file : (if you are using bash)

export LPDEST = "printer-name"

where LPDEST is the default printer's environment variable.

For the changes to be effective immediately,source the .bashrc file  as shown:

$ . ./.bashrc

You can also set the default printer at the command line as shown below, but this is only temporary and the changes are lost once you exit out of the shell.

$ export LPDEST=printer-name


To print to a specific printer , type

$ lp -d printer_name filename

And to check the printer's status (idle or active), type

$ lpstat -p printer_name

To cancel a print job,you need to know the request id. Type

$ lpstat -o printer_name

The first column in the output shows the printer name, the second shows your user-id and the third column shows the request id number.

Cancel the print job by typing 

$ cancel request_id | printer_name

You might also want to read this article on printing by Carl Grammer.

Hope you found this short printing primer useful. Do let me know. 



 


Comments:

http://www.batterylaptoppower.com/toshiba/pa3534u-1brs-002.php Original Battery Toshiba PA3534U-1BRS PA3534U-1BAS NEW laptop battery ,
http://www.batterylaptoppower.com/toshiba/pa3421u-1brs.php Battery for Toshiba M30X M35X M40X PA3395U-1BRS PA3421U laptop battery ,
http://www.batterylaptoppower.com/toshiba/pa3536u-1brs.php New PA3536U Battery for Toshiba Satellite P200 P205 laptop battery ,

Posted by laptop batteries on November 05, 2008 at 07:48 PM PST #

Post a Comment:
Comments are closed for this entry.

Valid HTML! Valid CSS!

This is a personal weblog, I do not speak for my employer.