How can I print the command line output directly to the printer.
I am using ubuntu server 12.04 and I have to copy files into a shared directory and then download them from a desktop ubuntu distribution to print them.
Any help is appreciated
|
How can I print the command line output directly to the printer. I am using ubuntu server 12.04 and I have to copy files into a shared directory and then download them from a desktop ubuntu distribution to print them. Any help is appreciated |
|||||||||||||||||||||
|
|
Mainly there are two default commands:
so easily use the command:
Or
|
||||
|
|
|
You can use For example:
This will print the man page from firefox to the specified printer |
|||||
|
|
If you have them installed, another pair of options worth knowing about are and These are useful for providing numbered pages with headings and optional line-numbers. You can also use then to print booklet style (e.g. two pages on each side of a sheet) I use these with Postscript-capable printers but I believe that Ubuntu's print system can rasterize PS for any supported printer. |
|||||
|
|
To print a .txt file in a use :
Example :
|
||||
|
|
|
The question is about how to print from the command line on a server, and it sounds like you don't yet have any printers defined on that system. I don't have a system to check on so the following are approximate, but they should give you the general idea:
PS. In a pinch, you could install enough X utilities to run the Print Admin GUI utility via a remote X connection to your desktop Ubuntu box (log in with |
|||
|
|
|
You may want to find out how the printer is accessed first - You can simply pipe your output to the |
|||
|
|
|
You can use the To print the output of a command to the default printer (use
To print to a specific printer (use
To print a file, rather than a command output:
|
|||
|
|