Skip to contentSkip to conversation

Printing with Kernel 2.6.14.4

DISCUSSION [email protected] 5 participants 8 messages Mar 25, 2006 – Apr 5, 2006 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Thanks Ray,

Quoted 5 lines
Quoted 1 line

Doesn't 'cat filename.txt > /dev/lp0' work

no since /dev/lp0 is not an executable file.

Ok my mistake. It does work under su, however, not as sudo which I had tried only.

Quoted 2 lines

as I have a hazy recollection that some versions of Slackware associated lp1, not lp0, with the first parallel port.

It is lp0.

The reason I can't print not being connected with kernel 2.6.14 is, the way I see it, that there is no provision for a parallel port on "local printer" set-up, but only for "network printer".

May be I should try to fumble around the source, /usr/src/linux.

Regards

Peter

--------------------------------------------------------------------
mail2web - Check your email from the web at
http://mail2web.com/ .

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#1 lore raw
Quoted 20 lines · On 03-24, [email protected] wrote:

Thanks Ray,

Quoted 5 lines
Quoted 1 line

Doesn't 'cat filename.txt > /dev/lp0' work

no since /dev/lp0 is not an executable file.

Ok my mistake. It does work under su, however, not as sudo which I had tried only.

Quoted 2 lines

as I have a hazy recollection that some versions of Slackware associated lp1, not lp0, with the first parallel port.

It is lp0.

The reason I can't print not being connected with kernel 2.6.14 is, the way I see it, that there is no provision for a parallel port on "local printer" set-up, but only for "network printer".

Quoted 5 lines

May be I should try to fumble around the source, /usr/src/linux.

Regards

Peter

Greetings: You got my curiosity in gear: I installed
Slackware 10.2, (test26) and it's module library, full install except KDE, Tex or Games and hooked a Panasonic KX-P2123, Epson mode, printer; and booted...

After logging in as root; lsmod reported that parport_pc and
parport were both installed automatically..

Noting there was one txt file already in root I invoked 'cat
loadlin16c.txt > /dev/lp0' and it printed perfectly.. I created another txt file of all 60 lines and tried it too; AOK...

Since default Slack 10.2/26test is 2.6.13; something may have
happened when you bumped up from that?? I don't remember; maybe you're not using Slackware10.2 here?? As an aside; I've been trying to install SuSE 10.0 on the same machine, off and on for a week, to no avail.. Forget which 2.6 patch it defaults to...

At least I know Slack still works as expected.. I didn't go
any further than that...

Signature · 7 lines
    Hal - in Terra Alta, WV/US - Slackware GNU/Linux 10.1   (2.4.29)
.
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
author
#2 lore raw

Thanks Hal!

As I mentioned in another mail your suggestion of "cat file > /dev/lp0" works in root when there is no Internet connection. However, I cannot print when disconnected using "cat file | lpr". Giving lpq it will just sit doing nothing when not connected.

I installed kernel 2.6.13 and the above is the same. However, there is a provision for parallel port for local printer in gnome-cups-manager unlike in kernel 2.4.14.4 there is that provision only for Network printer. Beside the point with 2.6.13 I have no sound since module snd_via82xx can not be found. Beats me.

Regards

Signature · 7 lines
Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#3 lore raw
Quoted 3 lines · Peter

Thanks Hal!

As I mentioned in another mail your suggestion of "cat file > /dev/lp0" works in root when there is no Internet connection. However, I cannot print when disconnected using "cat file | lpr". Giving lpq it will just sit doing nothing when not connected.

Right. This is pretty consistent with the rest of what you have reported. The kernel driver itself works just fine (that's the piece that connects the device pseudofile /dev/lp0 to the parallel port, hence to the printer). But cupsd (the printer daemon that listens on UDP port 631 and/or a Unix port) is somehow misconfigured to require networking to be active.

One possibility is that your printer database (in /etc/printcap, the one lpr uses, or in /etc/cups/printers.conf, the one cupsd uses) is set to identify all printers, even local ones, as remote printers. This could cause them to become inaccessible if your network interface is not configured. You would fix this by fixing printcap &/or printers.conf ... I can't be more specific without seeing the actual contents of the files.

A more involved possibility is that for some reason you have cupsd set to listen only on the network interface's address and not also on localhost (I believe it defaults to listening on all interfaces, so this would be a local error; check /etc/cups/cupsd.conf). So if your networking is not active ... by which I mean eth0 (or perhaps ppp0) is not configured (which could happen if you get it configured via DHCP (or PPPoE) ... I don't know the details of your Internet connection, so I'm guessing pretty openly here) ... there is no place for cupsd to listen.

Check this with "netstat -ln |grep 631" to see what cupsd is listening on. Check this when you are not connected to the network (with the exact meaning of "not connected" being the state your host was in when it would not print). If cupsd is listening properly, you should see something about like this:

	udp        0      0 0.0.0.0:631             0.0.0.0:*

If you don't then your problem is a misconfiguration of CUPS and networking. I can't tell you how to fix this without seeing your system setup, but look at whatever init script starts cupsd, as well as cupsd.conf, to see if either is limiting the interfaces cupsd will listen on.

Depending on lpr expects about printers (from their printcap entries), it may also fail if there is nothing listening on port 515/tcp.

All of this really is just a bunch of guesses, though.

Quoted 1 line

I installed kernel 2.6.13 and the above is the same. However, there is a provision for parallel port for local printer in gnome-cups-manager unlike in kernel 2.4.14.4 there is that provision only for Network printer.

I'm a bit confused here, Peter. CUPS is a service for managing access to printers (an alternative to lpd), not part of a kernel. I can well imagine that the versions of Slackware that install the two kernels are different enough that they also have different versions of CUPS. But once more, this is NOT a kernel problem, at least not from what you are reporting about your tests.

Quoted 1 line

Beside the point with 2.6.13 I have no sound since module snd_via82xx can not be found. Beats me.

Are you using OSS or ALSA sound? From kernel source (I actually checked 2.6.11, not .13), the relevant OSS module appears to be SOUND_VIA82CXXX. But 2.6.x kernels are supposed to use ALSA sound, with the relevant name the one you list (snd-via82xx).

I'm not quite sure what your phrase "module snd_via82xx can not be found" means. Do you mean that the kernel fails to load it? Or that you yourself cannot find snd-via82xx.ko, by a manual search, in /lib/modules/2.6.13? Or that it is not listed in /lib/modules/2.6.13/modules.dep? Or something else?

You may need to check whether Slackware provides modules for precompiled kernels in multiple packages. I can't think of any other reason why a precompiled 2.6.x kernel should be missing this module. (Well, I suppose it could be compiled in directly, but then your sound should work ... and that's not a very usual practice except for embedded systems.

Quoted 2 lines

Regards

-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

author
#4 lore raw
Quoted 4 lines · On Mon, 27 Mar 2006 21:20:07 -0800 Ray Olszewski <[email protected]> wrote:
Quoted 3 lines · Peter

Thanks Hal!

As I mentioned in another mail your suggestion of "cat file > /dev/lp0"

works

Quoted 11 lines
Quoted 3 lines

in root when there is no Internet connection. However, I cannot print when disconnected using "cat file | lpr". Giving lpq it will just sit doing nothing when not connected.

Right. This is pretty consistent with the rest of what you have reported. The kernel driver itself works just fine (that's the piece that connects the device pseudofile /dev/lp0 to the parallel port, hence to the printer). But cupsd (the printer daemon that listens on UDP port 631 and/or a Unix port) is somehow misconfigured to require networking to be active.

Quoted 6 lines

One possibility is that your printer database (in /etc/printcap, the one lpr uses, or in /etc/cups/printers.conf, the one cupsd uses) is set to identify all printers, even local ones, as remote printers. This could cause them to become inaccessible if your network interface is not configured. You would fix this by fixing printcap &/or printers.conf ... I can't be more specific without seeing the actual contents of the files.

# Printer configuration file for CUPS v1.1.23
# Written by cupsd on Tue Mar 28 15:21:02 2006
<DefaultPrinter 24-Pin-Series>
Info 24-Pin-Series
DeviceURI epson:/dev/lp0
State Idle
Accepting Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
</Printer>

Quoted 8 lines

A more involved possibility is that for some reason you have cupsd set to listen only on the network interface's address and not also on localhost (I believe it defaults to listening on all interfaces, so this would be a local error; check /etc/cups/cupsd.conf). So if your networking is not active ... by which I mean eth0 (or perhaps ppp0) is not configured (which could happen if you get it configured via DHCP (or PPPoE) ... I don't know the details of your Internet connection, so I'm guessing pretty openly here) ... there is no place for cupsd to listen.

I have a broadband connection via DHCP

Quoted 5 lines

Check this with "netstat -ln |grep 631" to see what cupsd is listening on. Check this when you are not connected to the network (with the exact meaning of "not connected" being the state your host was in when it would not print). If cupsd is listening properly, you should see something about like this:

sudo /etc/rc.d/rc.inet1 stop

heisspf@~:$ netstat -ln |grep 631
tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN    
udp        0      0 0.0.0.0:631             0.0.0.0:*

sudo /etc/rc.d/rc.inet1 start

heisspf@~:$ netstat -ln |grep 631
tcp        0      0 0.0.0.0:631             0.0.0.0:*               LISTEN    
udp        0      0 0.0.0.0:631             0.0.0.0:*

There seems to be no difference

Quoted 7 lines
	udp        0      0 0.0.0.0:631             0.0.0.0:*

If you don't then your problem is a misconfiguration of CUPS and networking. I can't tell you how to fix this without seeing your system setup, but look at whatever init script starts cupsd, as well as cupsd.conf, to see if either is limiting the interfaces cupsd will listen on.

On separate mail I am sending to you /etc/rc.d/rc.cupsd as an attachment.

This is from cupsd.conf which I have never touched.

# Listen to (Port/Listen)
#
# Ports/addresses that are listened to. The default port 631 is reserved

# for the Internet Printing Protocol (IPP) and is what is used here.    
#                                                                     
# You can have multiple Port/Listen lines to listen to more than one
# port or address, or to restrict access.                         
#                                                               
# Note: Unfortunately, most web browsers don't support TLS or HTTP Upgrades   
# for encryption.  If you want to support web-based encryption you will     
# probably need to listen on port 443 (the "HTTPS" port...).              
#                                                                       
# ex: 631, myhost:80, 1.2.3.4:631                                      
#                                                                     
#    Port 80                                                         
#    Port 631                                                       
#    Listen hostname                                               
#    Listen hostname:80                                           
#    Listen hostname:631                                         
#    Listen 1.2.3.4                                             
#    Listen 1.2.3.4:631                                        
#                                                            
#Port 631                                                   

Listen *:631

Quoted 7 lines

Depending on lpr expects about printers (from their printcap entries), it may also fail if there is nothing listening on port 515/tcp.

All of this really is just a bunch of guesses, though.

Quoted 2 lines

I installed kernel 2.6.13 and the above is the same. However, there is a provision for parallel port for local printer in gnome-cups-manager unlike

in

Quoted 1 line
Quoted 1 line

kernel 2.4.14.4 there is that provision only for Network printer.

This does not hold any longer after I enabled paraport_pc and lp modules in rc.modules.

Quoted 9 lines

I'm a bit confused here, Peter. CUPS is a service for managing access to printers (an alternative to lpd), not part of a kernel. I can well imagine that the versions of Slackware that install the two kernels are different enough that they also have different versions of CUPS. But once more, this is NOT a kernel problem, at least not from what you are reporting about your tests.

Quoted 2 lines

Beside the
point with 2.6.13 I have no sound since module snd_via82xx can not be

found.

Quoted 6 lines
Quoted 1 line

Beats me.

Are you using OSS or ALSA sound? From kernel source (I actually checked 2.6.11, not .13), the relevant OSS module appears to be SOUND_VIA82CXXX. But 2.6.x kernels are supposed to use ALSA sound, with the relevant name the one you list (snd-via82xx).

I am using ALSA

Quoted 5 lines

I'm not quite sure what your phrase "module snd_via82xx can not be found" means. Do you mean that the kernel fails to load it? Or that you yourself cannot find snd-via82xx.ko, by a manual search, in /lib/modules/2.6.13? Or that it is not listed in /lib/modules/2.6.13/modules.dep? Or something else?

That is the message on booting. FATAL failed to load module snd_via82xx

Quoted 6 lines

You may need to check whether Slackware provides modules for precompiled kernels in multiple packages. I can't think of any other reason why a precompiled 2.6.x kernel should be missing this module. (Well, I suppose it could be compiled in directly, but then your sound should work ... and that's not a very usual practice except for embedded systems.

I just went back to kernel 2.6.14.4 where all snd.... modules are loaded.

Regards
Peter

Signature · 6 lines
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

A message that is not in the archive (sent off-list or not yet received): [email protected]

author
#6 lore raw
Quoted 8 lines · On Tue, 28 Mar 2006 07:42:21 -0500 David Fierbaugh <[email protected]> wrote:

With cups apparently running, and root having the ability to print manually,

try configuring your printer with cups web based tool.

Point your favorite web browser to 'http://localhost:631/'. This should open

cups configuration. The login will probably be root and your root password, this can be changed later, after you get printing working. From there you

can

Quoted 4 lines

add/change/delete printers and their settings. You can also print test pages

from cups once you've got a printer setup correctly.

Thanks!
I have done all this. Now I tried it again adding a new printer, then w/o being connected to print a test. It will just sit and wait and wait. So I closed the page http://localhost:631/admin and tried to open it again w/o being connected. The result was the machine froze, keyboard, second hand on clock and I had to do a reset.

Regards

Signature · 6 lines
Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
#7 lore raw

Problems with Scanner class in Blackdown JDK

In reply to Ray Olszewski

I'm currently using the most recent release of the Gentoo kernel, version 2.6.15. The JDK I am using is Blackdown 1.4.2.03.

Right now I'm taking a college java course, and I'm trying to get my java up and running so I can do homework outside of the labs. The IDE I am supposed to be using for the class is Bluej (which I have installed), although I have duplicated the problems I have been having on Netbeans as well.

Basic java programs seem to compile just fine, but I have trouble whenever I try to use certain import statements, specifically with the Scanner class. For example:

import java.util.Scanner;
(error message: cannot resolve symbol - class
Scanner)

-- the same error message occurs with
import java.util.*;

This class is VERY important to have for my course, as a large number of the projects we have utilize it. The course I'm taking uses it to get keyboard input. (example: Scanner keyboard = new Scanner(System.in);
int exampleInt = keyboard.nextInt(); // reads in an
integer using the new Scanner object, keyboard)

The computers at the campus labs are Windows-based. However, java is very portable, and I have no problems writing a program in the Linux Bluej, then e-mailing it to myself and opening in the Windows Bluej on campus. The programs written in Linux compile in Windows, even when they don't compile in Linux. While I can still keep doing it this way, it would be nice to be able to test and debug my projects BEFORE I get to class, if you know what I mean.

-- Does anyone have a suggestions as to why I might be getting this message?
-- I know that Java is fairly portable, but is it possible that the Scanner class is not available for Linux?

A bit of info:

mycomputer / # java-config -v #version of JVM
java version "1.4.2-03"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-03)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-03, mixed mode)

Any help would be appreciated. Thanks!

Mac

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs

#8 lore raw

Re: Problems with Scanner class in Blackdown JDK

Quoted 55 lines · Mac

I'm currently using the most recent release of the Gentoo kernel, version 2.6.15. The JDK I am using is Blackdown 1.4.2.03.

Right now I'm taking a college java course, and I'm trying to get my java up and running so I can do homework outside of the labs. The IDE I am supposed to be using for the class is Bluej (which I have installed), although I have duplicated the problems I have been having on Netbeans as well.

Basic java programs seem to compile just fine, but I have trouble whenever I try to use certain import statements, specifically with the Scanner class. For example:

import java.util.Scanner;
(error message: cannot resolve symbol - class
Scanner)

-- the same error message occurs with
import java.util.*;

This class is VERY important to have for my course, as a large number of the projects we have utilize it. The course I'm taking uses it to get keyboard input. (example: Scanner keyboard = new Scanner(System.in);
int exampleInt = keyboard.nextInt(); // reads in an
integer using the new Scanner object, keyboard)

The computers at the campus labs are Windows-based. However, java is very portable, and I have no problems writing a program in the Linux Bluej, then e-mailing it to myself and opening in the Windows Bluej on campus. The programs written in Linux compile in Windows, even when they don't compile in Linux. While I can still keep doing it this way, it would be nice to be able to test and debug my projects BEFORE I get to class, if you know what I mean.

-- Does anyone have a suggestions as to why I might be getting this message?
-- I know that Java is fairly portable, but is it possible that the Scanner class is not available for Linux?

A bit of info:

mycomputer / # java-config -v #version of JVM
java version "1.4.2-03"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.4.2-03)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-03, mixed mode)

Quoted 3 lines

Any help would be appreciated. Thanks!

Mac

Try Sun's JDK.

--
Yawar
Malaysia +60 (12) 918 6642
Bangladesh +880 (174) 614 754 or +880 (2) 882 1848 or +880 (175) 003 706 or +880 (189) 250 170
-
To unsubscribe from this list: send the line "unsubscribe linux-newbie" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs