How to add a printer NOT in the list?

Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
Paul-in-Devon-UK
Level 1
Level 1
Posts: 19
Joined: Sat Apr 14, 2007 3:25 pm

How to add a printer NOT in the list?

Post by Paul-in-Devon-UK »

I have a Canon iP4200 running off an XP machine. I can 'see' the printer and print to it.

The down side is that there was no iP4200 to pick in the 'Add Printer' list so I gambled on the iP4000 driver as it seemed the closest match. Well it 'sort of' works in as much as I can get ink on the paper but the output is far from satisfactory.

I went to the HP site and downloaded the only Linux drivers available. The files I now have are;

cnijfilter-common-2.60-1.src.rpm
cnijfilter-common-2.60-1.i386.rpm
cnijfilter-ip4200-2.60-1.i386.rpm
cnijfilter-ip4200-lprng-2.60-1.i386.rpm

My problem is - What on earth do I do next?

I tried looking at the properties of the iP4000 and clicking on the Install Driver button but when I select one of the above I am advised that I must select a PPD file. Double clicking on the .rpm file will not open it to view the contents.

Any advice would be appreciated.
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Husse

Post by Husse »

Welcome to Mint, Paul-in-Devon-UK
I think I know where you live :)
What's happened to you is a bit of the backside of Linux.
Installing a deb package in a debian based distro is piece of cake. Mint is based on Ubuntu which is based on Debian and they all use .deb and apt-get.
You have downloaded rpm packages that are for Red hat. The best would be if you could download a .deb package but you can't.
So:
Fire up "Synaptics" and install "alien". Alien can convert between deb and rpm and also tgz.
When alien is installed run the following command:
sudo alien -i cnijfilter-ip4200-2.60-1.i386.rpm
The above command will unpack the rpm package into a directory, create a deb package and then install it on your system. Of course, you can uninstall the package at a later date by using the relevent dpkg command.
You can find out more here:
http://linuxhelp.blogspot.com/2005/06/c ... d-tgz.html
I can't guarantee that it's the right driver, you have to check that, but it seems so
Paul-in-Devon-UK
Level 1
Level 1
Posts: 19
Joined: Sat Apr 14, 2007 3:25 pm

Post by Paul-in-Devon-UK »

Husse, WOW - speedy and concise response.

Are we surprised that it did not work? I followed the instructions and got this output

Code: Select all

paul@Sandbox:~/Temp$ sudo alien -i cnijfilter-ip4200-2.60-1.i386.rpm
Password:
Warning: Skipping conversion of scripts in package cnijfilter-ip4200: postinst postrm
Warning: Use the --scripts parameter to include the scripts.
hostname: Unknown host
hostname: Unknown host
paul@Sandbox:~/Temp$ ls
I would guess the scripts error is one to ignore as this is nor an RPM type distro.

I looked at the driver properties but no iP4200 listed. I selected a different make and switched back just in case the system needed to re-read a file. No luck.

Maybe I should convert to RedHat? :P

Not sure about the hosts error (NooB).
I tried 2 things from my XP box
nbtstat -a [eth1 address] and that checked out OK
Ran a ping sweep util. [eth1 address] returned Hostname=mesh Comp. Name=SANDBOX

Could it have got the host name 'Mesh' from the remaining XP partition (dual boot system) during the install?

If I knew how I would search (Grep...?) for the term 'mesh' in the config files but I can not yet work out how to CD to \ in a terminal window.

This is all SO frustrating as I am an IT bod with 1 day Linux experience. I know what I want to do but not a clue how to.

Paul.
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

try the slash the other way :) (slashes are reversed on linux/Unix)

# cd /

that takes you to the root directory.

so has your computer got 2 NICs?
and which one is connected or both?
looks like it found your second NIC eth1.

your computer can have a hostname and each NIC can have a hostname just to confuse you some more.
so the computer name could be sandbox and the NIC called mesh.

did you set a static IP?

you can check out your settings from mintmenu --> control panel --> networking
:)
Image
Now where was i going? Oh yes, crazy!
Husse

Post by Husse »

One way of reading this is that you try to use a networked printer connected to a XP partition from the Mint partition on a dual boot??
Of course you don't :)
Is it a "networked printer", and if so how is it connected to the network (in relation to Mint)? Router, printer server etc
And does the names "mesh" and "sandbox" exist?
Paul-in-Devon-UK
Level 1
Level 1
Posts: 19
Joined: Sat Apr 14, 2007 3:25 pm

Post by Paul-in-Devon-UK »

Some of this answer is going off topic and I don't mind opening a new thread I anyone suggests it. However, having had time to look at the situation since my first post, I think that the host name issue might be relevant - "hostname: Unknown host " might be why the driver install failed?

I will answer both the above here.

cd / - Oh man what a plonker! I KNOW that but .....

The setup;

Linux Mint running on a Mesh brand computer that still has XP in the primary partition so I can dual boot back to XP. Linux Mint is the default boot option and is running from the same physical drive in a 37gb ext3 partition.

The iP4200 printer is a network printer shared by a laptop running XP.

Names - Mesh is the make of the compute and is the 'computer name' of the XP install in the primary partition. Sandbox is the 'computer name' used during the install of Mint.

There are 3 nics in the box. All are using static IP addresses as follows.

Code: Select all

eth0      Link encap:Ethernet  HWaddr 00:40:95:42:B8:F9  
          inet addr:192.168.2.2  Bcast:192.168.2.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:249 dropped:0 overruns:0 carrier:490
          collisions:4165 txqueuelen:1000 
          RX bytes:0 (0.0 b)  TX bytes:28541 (27.8 KiB)
          Interrupt:10 Base address:0x9800 

eth1      Link encap:Ethernet  HWaddr 00:48:54:5C:24:BE  
          inet addr:192.168.1.2  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:268269 errors:0 dropped:0 overruns:0 frame:0
          TX packets:248676 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:176915324 (168.7 MiB)  TX bytes:28229419 (26.9 MiB)
          Interrupt:11 Base address:0xe000 

wlan0     Link encap:Ethernet  HWaddr 00:30:BD:66:11:A7  
          inet addr:10.1.1.55  Bcast:10.1.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:762244 errors:0 dropped:0 overruns:0 frame:0
          TX packets:888343 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:65376982 (62.3 MiB)  TX bytes:684024012 (652.3 MiB)

** edit

mintmenu --> control panel --> networking was weird as the settings did not seem to take well. After a reboot the addresses changed so I ended up doing 'sudo ifconfig eth0 192.168.1.2 netmask 255.255.255.0' and similar for each nic. That seemed to work and has stuck.

** /edit

wlan0 is for internet access
eth1 is a 10/100 cat5 nic for faster file xfer between boxes (faster and does not slow down the families browsing/downloads)
eth0 is a legacy co-ax/cat5 nic that just never got taken out.

Routing;

Code: Select all

Kernel IP routing table
Destination     Gateway         Genmask            Flags Metric Ref    Use Iface
192.168.2.0     *                       255.255.255.0   U        0         0        0 eth0
192.168.1.0     *                       255.255.255.0   U        0         0        0 eth1
10.1.1.0            *                       255.255.255.0   U        0         0        0 wlan0
default             10.1.1.254      0.0.0.0                 UG     0         0        0 wlan0
I need to either sort out the metrics or add host entries to make the wired connection the preferred route for file xfer but that comes later.

I have not set separate host names for the nics - didn't know you could.

I just ran the IP scan from the XP machine and it sees the wlan0 with the host and computer name of Sandbox. When scanning the eth1 it comes back with a host name mesh and computer name Sandbox?

I am running grep from / to see if I can find a config file containing the string 'mesh'. Unfortunately I do not yet know the syntax to ask it to look at *.conf* files only and it is still not finished.

My aim is to find the offending 'mesh' entry and change it to 'sandbox' and retry the driver install. I could be on the wrong track but it is the only idea I have at this time.

Paul.
Husse

Post by Husse »

eth0 is a legacy co-ax/cat5 nic that just never got taken out.
Do yourself a favour and take it out :)

The hostname in Mint is found in a file called "Hostname"! :)
(/etc/hostname) You also have a file called hosts that may be relevant (/etc/hosts) Its content should be as follows:
127.0.0.1 localhost the_name_in_hostname
127.0.1.1 the_name_in_hostname

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
This is where you change "the offending 'mesh' entry"
Note:To have two names after 127.0.0.1 is a trick that makes gnome faster - see the wiki.
The syntax for finding a conf file containg "mesh" is as follows :
locate conf | grep "mesh"
First you are advised to update the index:
sudo updatedb
Both commands are fast but you would not have found the offending 'mesh' entry this way - it's not in a conf file
I've yet to master a way to search all files for a string with a reasonable output (reasonable output is the crux - grep gives a confusing output to say the least)
Paul-in-Devon-UK
Level 1
Level 1
Posts: 19
Joined: Sat Apr 14, 2007 3:25 pm

Post by Paul-in-Devon-UK »

I already checked those 2 and they are fine.

I tried locate conf | grep "mesh" and it quickly came back with NOTHING.

Maybe this is a red herring but the "hostname: Unknown host " error when running "sudo alien -i cnijfilter-ip4200-2.60-1.i386.rpm " is the bit that confused me and started me looking.

********************

I decided to see if I could get better output from alien so used "sudo alien -i --veryverbose cnijfilter-ip4200-2.60-1.i386.rpm > ./output.txt" which created a 42k file. I found "chmod 644 cnijfilter-ip4200-2.60//usr/share/cups/model/canonip4200.ppd" towards the end so updated the driver from this file.

It look as if it might have worked but now the driver will not print - the job starts and then stops. I see an extremely brief flash of the job spooling on the XP machine but that disappears. I think ii is a samba authentication issue that I need to look into.

The system log is streaming the following;
E [16/Apr/2007:00:15:59 +0100] cupsdAuthorize: Local authentication certificate not found!
No job in the queue but cups is generating the above at about 4/second

************************

A quick Google and it looks as if cups is *nix printing and not samba. I can feel the water rising over my head here.

I checked the priner properties - connection and it is set to smb and has all the correct information apart from user & pass that is always blank when I go back to it.

Where should I look next?
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

CUPS uses IPP (internet printing protocol) for print jobs.

have you looked at the CUPS admin via a web browser? localhost:631 or hostname:631

I would use CUPS instead of samba.
Image
Now where was i going? Oh yes, crazy!
Paul-in-Devon-UK
Level 1
Level 1
Posts: 19
Joined: Sat Apr 14, 2007 3:25 pm

Post by Paul-in-Devon-UK »

Well, that looked promising until I put a tick in a box on the right. Now I can't get anywhere beyond the welcome screen. http://localhost:631/admin/ for example.

The tick box was something to do with networks but I can't remember. There were about 8 and it was the top option, that is all I can remember.

Is there a 'reset to defaults' script anywhere?

Prior to my plonker moment I had gone through the iP4200 setup and it all looked fine. Even printing via samba was already in there. A test print immediately went to hold though.

The system log at /var/log/cups is now streaming

Code: Select all

D [16/Apr/2007:01:55:27 +0100] cupsdReadClient: 5 POST / HTTP/1.1
D [16/Apr/2007:01:55:56 +0100] cupsdAuthorize: No authentication data provided.
 D [16/Apr/2007:01:56:16 +0100] CUPS-Get-Default
D [16/Apr/2007:01:56:41 +0100] CUPS-Get-Default client-error-not-found: No default printer
D [16/Apr/2007:01:57:16 +0100] cupsdProcessIPPRequest: 5 status_code=406 (client-error-not-found)
Any idea where cups stores its config so I can look for authentication data?
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

there is a: /etc/cups/cupsd.conf

there is also a command line tool/command lpadmin.

also if the root account does not have a password (i dont think mint does by default) and you set cups to authenticate for admin, cups wont let you in.

check this out:
http://forums.macosxhints.com/archive/i ... 23785.html

or the admin book:
http://www.cups.org/doc-1.1/sam.html

I dont use a printer currently so im a bit rusty with cups.
:D
Image
Now where was i going? Oh yes, crazy!
Husse

Post by Husse »

cups is something I've to learn a bit more about.
Like any Ubuntu-based distro Mint does not have a root password and frankly I don't think it's a good idea to give printing root permissions
But if you have to and are willing to take the risk this is how you get a password for root:
sudo passwd root
Use a strong password!
//edit//
it's just sudo passwd
passwd (without sudo) changes your own password
Husse

Post by Husse »

the syntax to search in a lot of files is as follows:
grep -r -i -o -s -I "searchstring" /etc/*

This is explained as follows, and note that the switches are case sensitive:

-r recursive (works its way down all folders in a folder)

-i make the searchstring not case sensitive

-o show only matching (standard is to show every file, with the matching ones marked matching, not very helpful if you search through thousands of files)

-s supress error messages - like file does not exist (which is pretty common)

-I ignore binary files: If you fon't set this switch grep searches binary files which takes a long time
So if you know you don't want to look into binaries use this switch

and don't forget man grep that's where I've found this.

--include=PATTERN
Recurse in directories only searching file matching PATTERN.

--exclude=PATTERN
Recurse in directories skip file matching PATTERN.
Don't try to search /* you choke your poor computer :)
I've yet to find out how to stop output before you can't scroll through it
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

Redirect it to a file or pipe it to less.
grep "string" /path/* | less
or
grep "string2" /path/* > /tmp/output
then
less /tmp/output

:)
Image
Now where was i going? Oh yes, crazy!
Husse

Post by Husse »

@Boo
Pipe it to less! Damn if I'd figured that out
The devon guy knows how to pipe it to file (me too) :)
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

tee anyone?

:lol:
Image
Now where was i going? Oh yes, crazy!
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

@Husse
I'll let you in on a secret... it is your terminal emulator not letting you interrupt the output.
try this one out
http://software.jessies.org/terminator/

well it is really that XON/XOFF are turned off on most terminal emulators. If it wasn't you could ^s to stop and ^q to continue, just like on my nice solaris box next to me.
to turn it back on: stty ixon
best put in your login script.

don't tell anyone.
hehe
:D
Image
Now where was i going? Oh yes, crazy!
Husse

Post by Husse »

@Boo
You know a way to make grep only print out (if that's the way to call something going to stdout) just once when a file has several instances of your search term?
I get like:
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
/home/mats/.bash_history:brother2
and I definitely only need one of these lines.
I've read through the options many times, but not found anything
User avatar
Boo
Level 7
Level 7
Posts: 1633
Joined: Mon Mar 26, 2007 7:48 am

Post by Boo »

cat file | grep -m 1 "brother2"
this will stop the grep command at the first instance of brother2.
not quite what you want.

:D
Image
Now where was i going? Oh yes, crazy!
Locked

Return to “Printers & Scanners”