If you plan to build a web-based point-of-sale system with this, then also add the www-data user to that group. If your username was bob, you would add yourself to this group using: sudo usermod -a -G lp bob This file is owned by group lp (“line printer”). Size: 0 Blocks: 0 IO Block: 4096 character special fileĭevice: 5h/5d Inode: 220997 Links: 1 Device type: b4,1Īccess: (0660/crw-rw-) Uid: ( 0/ root) Gid: ( 7/ lp) Which will show output something like: File: ‘/dev/usb/lp1’ The next step is to see if you can write to it: echo "Hello" > /dev/usb/lp1Ĭhances are, you will get a permission denied error at this point, so find out what group the printer is in: stat /dev/usb/lp1 Find the new device file under /dev/usb: ls /dev/usb This kernel module makes your printer visible as a device file, so that it can be accessed in the old-fashioned way. usblp 8-4:1.0: usblp1: USB Bidirectional printer dev 5 if 0 alt 0 proto 2 vid 0x04B8 pid 0x0E03 usb 8-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 8-4: New USB device found, idVendor=04b8, idProduct=0e03 usb 8-4: new full-speed USB device number 5 using ohci-pci Plug in your printer, and check that usblp sees it: dmesg The directions below are for Debian, but could be adapted for any other Linux.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |