[Gambas-user] How to sent a line line to a lp1 printer and form to lp0 printer directly.
Doriano Blengino
doriano.blengino at ...1909...
Thu Sep 24 22:47:08 CEST 2009
Vassilis K ha scritto:
> Is there any chance to find out why I get the message:
> Access forbidden at the following Sub? And of course to make it work?
> PUBLIC SUB bEktiposi_Click()
> DIM hPrinter AS Printer
> DIM hFile AS File
> hPrinter = OPEN "dev/lp1" FOR OUTPUT
> hPrinter.EndOfLine = gb.Windows
> PRINT #hFile, "test a line: ";
> CLOSE hPrinter
> END
>
> It is compiled but it stops when bEtiposi Button is clicked
> at line :
> hPrinter = OPEN "dev/lp1" FOR OUTPUT
> with the message:
> " Access Forbidden. "
>
Open a console; log in as root; issue:
chmod a+w /dev/lp1
and it's done (it gives write permission to every user).
Perhaps not the best method, but quick to see if all the rest is ok.
Regards,
--
Doriano Blengino
"Listen twice before you speak.
This is why we have two ears, but only one mouth."
More information about the User
mailing list