There was recently a fix I committed to jetpipe.  Not sure if it's made
it yet.

Here's the new jetpipe, replace your current one with this one, and back
out your shell script loop part, see if this works.

import socket
import sys

# Print usage information
if len(sys.argv)!=3:
    print 'Usage: jetpipe <printerdevice> <port>'
    sys.exit(0)

# Wait for a job on <port> to forward to <printerdevice>
def listen(s):
    conn, addr = s.accept()
    while 1:
        data = conn.recv(1024)
        if not data: break
        p = open(sys.argv[1], 'wb')
        p.write(data)
        p.flush()
        p.close()
    conn.close()

# Rewspawn eternally
if __name__ == "__main__":
    jetpipe = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
    jetpipe.bind(('', int(sys.argv[2])))
    jetpipe.listen(1)

    while 1:
        listen(jetpipe)


** Changed in: ltsp (Ubuntu)
     Assignee: (unassigned) => Scott Balneaves
       Status: New => Confirmed

-- 
[ltsp] printer prints only once
https://bugs.launchpad.net/bugs/130472
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to