WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: samsung SCX-4521F multi function problem with cups  (Read 16240 times)

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: samsung SCX-4521F multi function problem with cups
« Reply #15 on: March 26, 2011, 08:29:46 AM »
Hi all and thank you Juanito and SamK:

1)the $ /usr/local/cups/filter/foomatic-rip --h   (resulted in)
      $ foomatic-rip version 4.0.2.211

this probably means, that this thing is alive and kicking.
ghostscript_common is not installed.

I played around for hours with cups and foomatic and I learned the following: (Please correct me, if I am wrong)

a) Installing and starting dbus and cups (no matter which version of cups) the system just needs a printer specific .ppd file to make the printer work. This .ppd file, in my case is Samsung-ML-4500-gdi.ppd for my SCX-4521F and I got it from the openprint website SamK recommended. I was able to search this site for my printer brand and model - nice.
So - now I think I should have everything I need to install and run my printer?

b) do I need gutenprint and foomatic-rip when I have all that mentioned in a)  ??

c) I discovered that, when I load gutenprint several printer brand names show up in my cups web-interface http://localhost:631. The are listet in the window when it comes to select the Model in the Model Window. Underneath the Model window I have also an option to provide a PPD File:

So - here is a question:  if my printer model is not listed in the window, why should I load gutenprint at all?

d) I also discovered that installing foomatic-rip did not alter the Model Window at all. No other printers were visible in that Model: window from the cups browser application. Although some info from the web say "use foomatic when it comes to Samsung printers !"

e) my conclusion is now, would it not be easier to just install cups, forget about all the other extensions and add the right PPD file when it comes to printer selection. Just ignore the Model window. Is my thinking correct? or do I need to load ghostscript, ghostscript-common and poppler-bin.

f) If after installing foomatic-rip my printer .ppd does not show up, why should I install it?

t(w)o be(ers) or not t(w)o be(ers) that is the question

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: samsung SCX-4521F multi function problem with cups
« Reply #16 on: March 26, 2011, 09:06:18 AM »
I never tried using gutenprint, so I'll stay away from commenting on that.

A printer needs a ppd file in order to work, but it usually requires something else as well, typically ghostscript and perhaps foomatic-rip.

I've seen that older ppd files require foomatic-rip and newer ones do not - you could try looking at the ppd file with a text editor to see if foomatic-rip is mentioned?

Since your cups error log shows a foomatic-rip error, I would assume it is required and it that case, I would try loading ghostscript, ghostscript-common and foomatic-rip, trying to print and examining the cups error log to see what you get.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: samsung SCX-4521F multi function problem with cups
« Reply #17 on: March 26, 2011, 09:59:47 AM »
As I mentioned in reply #14, I use CUPS 1.4.5.  As the maintainer of CUPS 1.4.5 it may be reasonable to assume that Jaunito also uses that version.  In such circumstances it is difficult to offer precise advise on a version of software which is not used.  The advice is therefore generic in nature.

An imperfect summary of printing in TC might be:
  • CUPS provides a means of configuring the print server and print queue.  This is supported by some means of handling postscript (such as my compromise of using ghostscript, ghostscript_common and poppler-bin),
  • A printer driver file is also used which might come from a Foomatic-RIP PPD (i.e. the one you downloaded from openprinting.org) or from bundles of drivers such as Gutenprint or HPlip.

If you decide to use a Foomatic-RIP driver PPD, then foomatic-rip.tcz must also be installed to make use of it.  In this scenario neither Gutenprint nor HPlip is required.

You might try placing the Foomatic-RIP PPD in your home directory.  Open the CUPS web GUI and again add a new printer.  When you reach the option to select the printer manufacturer decline it, and instead move to the field "Or Provide a PPD File" and browse to the location of your PPD, then click the add printer button.

Again I give the caveats:
  • I do not use the same version of CUPS as you,
  • This may be the first layer of a multi-layered problem.
 

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: samsung SCX-4521F multi function problem with cups
« Reply #18 on: March 26, 2011, 02:16:15 PM »
hi: thank you again. so I will remove the gutenprint and cups 1.311 just by removing them from onboot and ondemand. Then I will install the latest cups, ghostscript, ghostscript_common and poppler-bin from the repo and foomatic and will try again. I would like to leave the old cups in my /tce/optional.

I will post my results.
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: samsung SCX-4521F multi function problem with cups
« Reply #19 on: March 28, 2011, 12:49:25 PM »
Hi:
Now I have the new cups 1.4.5 running. It was not easy, because I needed to get rid of the old version cups 1.311 which resides in another spot. I have foomatic-rip, ghostscript, ghostscript-common and poppler-bin on onboot.

I can start the cups browser app but I am not able to log in. Now I am back to that old password
problem. I am not able to set a new admin and a password. I followed a hint from a UK magazine which recommeded :

$ lppassword -a admin
input password twice  (six characters and at least one number)

I did that several times, but no luck.

Please - can somebody help me here.


 
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: samsung SCX-4521F multi function problem with cups
« Reply #20 on: March 28, 2011, 01:36:55 PM »
I can start the cups browser app but I am not able to log in. Now I am back to that old password problem. I am not able to set a new admin and a password.
It's not an insurmountable problem, and the solution is mentioned in the extension info file.

Try this...
Before opening the CUPS web interface, create a password for the root user.  This is needed to conduct administrative tasks in the web GUI.
Code: [Select]
sudo passwd
It is not required but if it is preferred to have the password retained following a re-boot, back-up   /etc/shadow   and restore it at each boot-up.
   

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: samsung SCX-4521F multi function problem with cups
« Reply #21 on: March 28, 2011, 02:17:16 PM »
Hi SamK: Thank you for your help. You are right - thats what I did. I set a new password for root and
then I was able to add a new printer.
I used the regular passwd command and not the lppasswd from LXF magazine.

Now my printer was recognized via one of the USB ports. I still do not know which one.
During set up of the printer I selected Samsung ML-4500 PPD and tried to print useung the Leafpad editor.

here is copy of my error-log file:
E [28/Mar/2011:20:02:57 +0000] Unable to open listen socket for address ::1:631 - Address family not supported by protocol.
E [28/Mar/2011:20:04:27 +0000] cupsdAuthorize: Authentication failed for user "root"!
E [28/Mar/2011:20:04:42 +0000] cupsdAuthorize: Authentication failed for user "root"!
E [28/Mar/2011:20:07:36 +0000] [cups-driverd] Unable to open driver directory "/usr/local/lib/cups/driver": No such file or directory
E [28/Mar/2011:20:07:36 +0000] [cups-driverd] Unable to open driver directory "/usr/local/lib/cups/driver": No such file or directory
E [28/Mar/2011:20:07:59 +0000] Filter "/usr/local/lib/cups/filter/foomatic-rip" for printer "Samsung_SCX-4x21_Series" not owned by root
E [28/Mar/2011:20:07:59 +0000] Filter "/usr/local/lib/cups/filter/foomatic-rip" for printer "Samsung_SCX-4x21_Series" not owned by root
E [28/Mar/2011:20:08:12 +0000] Filter "/usr/local/lib/cups/filter/foomatic-rip" for printer "Samsung_SCX-4x21_Series" not owned by root
E [28/Mar/2011:20:08:12 +0000] Filter "/usr/local/lib/cups/filter/foomatic-rip" for printer "Samsung_SCX-4x21_Series" not owned by root
E [28/Mar/2011:20:09:19 +0000] Unable to execute /usr/local/lib/cups/filter/foomatic-rip: insecure file permissions (0100755)
E [28/Mar/2011:20:09:19 +0000] [Job 1] Unable to start filter "foomatic-rip" - Operation not permitted.
E [28/Mar/2011:20:09:19 +0000] [Job 1] Stopping job because the scheduler could not execute a filter.

it look like that I have permission and owner ship problems. Do you have an idea what is wrong?
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: samsung SCX-4521F multi function problem with cups
« Reply #22 on: March 28, 2011, 02:51:16 PM »
Hi:
From the error message I learned that a folder named: "driver" was missing in /usr/local/lib/cups

I added that folder and copied the Samsung PDD into it. Now after restarting smbd and cups I can not see this error message any more. I "only" have the error message:

Unable to execute /usr/local/lib/cups/filter/foomatic-rip: insecure file permissions (0100755)
E [28/Mar/2011:20:09:19 +0000] [Job 1] Unable to start filter "foomatic-rip" - Operation not permitted.

I looked this file up (in two different places)and was not able to change owner ship and/or permission because it is read-only?

Now what. Can somebody please help me here?  Thank you so much
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: samsung SCX-4521F multi function problem with cups
« Reply #23 on: March 28, 2011, 03:38:52 PM »
From the error message I learned that a folder named: "driver" was missing in /usr/local/lib/cups

I added that folder and copied the Samsung PDD into it.
That sounds as though the PPD file was not added during the configuration of the printer.


Unable to execute /usr/local/lib/cups/filter/foomatic-rip: insecure file permissions (0100755)
E [28/Mar/2011:20:09:19 +0000] [Job 1] Unable to start filter "foomatic-rip" - Operation not permitted.

I looked this file up (in two different places)and was not able to change owner ship and/or permission because it is read-only?
Have a look at the job when this stage is reached.  If it is failing due to file ownership problems it will be confirmed here also.  This seems to be a result of the way the foomatic-rip extension and TC interact.

Try something like...

Copy /tmp/tcloop/foomatic-rip/usr/local/bin/foomatic-rip to a location that allows the properties to be changed  e.g.  /opt/foomatic-rip/foomatic-rip

Delete the existing link at  /usr/local/lib/cups/filter/foomatic-rip

Create a replacement link at    /usr/local/lib/cups/filter/foomatic-rip   pointing to    /opt/foomatic-rip/foomatic-rip

Change the ownership of   /opt/foomatic-rip  recursively to be owned by root:root
   

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: samsung SCX-4521F multi function problem with cups
« Reply #24 on: March 29, 2011, 08:09:45 AM »
HI: Thank you for your help. Couls you please give me a quick hint how to do the deleting and creating a link in TC?
=======================================================
Delete the existing link at  /usr/local/lib/cups/filter/foomatic-rip

Create a replacement link at    /usr/local/lib/cups/filter/foomatic-rip   pointing to    /opt/foomatic-rip/foomatic-rip
=========================================================
Thank you so much for this
t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: samsung SCX-4521F multi function problem with cups
« Reply #25 on: March 29, 2011, 09:09:43 AM »
...a quick hint how to do the deleting and creating a link in TC?

Try something like this...

Create a directory for foomatic-rip
Code: [Select]
mkdir /opt/foomatic-rip

Copy foomatic-rip to it
Code: [Select]
cp /tmp/tcloop/foomatic-rip/usr/local/bin/foomatic-rip /opt/foomatic-rip/foomatic-rip

Re-point the link to the new file
Code: [Select]
ln -f -s /opt/foomatic-rip/foomatic-rip /usr/local/lib/cups/filter/foomatic-rip

Change the ownership of the new structure
Code: [Select]
sudo chown -R root:root /opt/foomatic-rip
   

Offline beerstein

  • Hero Member
  • *****
  • Posts: 530
Re: samsung SCX-4521F multi function problem with cups
« Reply #26 on: April 05, 2011, 06:36:00 AM »
Hi: I tried "everything" to get this Samsung multi function work on my TC 3.51 PC.
No luck - so I gave up - at least for the time beeing. Here is a summary of what I have done. Maybe somebody else can go from here and save the headache I have suffered so far.

Before I quit I installed:
1.  the cups.tcz  (version 1.4.5) before I tried cups 1.3.11
2. foomatic-rip (because the ML 4500 PPD file mentioned foomatic rip in its source text)
3. ghostscript version 9.0 from repo (because I learned this is the driver which generates pixel output from post script, ghostscript is needed by foomatic-rip and the comamd line command:
$ gs -h
should generate a lising which shows your printer model. Not in my case!)
4. ghostscript-common  ( I still do not know what this is for)
5. poppler-bin ( no idea what this for )

There are a few config files which need to be configured.
1. /etc/cups/cupsd.conf
2. /etc/cups/printers.conf (mostly done by the browser interface http://localhost:631
3. /etc/cups/ppd/  this folder needs the PPD file for this printer model - downloaded from www.linuxprinting.org/download/PPD - although this site had exactly the PPD file I needed - the solution was still not in sight.
4. /tmp/tcloop/foomatic-rip/local/etc/foomatic/filter/filter.conf
this config file needs to be configured to tell the systems where several applications are located. I could not find a description on how to do it. At the end of this filter.conf file I found an error where it said: "preferred_shell: /bin/ash  instead of preferred_shell: /bin/bash" So when you work with foomatic so please take a look at this.
5. I was able to handle the "read only" problems of config files, scripts and binaries with the excellent help of our forum members, especially SamK.
(please see theprevious posts)

I have no plans yet how to continue with that SCX 4521F . In some cases it would be cheaper and easier to buy another HP, Canon, Epson or Brother printer. HP is probably the easiest to install under Linux.

Maybe I will try to go back to cups 1,311?
Maybe somebody has the time to add the Samsung SCX 4521F model to the ghostscript.tcz?


t(w)o be(ers) or not t(w)o be(ers) that is the question

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: samsung SCX-4521F multi function problem with cups
« Reply #27 on: April 05, 2011, 10:07:12 AM »
Sounds like quite a bout of wrestling. 

Just a few thoughts and observations in case you decide upon a re-match.  These are offered as a distillation of working TC printing using:
  • Parallel and USB ports
  • HP and Epson printers
  • Various drivers (Foomatic included)

...
There are a few config files which need to be configured.
1. /etc/cups/cupsd.conf
2. /etc/cups/printers.conf (mostly done by the browser interface http://localhost:631
3. /etc/cups/ppd/  this folder needs the PPD file for this printer model - downloaded from www.linuxprinting.org/download/PPD - although this site had exactly the PPD file I needed - the solution was still not in sight.
4. /tmp/tcloop/foomatic-rip/local/etc/foomatic/filter/filter.conf
this config file needs to be configured to tell the systems where several applications are located. I could not find a description on how to do it. At the end of this filter.conf file I found an error where it said: "preferred_shell: /bin/ash  instead of preferred_shell: /bin/bash" So when you work with foomatic so please take a look at this.
...

/etc/cups/xxx does not feature in the working set-ups I have created.  Do you mean /usr/local/etc/cups/xxx

It has never been necessary to manually change cupsd.conf or printers.conf

It has never been necessary to manually create .../cups/ppd or manually place the PPD file in it.  This has always been stored in /opt.  Selecting it in the appropriate CUPS section automatically places it in the needed directory /usr/local/etc/cups/ppd/.

It has never been necessary to edit filter.conf.

Bash has not been needed (or installed) to obtain a working set-up.  The TC standard ash works fine.

Perhaps if you do decide to try again these may give you a starting point.
   

Online Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14814
Re: samsung SCX-4521F multi function problem with cups
« Reply #28 on: April 05, 2011, 11:34:37 PM »
There are a few config files which need to be configured.
1. /etc/cups/cupsd.conf
2. /etc/cups/printers.conf (mostly done by the browser interface http://localhost:631
3. /etc/cups/ppd/  this folder needs the PPD file for this printer model - downloaded t this.

Since the cups extension only uses /usr/local/etc and if you have not loaded cups1311, then there is some kind of problem - maybe the files above are in your backup?

..anyway, you need to work with /usr/local/etc/cupsd.conf