If you have a printer connected to a terminal with LTSP 5 and Debian Etch you 
will be disappointed. It will not work. If, as me, you used LTSP (<= 4.2) for 
years with no such problems you can get really mad. Nevertheless I honestly 
like LTSP & Debian.

I googled around and found that there maybe is a licence problem with the 
print server application "lp_server". I also found this statement from 
Vagrant Cascadian: "... as we had to remove lp_server due to unclear 
copyright licensing ..." 
(http://lists.alioth.debian.org/pipermail/pkg-ltsp-devel/2006-November/000462.html).

For me it looks like that lp_server is a fork from p910nd (author: Ken Yap, 
see http://www.etherboot.org/p910nd/), but I am not really sure. 

There are some debian lp_server packages around but nothing created for etch 
(so far as I can see).

I tried to use cups at the terminal with no success (you need rw access and I 
want to keep my terminal file system as small as possible).

I have to get my printer working as soon as possible. Here is my (very dirty) 
solution (ONLY for i386 clients):

A.) Copy the lp_server file to your client file system.

I got the lp_server sources from ltsp.org (via the LTSP 4.2 LBE) and compiled 
them for i386 (etch -  architecture).

Do this for yourself or get it here:  http://www.jumako.de/transfer/lp_server

Copy lp_server to /sbin in your client (!!!) file system (for me it 
is: /opt/ltsp/i386/sbin/lp_server). 

If you copy from the above url, you do this on your own risk. I am not 
responsible for any damage to your computer.

B.) Modify start_printer

You have to patch the script start_printer (for me it 
is: /opt/ltsp/i386/usr/lib/ltsp/startprinter). 
There is a line with 

". /etc/ltsp_functions"

you have to change this line to 

".  /usr/lib/ltsp/ltsp_functions"

(without quotations marks)

C.) Modify ltsp-client-setup

You have to enable printing in ltsp-client-setup (for me it 
is: /opt/ltsp/i386/etc/init.d/ltsp-client-setup). 

Before the function

configure_syslog() {
    cat <<EOF > /etc/syslog.conf
*.* @${SYSLOG_HOST-$SERVER}
EOF
}

paste this 6 lines: 

configure_printer() {
   for prn_dev in $(env | awk -F= '$1 ~ /^PRINTER_[0-9]_DEVICE/ { print 
$1 }'); do
       prn_no=`echo $prn_dev | cut -f2 -d'_'`
       /usr/lib/ltsp/start_printer $prn_no &
   done
}

And in the same file before the line

configure_syslog || true 

paste this line

configure_printer || true

I've got this informations from:
"https://launchpad.net/ubuntu/+source/ltsp/+bug/93863/comments/1";

D.) lts.conf

Enable a printer in your lts.conf. For me it looks like that:

[XX:XX:XX:XX:XX:XX]
PRINTER_0_DEVICE    = /dev/usb/lp0
PRINTER_0_TYPE      = U              # P-Parallel, S-Serial, U-USB
PRINTER_0_PORT      = 9100           # tcp/ip port: defaults to 9100
PRINTER_0_WRITE_ONLY = Y

Where XX:XX ... is the IP of your workstation. 

E.) Forgiveness

Forgive my ugly patches. 

Forgive me not to build a debian package. I think that the LTSP and/or the 
Debian and/or Ubuntu people will find (or have?) a perfect solution.

On special demand I will create debian lp_server packages (i386 and/or amd64). 

-- 

So long!

Jumako

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to