# Kycocera Mita FS-1010 Cups



## spanglefox (Oct 18, 2013)

Hi all,

Come across a little sticky problem.

I have a Kycoera Mita FS-1010 printer that I need to connect to CUPS. It is a parallel only printer. I have followed instructions from "CUPS on FreeBSD" article but failed to achieve any success.

CUPS functions OK on the affected machine as I can log on to the CUPS interface and access other network printers; however, under the option of Local Printer it is blank.

The only success is if I use `lptest > /dev/lpt0` it does print some jumbled text. I did try using the little PS programme as per the handbook but it just made the lights flash. I can also boot Ubuntu/Windows and that CUPS detects and prints fine from the printer.

Error log indicates that it can not access due to permissions, however, I have `add path 'lpt*' mode 0660 group cups` in the /etc/devfs.rules. 

FreeBSD version 9.1 p7 i386 and CUPS 1.5.4. I did wonder which shell $PATH is needed to be altered to point to /usr/local/bin/lpr. Is it root, logged in user?

Any further thoughts? Thanks in advance


----------



## wblock@ (Oct 18, 2013)

After changing /etc/devfs.rules, restart the service with `service devfs restart`.  But it may work better to just add those settings to /etc/devfs.conf.

The path is a problem for any user that will be printing.

It should also be pointed out that using CUPS is not required.  That printer appears to support reasonable page description languages, although not PostScript, so lpd(8) and Ghostscript will work: lpd Printing With FreeBSD.


----------



## spanglefox (Oct 23, 2013)

Many thanks. I also like your FreeBSD articles! Thanks for pointing me in their direction!

After following the instructions in your article I think I must be going wrong somewhere as I get 
	
	



```
%: Too many arguments
```
 is that possibly because I am using too many return, linefeed and formfeed instructions?

I also then get on a subsequent line 
	
	



```
lpr: stdin: empty input file
```
. 

Perhaps I am being thick but would having CUPS installed interfere with the lpd? (I made sure to disable the CUPS daemon however).

Or is it time that I moved on and looked at adding a filter? I did look up the printer at Kyocera's website and found that it doesn't appear to support PostScript. There were specific Linux PPDs (which I assume they meant for use in CUPS). I noted that when I used Ubuntu it used the Gutenprint driver, unsure if that is relevant.

Printers are not my area of expertise so many thanks once again for your help.


----------



## wblock@ (Oct 23, 2013)

Having CUPS installed but not running should not interfere.

Please show the entries in /etc/printcap and the commands that produced the errors above.


----------



## spanglefox (Oct 23, 2013)

Well I got _something_ to print. Just. I went back to the machine and /etc/printcap was strewn with typing errors and I corrected these.

I managed to `cat /etc/rc.conf | lpr`and the printer printed part of the file. I am assuming because no `\r\n\f` that it just saw the spaces as one long continued line?

However, the `% printf "This is a test\r\n\f\" | lpr` I still get both the errors. I also tried `%printf` just in case I misread the article and there was no space.

I edited the default /etc/printcap file and for brevity have omitted the hashed vales:


```
lp:\
	:lp=/dev/lpt0:\
	:sh:\
	:mx#0:\
	:sd=/var/spool/lpd/lp:\
	:lf=/var/log/lpd-errs:
```

Sadly the printer itself has defeated me by now blinking with red lights telling me there is a printer jam. I tried unjamming it and there is nothing there so I will have to wait to speak to its owner on Monday before I can attempt to print again.

Using a bit of logic I cat'd /var/spool/lpd/lp/status which did eventually state that the it was up and running and printing.

As a separate question once the printer is installed can it be shared by Samba? I am using the computer as a thin client for Remote Desktop Services and will need to share via Samba or be able to forward to a Remote Desktop Connection.


----------



## wblock@ (Oct 23, 2013)

spanglefox said:
			
		

> I managed to `cat /etc/rc.conf | lpr`and the printer printed part of the file.



Too much work, just use `lpr /etc/rc.conf`.



> I am assuming because no `\r\n\f` that it just saw the spaces as one long continued line?



Sorry, not sure what you mean there.



> However, the `% printf "This is a test\r\n\f\" | lpr` I still get both the errors. I also tried `%printf` just in case I misread the article and there was no space.



The % is a prompt.  Don't enter it.



> I edited the default /etc/printcap file and for brevity have omitted the hashed vales:
> 
> 
> ```
> ...



What do you mean by "hashed values"?  As pointed out in the article, this is really one long line, and comments can't be mixed into it.



> Using a bit of logic I cat'd /var/spool/lpd/lp/status which did eventually state that the it was up and running and printing.



Status can be checked with `lpc status`, although it sometimes does not accurately reflect what is happening.



> As a separate question once the printer is installed can it be shared by Samba? I am using the computer as a thin client for Remote Desktop Services and will need to share via Samba or be able to forward to a Remote Desktop Connection.



I think so.  Rather than going through the additional layer, I just set up Windows systems to print to network printers directly.  Even XP supports LPR for remote printers.


----------



## spanglefox (Oct 28, 2013)

Progress! Can print, of sorts, through `lpr file.plaintxt`. Managed to use `printf "This is a test\r\n\f\" | lpr` Although on subsequent prints it moves across the page and does not commence on the left hand side.

Obviously working too hard and blurry-eyed to not realise % was the prompt.....arrrggghhh.

This was the start of the hased values that I omitted in the printcap file. There are no hashed values in the printer definition:


```
#	@(#)printcap	5.3 (Berkeley) 6/30/90
# $FreeBSD: release/9.1.0/etc/printcap 130151 2004-06-06 11:46:29Z schweikh $

#
# This enables a simple local "raw" printer, hooked up to the first
# parallel port.  No kind of filtering is done, so everything you pass
# to the "lpr" command will be printed unmodified.
#
...etc
```

The `\r\n\f` relates to printing a text with more than one line. So in theory you could do `printf "Line 1 of text\r\n Line 2 of text\r\n\f" | lpr`?

Working now to configure Windows to pick up the printer. I found that LPR Monitor is required to be installed on Windows and a few guides online that should help me through.


----------



## wblock@ (Oct 28, 2013)

spanglefox said:
			
		

> Progress! Can print, of sorts, through `lpr file.plaintxt`. Managed to use `printf "This is a test\r\n\f\" | lpr` Although on subsequent prints it moves across the page and does not commence on the left hand side.



That's a little weird.  The \r should force a carriage return.



> This was the start of the hased values that I omitted in the printcap file. There are no hashed values in the printer definition:
> 
> 
> ```
> ...


The `\r\n\f` relates to printing a text with more than one line. So in theory you could do `printf "Line 1 of text\r\n Line 2 of text\r\n\f" | lpr`?

The comments in the printcap are not problem either way.



> Working now to configure Windows to pick up the printer. I found that LPR Monitor is required to be installed on Windows and a few guides online that should help me through.



But it is not.  I'll post a HowTo on doing it, one second...

Edit: it appears that even though you can select LPR as a protocol, it does not work on XP, only on XP Pro with the "Unix print services" installed.  As an alternate, I think you could run nc(1) listening on port 9100 and print direct to that from Windows.  Untested.  Or just print direct to the printer over the network at port 9100, if it has a print server.


----------



## spanglefox (Nov 13, 2013)

Many thanks for your help with this issue. Sadly I have had little time to progress this further with other jobs taking priority.

I am about to look at printing direct to the FreeBSD LPD printer using Windows and this support article http://support.microsoft.com/kb/2406880.

Will update on how I progress


----------



## spanglefox (Nov 21, 2013)

Sadly I have run out of development time with this and am copping out installing Ubuntu. 

Many thanks for your help and link to articles.


----------

