I like to connect to a printer connected to CUPS

Talk about how to use and get the most out of Activities for the XO.

I like to connect to a printer connected to CUPS

Postby intrader » Wed Oct 06, 2010 5:04 pm

1. My cups server responds at uri 192.168.0.100:631
2. What command do I use to make the printer attached to the CUPS server connect to printer?
3. Mostly I would like to print receipts, tickets etc. while browsing with firefox

Thanks
intrader
 
Posts: 71
Joined: Tue Jan 01, 2008 6:45 pm

Re: I like to connect to a printer connected to CUPS

Postby ncarrol » Thu Oct 07, 2010 10:47 am

Here are a couple of threads about cups printing from XO:

Very basic text:
http://www.olpcnews.com/forum/index.php?topic=4867.msg32366#msg32366

Example of full advanced features:
http://www.olpcnews.com/forum/index.php?topic=4869.0

The basic route gets most of what I want.
ncarrol
 
Posts: 367
Joined: Mon Aug 25, 2008 12:38 am

Re: I like to connect to a printer connected to CUPS

Postby intrader » Thu Oct 07, 2010 7:58 pm

I have done the ghostscript and cups installs but I don't know what to do next. Perhaps need to set up a /swap partition mounted on an sd card - however, I an unsure on how to do this.
Thanks
intrader
 
Posts: 71
Joined: Tue Jan 01, 2008 6:45 pm

Re: I like to connect to a printer connected to CUPS

Postby ncarrol » Fri Oct 08, 2010 12:54 am

Follow the first link. Use a browser for http://localhost:631/admin to run cups printer manager. There you select a printer ; configure it; and set it to default. Then in terminal you can use the various forms of the print (lpt) command. This assumes that you can use one of the built-in printers. If you need a printer other than the built-in printers, follow the second link. Often, your printer can use one of the built-in printers types for printing text.

You may have to temporarily set a password for root as Anna has done when using Firefox as the browser for running cups manager. Follow the old link by dinky to see an example for configuring a HP LaserJet in cups manager. If you use Firefox, use Anna's info for printing from Firefox.

For a a specific printer, you will need a printer definition file and probably filter/conversion file as shown in Anna'a example for the Samsung printer.

Finally, if your printer is an HP, follow E. Owen's post to get hpji to supply the printer definition file. (first link).

Good luck !
ncarrol
 
Posts: 367
Joined: Mon Aug 25, 2008 12:38 am

Re: I like to connect to a printer connected to CUPS

Postby ncarrol » Fri Oct 08, 2010 11:38 am

OOPS ! The linux print command is "lp"
You can also use your address http://192.168.0.100:631/admin for the cups print manager (if that is your computer IP address on your local area / home network).

Here is the link for the old dinky post for basic printing using cups and selecting one of the built-in printer definition files that is the closest to your printer make / model:
http://www.olpcnews.com/forum/index.php?topic=2425.0
ncarrol
 
Posts: 367
Joined: Mon Aug 25, 2008 12:38 am

Re: I like to connect to a printer connected to CUPS

Postby intrader » Fri Oct 08, 2010 2:28 pm

Thanks for the help so far.
I have gotten http://localhost:631/Admin to work andI see the printer and have printed a tet page.

When I try to print from firefox the printer selection menu appears with the apprpriate cups printer as a selection. However, can' select it and the dialog hangs for more than 5 minutes.

I will try another activity.
intrader
 
Posts: 71
Joined: Tue Jan 01, 2008 6:45 pm

Re: I like to connect to a printer connected to CUPS

Postby intrader » Fri Oct 08, 2010 2:38 pm

I used Write and 'keep' but I don't know where the file is. On the teminall I crte a file, then try `lp`.
It tells me that is does not know the default printer.
intrader
 
Posts: 71
Joined: Tue Jan 01, 2008 6:45 pm

Re: I like to connect to a printer connected to CUPS

Postby ncarrol » Fri Oct 08, 2010 6:55 pm

Please check that you have set your printer to the default printer in the cups print manager -- there is a menu item. You should be able to create a simple text file and print it in Terminal Activity. You may need to become "su" user.

As to Write Activity: the file is stored in Journal datastore. The file names in datastore are not directly recognizable. That is why dinky saved the Write files to a USB drive -- this saving process does give recognizable names on the USB drive (simple drive -- not set for swap).

Can not help with Firefox -- hope setting default printer helps.

If setting your printer to default does not help, this has appearance of a user authorization problem. Try dinky's trick to remove the need for authorization by editing the cups configuration file (reboot after changing).

This is all I can offer. The experts appear to be Anna and EddieOwens.
ncarrol
 
Posts: 367
Joined: Mon Aug 25, 2008 12:38 am

Re: I like to connect to a printer connected to CUPS

Postby intrader » Fri Oct 08, 2010 7:54 pm

The main problem is that when I print from firefox the dialog prrsented hangs - perhaps it wants to log into CUPS
The configuration file does not follow the implied section shared above; it uses XML-like keys instead.
intrader
 
Posts: 71
Joined: Tue Jan 01, 2008 6:45 pm

Re: I like to connect to a printer connected to CUPS

Postby intrader » Fri Oct 08, 2010 8:35 pm

Unfortunately my memory and lack of hacking skills do not allow me to log in to cups.Can you help/
intrader
 
Posts: 71
Joined: Tue Jan 01, 2008 6:45 pm

Re: I like to connect to a printer connected to CUPS

Postby ncarrol » Fri Oct 08, 2010 11:10 pm

????????????
Not sure what you are asking -- see second link near bottom --- starting service cups and setting password when using Foxfire browser : http://localhost:631/admin .

If you are using the Browse Activity you may have to edit the cupsd.confg as described in the first link.
ncarrol
 
Posts: 367
Joined: Mon Aug 25, 2008 12:38 am

Re: I like to connect to a printer connected to CUPS

Postby intrader » Sat Oct 09, 2010 12:53 pm

1. The CUPS admini is asking for usernme and password - I can't remember the password. So I am unable to set the printer as default as it requires password.
2. When I print from firefox a dialog appears presenting me with tw choices 'Print to file', and the CUPS printer (prperly identified). However the dialog does not allow me t selct anything of click on the cancel or print button. after a while the dialog disappers - I think that the dialog is trying to log into the printer
3/ the description of the '# commenttng ' of loging in the cups configuraton file is no helpful as I dont find the section. The iinfo is in some sort of xml
Thanks for tour help. I think that when I get thorugh the password hurdle it will work
intrader
 
Posts: 71
Joined: Tue Jan 01, 2008 6:45 pm

Re: I like to connect to a printer connected to CUPS

Postby ncarrol » Sat Oct 09, 2010 11:30 pm

If you happened to mimic Anna's example, she used : user/password of root/root .
ncarrol
 
Posts: 367
Joined: Mon Aug 25, 2008 12:38 am

Re: I like to connect to a printer connected to CUPS

Postby intrader » Sun Oct 10, 2010 1:29 am

unfortunately I used different user and password and I don't remember the pass word
intrader
 
Posts: 71
Joined: Tue Jan 01, 2008 6:45 pm

Re: I like to connect to a printer connected to CUPS

Postby ncarrol » Sun Oct 10, 2010 6:24 pm

Change password:

linux command: "passwd --help" look at option -d i.e., delete password
"passwd -d username" you must be "root" user (i.e., su in terminal) to do this.
"passwd password" while logged into username account to set password.
The "root" is the default user for the printing unless you specify otherwise. Look at variations of lp or lpr (via ? , -h, or --help)
ncarrol
 
Posts: 367
Joined: Mon Aug 25, 2008 12:38 am


Return to Activities / Software

Who is online

Users browsing this forum: No registered users and 2 guests