Install the Printer
Setting up your printer in OpenSolaris can be a trick, if your drivers aren’t yet included.
- The place to start is in: System | Administration | Print Manager
- Click “Add Printer” button and get to work
- If your printer isn’t available try getting a driver from one of these places:
- You need to get a valid *.ppd or *.ppd.gz file for your printer.
- Close the Print Manager GUI for now.
- As ROOT type:
# ppdmgr -a path_to_.ppd -w
# ppdmgr -u
- Reopen the Print Manager GUI and you should be able to find your driver.
- Best of luck, that should make your printer happy!
Remove the Banner
To remove the ‘banner page’ that prints every time is easy:
- Click: System | Administration | Solaris LP Print Manager
- I just click ‘cancel’ on the first dialog box that pops up…
- Select your printer and click: Printer | Modify Printer Properties
- Under “Banner” select: Never Print Baner
- ‘Apply’, ‘Ok’, Good-2-Go.
Default to Letter-Size
How? (possibly feature not implemented yet)
Print Source Code with: printcpp
Here’s an awesome hack handed down from my former Professor and UNIX Zen-Master. This simple alias prints nicely formatted plain-text files from the command-line with normal ‘C/C++ style’ source-code syntax-highlighting. It’s also great for printing any text file in a hurry.
The first one is ‘portrait’ mode and the second is ‘landscape’ mode. You may have to tweak a little if your porting to a different UNIX/LINUX system, but I’ve always gotten it to work!
- See my prior post about installing more IPS repos!
- From IPS, select the ‘SunFreeware’ repo, possibly marked ‘Companion’ or ‘SFW’
- Grab the GNU “Enscrip”‘ package.
- Add some code to your .bashrc or .bash_aliases:
alias printcpp='enscript -M Letter -G -i 2 -f Courier8 -Ecpp -P myPrinterName'
alias printcpp2='enscript -M Letter -r -G -i 2 -f Courier8 -Ecpp -P myPrinterName'
- Pay-attention and be sure to substitute YOUR printer name for “myPrinterName”.
- $ source ~/.bashrc