I have used a Sun-Ray local USB attached printer in two ways.


Precondition: The printer was using Postscript rendering.
The printer had its own rendering engine.
The printer was *NOT* a dumb windows-driver dependant printer.


1) Printing from Solaris.

Set up a solaris printqueue with

lpadmin -p printername -v " sunray devicename" -I postscript -T PS -m printermodel


This will use the solaris lpfilter mechanism to convert the printdata to postcscript protocoll.




2) Printing from Windows.

Set up a solaris printqueue with

lpadmin -p printername -v " sunray devicename" -m printermodel

Set up the windows printer with a working windows Postscript driver.

The windows included hplaserjet-postscript driver works. for a hplaserjet printer.
or any printer emulating the HPlaserjet like many Xerox printers do,

This setup will generate the Postscript protocol on the windows PC , and it will merely
"pass-though" the Solaris spooler without change.



So if you need to print from both the SR server and the windows PC you need to define two spooler queues for each printer. Below are two scripts that have existed in various versions on sun-rays.org that I enhanced a bit and ran from the VDI superstructure to make it do what I wanted. For windows printing you then need to pass the printername as an argument to the "uttsc" startup command.

uttsc ......... -r printer $printername .........



*Scriptet set-printer.sh*



#!/bin/sh

MACAddr=`ls -l $UTDEVROOT | sed 's/.*\.//'`

PrinterName=$MACAddr

PrinterPath=`ls /tmp/SUNWut/units/IEEE802.$MACAddr/dev/printers/* 2>/dev/null|head -1`


if [ -n "$PrinterPath" ] ; then

cat <<.>$HOME/.printers

_default $PrinterName

.

Message="Current Printer: $PrinterName"

else

Message="No printer assigned"

fi


# Add or remove the printer to the Solaris spooler (choose only the first printer)

if [ -d /etc/lp/printers/$PrinterName ]; then

if [ -z "$PrinterPath" ]; then

pfexec /usr/sbin/lpadmin -x $PrinterName

fi

else

pfexec /usr/sbin/lpadmin -p $PrinterName -v $PrinterPath -A none -o media=A4 -o banner=never -I postscript -T PS -u allow:all

pfexec /usr/bin/enable $PrinterName

pfexec /usr/sbin/accept $PrinterName

fi


zenity --info –text="$Message"





*set-printer.sh scriptet för Passthrough printing from a windows PC.
*



#!/bin/sh

MACAddr=`ls -l $UTDEVROOT | sed 's/.*\.//'`

PrinterName=$MACAddr

PrinterPath=`ls /tmp/SUNWut/units/IEEE802.$MACAddr/dev/printers/* 2>/dev/null|head -1`


if [ -n "$PrinterPath" ] ; then

cat <<.>$HOME/.printers

_default $PrinterName

.

Message="Current Printer: $PrinterName"

else

Message="No printer assigned"

fi


# Add or remove the printer to the Solaris spooler (choose only the first printer)

if [ -d /etc/lp/printers/$PrinterName ]; then

if [ -z "$PrinterPath" ]; then

pfexec /usr/sbin/lpadmin -x $PrinterName

fi

else

pfexec /usr/sbin/lpadmin -p $PrinterName -v $PrinterPath -A none -o media=A4 -o banner=never -I any -u allow:all

pfexec /usr/bin/enable $PrinterName

pfexec /usr/sbin/accept $PrinterName

fi

zenity --info –text="$Message"

//Lars

=====================================

[email protected] skrev:
 Environment:

Solaris 10 5/09 s10x_u7wos_08 X86
SRSS 4.2
Follow-me-kiosk-printing from ThinkThin
Mitel UIC kiosk session for telephony integration
meta kiosk for data session selection started by Mitel kiosk session
Sun Ray 2 connected through a Linksys 100mbit switch to a Linksys router to a 
Comcast cable modem

Observations:

Printer is plugged into SR2 front USB port and is recognized by SRSS.
Device node is created in 
/tmp/SUNWut/units//tmp/SUNWut/units/IEEE802.00144fa81d96/dev/printers/HPCN72F1N2HQ04SM:

ls -lah /tmp/SUNWut/units/IEEE802.00144fa81d96/dev/printers/HPCN72F1N2HQ04SM
lrwxrwxrwx   1 root     root          45 Jan 26 14:01 
/tmp/SUNWut/units/IEEE802.00144fa81d96/dev/printers/HPCN72F1N2HQ04SM -> 
../../devices/u...@1/HP,deskjet_d1300_ser...@2

:ls -lah /tmp/SUNWut/units/IEEE802.00144fa81d96/devices/u...@1
total 16
drwxr-xr-x   2 root     root         199 Jan 26 14:01 .
drwxr-xr-x   3 root     root         244 Jan 26 13:54 ..
crw-------   1 utku148  root     231, 131072 Jan 26 14:01 
HP,deskjet_d1300_ser...@2

>From kiosk mode xterm, I can see that the utku* user's home directory contains 
a properly formatted .printers file:

:cat .printers
SR-Default 00144fa81d96
_all SR-Default

Problem:

I can run 'lp -d SR-Default /etc/motd' and see the job via lpstat -t
After a few seconds, I see an error message:
"Failed to open the printer port. (Permission denied)"

>From a uttsc kiosk session connecting to Windows Server 2003, I can see that 
the SR-Default print queue has been
passed to Windows. I can create a file with notepad.exe and print to the 
SR-Default printer. With lpstat -t, I can see the job arrive
at the Sun Ray server. After about 30 seconds, I see the same error message as 
before.

Any suggestions, RTFM's, etc gratefully appreciated. I got this far early this 
morning and have made not progress since and I'm out if ideas, patience, etc.

Thanks!

Art Peck
[email protected]



------------------------------------------------------------------------

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

_______________________________________________
SunRay-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/sunray-users

Reply via email to