[Gambas-user] One line printing to a /dev/lp0 printer from local network

Vassilis K vkan53 at ...2300...
Tue Mar 16 19:41:29 CET 2010


Some months ago Doriano suggested the code for the printing of 1 line on
a parallel printer which is the following:

PUBLIC SUB bEktiposi_Click()
        DIM hPrinter AS File
        hPrinter = OPEN "/dev/lp0" FOR OUTPUT
        hPrinter.EndOfLine = gb.Windows
        PRINT #hPrinter, "test a line: "
        CLOSE hPrinter
END
(I had to add the lp group to the user vassilis)

I'm looking for the code for the printing of the same line from a PC in the local network.
I've tried:

PUBLIC SUB bEktiposi_Click()
        DIM hPrinter AS File
        hPrinter = OPEN "vassilis at ...2394.../dev/lp0" FOR OUTPUT
        hPrinter.EndOfLine = gb.Windows
        PRINT #hPrinter, "test a line: "
        CLOSE hPrinter
END

But it says: "Access forbiden"

I've made the printer shared and given to the /dev/lp0 file read - write permissions (for user-group and other)

Any ideas?





More information about the User mailing list