Using rdesktop to print from Windows to USB attached Sun Ray local printer

I tested out printing from Windows to a Sun Ray with a locally attached USB colour printer today. Everything worked perfectly.
I was using my laptop with Solaris 10 and SRSS 3.1 alpha as the Sun Ray server. The Sun Ray happened to be a Sun Ray 150 and the printer was an Epson Stylus Photo 870.
1. Get the printer working with Solaris.
I plugged in the printer and fired up the ‘printmgr’ gui to add it. When choosing the port in the gui I choose ‘other’ and cut and paste the path to the printer. The path looks something like this –
To find it, navigate to /tmp/SUNWut/units and then the mac address of the Sun Ray with the printer attached to it.
The exact Epson model is listed in the printmgr gui, so I selected it and the gui automatically selected the correct driver.
Once this was done, I could happily print to the printer from StarOffice or from the command line. My printer was called ‘test’, so this worked –
cat /etc/hosts | lp -d test
2. Get the printer printing output from Windows apps.
I installed rdesktop using the pkg-get tool from Blastwave. rdesktop is also available as a binary from Sun’s download site.
Also on my LAN was a Windows 2003 server with Terminal Services enabled.
On the Windows server I made sure that drivers for Apple PostScript printers were available and identified what looked like a color Apple Post Script printer driver. I don’t have the machine in front of me now, but the driver was called something like ‘Apple Color LaserWriter NT’.
I connected to the Windows server (called ‘windows’) from rdesktop with the following flags to map the printer (remember, the printer is called ‘test’ – [1]
rdesktop -r printer:test=”Apple Color Laser Writer NT II” windows
After that I could print perfectly, in colour, from Windows apps to the printer attached to the Sun Ray.
During the same testing time I also played with Tarantella Enterprise Edition for Solaris x86, which also worked flawlessly, printing from remote Windows and Unix sessions.
I’m impressed – it all worked very well. I could print stuff in Arabic, pictures, etc, etc, with no hitches.
[1] I’m fibbing slightly. The first time I tried it I used the model of the printer, rather than choosing a PostScript printer –
rdesktop -r printer:test=”Epson Stylus Photo 870 ESC/P 2″ windows
Printing didn’t work – the printer juddered, but nothing came out. You need Windows to be outputting PostScript, which Solaris then translates into the format the inkjet printer needs. Janos Cserep pointed me in the right direction.
To do this in Linux you’d need to install CUPS. We have an internal doc that describe the steps to take.

8 Responses to “Using rdesktop to print from Windows to USB attached Sun Ray local printer”

  1. gerard henry Says:

    fine to read this. Until now, i haven’t the same success. Can you precise exactly what you done on windows server, i want to be sure that it works if we don’t have access to windows server, and we have only access to a financial app (no notepad, no printers panel, nothing)

  2. Christopher Saul Says:

    Can you elaborate a bit more on what you’re trying to do?
    What do you mean by “i want to be sure that it works if we don’t have access to windows server, and we have only access to a financial app (no notepad, no printers panel, nothing)”
    I simply enabled Terminal Services on the Windows server and connected as a user, using the process described.

  3. gerard henry Says:

    i’ll try to explain (but sorry if my english is understable)
    i need access to a financial app on a windows server located on distant site. I can use rdesktop, hob, or winconnect, but i also need to print from acroread. If i use rdp client from microsoft under macosx, i can use local printers (and this printers are totally unknown for windows terminal server)
    one year ago, rdesktop can do the same thing. People said that i have to declare a network printer on WTS, but it’s impossible.
    So, if my explanations are clear, i just want to be sure that you did nothing on WTS to confirm that rdesktop can use local printers (even network printers?) with success.

  4. Christopher Saul Says:

    Pas de problemes! J’ai bien compris.
    I did not need to do anything on the Terminal Server to get printing to work through rdesktop – no need for network printers or suchlike. The -r printer flag as described above simply maps the terminal services session to my local Sun Ray printer. When I click print on Windows I get a choice of printers, I choose ‘my’ printer and it prints properly.
    I think this feature is relatively new to rdesktop.

  5. marty Says:

    How do you connect a sun ray to a network printer?
    I can’t find any information as to how to do that.

  6. Christopher Saul Says:

    You don’t need to connect the Sun Ray to a network printer. You would set the printer up on the network and then configure your Sun Ray server, Windows server, or whichever server to print to that server over the network.

  7. Andrea Jasperson Says:

    Thanks for this great post. You’ve got some really good info in your blog. If you get a chance, you can check out my blog on laser color printer at
    Andrea Jasperson

  8. Kevin Daneils Says:

    This Blog is really helpful to me. Its a learning experience. Hope everyone feels the same.
    Kevin Daneils

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: