This is the first time iam dealing with printers on linux and so
have a limited knowledge.I will be controlling a printer attached to
the printer port.Now with the docs i have been going throught on the
net, these are some of the ways i summed up :
1.Users can directly use lpr - but i want to control it from my
2.Using the lpd daemon - making a connection to the port on which the
daemon is running.Iam not totally clear about the functions of lpr and
lpd, and if at all this suitable for my case, how is it done ?
3.Use the /dev/lpx device - open the device and read and write like a
normal file and also use the IOCTLS.I dont have the IOCTLS list for
the printer.Maybe this is the right thing in my case to do.How can i
check whether a printer is configured/attached to my computer?Point me
to some examples if possible.
4.Directly accessing the port by ioperm or /dev/port as mentioned in
IO-port programming.I think this is mostly required if iam trying to
control some other device from the parallel port.But in my case its a
printer.So i guess this low level access can be used but is not
There maybe many other ways also(like i read that we can use the
printer using the termios calls too,dont know how thats done,unless
ofcourse my printer is connected to the serial port), iam in a dillema
as to which one is suitable in my case.I also need to do some control
like checking whether printer is ONLINE/OFFLINE/BUSY or is configured
or not and whether attached or not etc.
Any help will be highly appreciated.