SearchForecast Marketplace

Ubuntu Linux: Printing to a Non-Post Script Printer

Posted by: dragonblogger  //  Category: Internet, Technology, Ubuntu

One of the Laptops in my household was converted to an Ubuntu Hardy Heron (8.04) version release machine. The Toshiba Satellite model laptop did not have any drivers for Windows XP, and the laptop which sold for around $500 at Fry’s electronics does not have enough video or memory to make a good Windows Vista machine, so I thought it would be an excellent candidate for a Windows replacement box. After researching various choices, Ubuntu is the best by far. It is the most mature and easily converted to Operating System for non-Windows folks and has a superior array of software and features compared to other Linux flavors out there.

As with any UNIX operating system, many printer’s do not have driver’s for UNIX and UNIX machines typically only print to a Post Script enabled printer. I have a Canon MF3110 Multifunction printer. I don’t need my Ubuntu OS to do anything but printing, but there are no native drivers for it.

I have found numerous articles that help configure software for windows which allows you to share your printer and act as a port forwarder, where you setup a proxy printer through redmon and it translates Post Script to your regular printer. These instructions worked to the letter when performing them on Windows XP but were lacking when trying to setup a share with my Windows Vista Machine. These instructions say to use an Apple Laserwriter which doesn’t have drivers on Windows Vista, and also doesn’t include the extra registry entries needed for Vista to print properly.

http://home.comcast.net/~heretrythis/hp3100/psemuxp.html

But, with a combination of the above web site, and this web site. I was able to garner all the information to get my printer up and running.

http://searchwindowsserver.techtarget.com/tip/0,289483,sid68_gci1268897,00.html

So here are full blown instructions, including links to the 3 program files you need.

You will need GSView, GSMon and RedMon.

Many of the links to download these programs found in the above two websites are dead and no longer work. I found the website called filewatcher, which has links to any file for download and this site is excellent.
Either go to these 3 links directly, and if they don’t work, go to http://www.filewatcher.com directly and search for these 3 binary files manually. Click on any and all hyperlinks until you find the ones that are valid and let you save the file. (Files to search for: gsv46w32.exe, redmon17.zip, gs814w32.exe)

http://www.filewatcher.com/m/gs814w32.exe.7337472.0.0.html

ftp://mirror.cs.wisc.edu/pub/mirrors/ghost/ghostgum/redmon17.zip

http://www.filewatcher.com/m/gsv46w32.exe.1594368.0.0.html

  • Install GhostScript and GSView right off the bat. I installed everything to C: drive for simplest instructions I didn’t want to have to configure any more than I already had to.
  • Open a DOS window, and CD into the directory where GSview is installed. Make sure that the file “gsprint.exe” is located here. Type “notepad gsprint.cfg”, and create a file that looks like this:

-noquery

-color (optional – omit for B&W printers)

-printer
My Windows Printer

-ghostscript
“C:GSGS8.14BINGSWIN32C.EXE”

“My Windows Printer” is the name of your printer EXACTLY as it appears in Control Panel… Printers, and “C:GSGS8.14BINGSWIN32C.EXE” is the exact path and filename of the command-line executable for Ghostscript (your values for these two may be different – enter the correct values for your PC). Save this file, then run the following command:

  • Install the RedMon application
  • Create a New Printer, Select Local Port, Select Redirected Port, Set Port Name to RPT1: or anything similar. Note for Windows Vista, you must “Run As Administrator”->”Add Printer” you can’t select local port and a redirect port as a local admin.
  • Select the HP LaserJet 1200 PS (This will also exist in Ubuntu and work fine, there is no Apple Laser Writer to select for Windows Vista)
  • After creating the printer, edit the printer (again with “Run As Administrator”->”Properties”)
  • Configure the RPT1: port with the following information.

Redirect to program: C:GSGSVIEWGSPRINT.EXE
Arguments for program: – (a single dash, no spaces)
Output: Program handles output
Run as user: [ ] (unchecked)

  • Open REGEDIT32 (or just REGEDIT in Vista) and navigate to HKEY_CURRENT_USERSoftwareMicrosoftWindows NTCurrentVersiondevices.
  • In the right-hand pane, look for a REG_SZ value whose name is the printer you’re redirecting to (the same name you copied in Step 2),a value of something like winspool,Ne01:. Copy this information.
  • Navigate to HKEY_USERS.DEFAULTSoftwareMicrosoftWindows NTCurrentVersionDevices. Create a REG_SZ value with the same name and data. Note: This step is critical; without it, the redirector will not be able to see a printer to redirect output to. The key and its data should be recreated exactly.

This additional information provided by CSB who had trouble when the keys were in HKEY_USER:

  • Easiest thing is to just copy ALL of the printer info from HKEY_CURRENT_USER to HKEY_USERS/DEFAULT.
  • Close RegEdit.
  • Share your printer and name the share something simple like “laserjet”
  • Go ahead and test print with your new “HP LaserJet 1200 PS” printer, it should print out a test page fine.
  • In Ubuntu, you must have SAMBA installed and smb:// mount the printer. For Windows Vista, unless you have guest account access, you must have a valid user account to connect as.
  • You must have your firewall allow your Ubuntu or Unix Machine to connect to your Vista Machine.

These instructions should work for just about anyone running Vista or Windows XP (XP you can just do the instructions from this link and they work 100%, I already tested them 3 times)

http://home.comcast.net/~heretrythis/hp3100/psemuxp.html

If anyone has any problems or questions or needs assistance further, feel free to post a comment and leave me your email and I will respond to you.

Happy Printing

-Dragon Blogger

Related posts:

  1. Canon MF3110 Printing With Windows 7 64 Bit Using the Canon MF3110 Multifunction Printer with your Windows 7 64 bit Operating System is possible with the MF5730 drivers...
  2. Ubuntu YouTube to IPOD Part 1 – Downloading and converting YouTube Video’s to iPOD MP4 Format I have spent more than three days gathering and finding the best and most efficient way to download YouTube video’s...
  3. Mozilla Songbird – Managing your iPOD with Ubuntu Hardy Heron One of the laptops in my house is running Ubuntu Hardy Heron.  For those who don’t know this is a...
  4. Cloud Printing with Print By Email Hewlett-Packard announced Monday its ePrint platform and printers that will support email based printing, just send an email with a...
  5. Spaz One Adobe Air Twitter Client For Ubuntu Linux My wife’s company is now on Twitter @rockalong and I didn’t want my wife to have to keep using the web...


If you enjoyed this post, subscribe to DragonBlogger.com
via FaceBook, Twitter, RSS or Email
or
Enter your email and subscribe now!
Email:

Written by dragonblogger (1110 Articles Published)

Working in the IT Industry for over 10 years and specializing in web based technologies. Dragon Blogger has unique insights and opinions to how the internet and web technology works. An Avid movie fan, video game fan and fan of trying anything and everything new.

Follow dragonblogger on Twitter @dragonblogger

Tags: , , , , , , , , , , , , , , , , , , , , , ,

10 Responses to “Ubuntu Linux: Printing to a Non-Post Script Printer”

  1. aydun (1 comments) Says:

    Thanks for providing the registry hacks – and also for repeating the full instructions since the original details on comcast are currently unavailable.

    The backslashes in the DOS paths have been lost in your post. If you could edit those it would be easier to read.

    [Reply]

  2. Kim (4 comments) Says:

    I am trying to get redmon and ghostscript to work and I have Vista.

    I’m trying to configure like you did but am not sure how you go about adding the gsprint.cfg file in dos and I wondered if you could explain how you do that? I’ve tried opening notepad and adding a file gsprint.cfg but that didn’t seem to work. I went to the registry and there was no printer listed.

    [Reply]

  3. Dragon Blogger (2 comments) Says:

    Use Textpad or notepad.exe to edit the cfg file, note the printer won’t show up in the registry until you create it with add/remove printers.

    The exact step by step bullets I performed above work for me on my Windows Vista Business machine, tell me exactly what steps you have tried and which ones you specifically need help with.

    Dragon Bloggers last blog post..Review of Heroes Volume 4 Episode 7 – Cold Snap

    [Reply]

  4. Mark (4 comments) Says:

    Thanks for these steps. I manged to get this going in Windows 7 with a few tweaks. I’m sharing a Lexmark 6500 Series to my EeePC 700a running eeebuntu.

    1) In the config file, for the -ghostscript option, I didn’t use quotes (even though my path was in Program Files) and I had to have a blank line afterwards.

    2) To be able to use Add Printer and Printer Properties with Run as Administrator, I had to create shortcuts and run THEM as administrator.

    Add Printer:
    C:\Windows\System32\rundll32.exe printui.dll,PrintUIEntry /il
    Printer Properties
    C:\Windows\System32\rundll32.exe printui.dll,PrintUIEntry /nPrinterNameGoesHere /p

    For Printer Properties, be sure to replace PrinterNameGoesHere. I didn’t try with a printer that had spaces in the name, so I’m not sure if that’s a special case.

    3) The HP LaserJet 1200 PS wasn’t available in Windows 7, but I used HP LaserJet 2300 Series PS and it was available there and in Ubuntu and it seems to be working so far.

    4) When I went to the second registry location, my printer was already there with the correct value. I DID reboot after adding the printer and before checking the registry, so that may have something to do with it but I’m not sure.

    Thanks for the write up!

    [Reply]

    dragonblogger (1957 comments) Reply:

    Thanks for sharing your work on Windows 7. I am sure I will need to update this post as Windows 7 becomes more prevalent.

    [Reply]

  5. csb (2 comments) Says:

    I’ve been trying to set this up on Vista x86 SP1 for a couple hours now. I think I have everything set up as you explained, but I get this in the redmon log:

    RedMon – Redirection Port Monitor
    Copyright (C) 1997-2001, Ghostgum Software Pty Ltd. All Rights Reserved.
    2001-10-28 Version 1.7
    Environment:
    [snip]
    REDMON_PORT=RPT1:
    REDMON_JOB=32
    REDMON_PRINTER=printer
    REDMON_DOCNAME=gsprint.cfg
    REDMON_FILENAME=
    REDMON_SESSIONID=1

    REDMON StartDocPort: returning 1
    “C:\gsview\gsview\gsprint.exe” -
    Printer=printer
    JobId=32

    REDMON WriteThread: started
    Level=1
    DocumentName=”gsprint.cfg”
    OutputFile=”RPT1:”
    Datatype=”(null)”
    output=0 show=0 delay=300 runuser=0
    Copyright (C) 2003, Ghostgum Software Pty Ltd. All Rights Reserved.
    2003-09-03 gsprint 1.6
    Couldn’t open Windows GDI printer driver
    Printer name: “”
    REDMON check_process: process isn’t running.
    REDMON check_process: flushing child stdin to unblock WriteThread.

    REDMON WritePort: Process not running. Returning TRUE.
    Ignoring 24576 bytes

    REDMON Cancelling print job
    REDMON EndDocPort: starting

    Any idea what could be wrong?

    [Reply]

    dragonblogger (1957 comments) Reply:

    Do you get this error when trying to print?

    [Reply]

  6. csb (2 comments) Says:

    Yeah, that’s what was in the log file. I figured it out though. I copied the wrong printer information into HKEY_USERS. The error messages weren’t very helpful in pointing out the problem, so maybe this will help someone else. Easiest thing is to just copy ALL of the printer info from HKEY_CURRENT_USER to HKEY_USERS/DEFAULT. Then you can’t mess up like I did.

    [Reply]

    dragonblogger (1957 comments) Reply:

    Excellent info, I am going to cut from your comments and insert directly into the post.

    [Reply]

  7. forex-trader from cartridges (1 comments) Says:

    Thanks for the information. My last try to switch on linux lasted 1 year and ended because of printing problems on the ethernet network. Maybe your post will help me to solve that problems.
    forex-trader@cartridges´s last blog ..This printer drives me crazy! My ComLuv Profile

    [Reply]

Leave a Reply

CommentLuv Enabled

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.

Comments links could be nofollow free.