I am trying to install a very simple and very common mono laser printer to my new Endless OS installation.
The printer is a Samsung M2016W (xpress) connected with a USB cable - I have tried to install in the follwing ways:
The Add Printer application under the settings menu - the printer is detected and identified as a M2020 Series
Using CUPS admin (using the webpage http://localhost:631) - Again the printer is detected as a M2020n Series
In both cases a driver is not found or the model is not selectable from the list.
I have successfully installed this printer on Ubuntu, Linux Mint, Fedora and ARCH using the second method above and / or running the installation script supplied with the very good Samsung Linux drivers.
I have tried this method on Endless OS (script run under SUDO) and it appears to install but this does not work at all on this OS.
I have also tried adding the PPD file (Samsung_M2020_Series.ppd) copied from my working Linux Mint installation.
This does not work either - checking within CUPS it suggests that the file ā/usr/lib/cups/filter/rastertosplā is not available. Upon checking, this appears to be correct. On the Mint system this is a symbolic link to the actual file which is located in ā/opt/smfp-common/printer/binā
I cannot copy the file into the location OR creat a symbolic link to any location due to the file system being locked down.
Is there any way I can get this printer working on this OS before I remove it please?
Something that would help us a lot to understand the problem would be this:
Open the application called āTerminalā
In this application run the command:
eos-diagnostics
The above command will create a file with the information of your system (example: eos-diagnostic-160614_111731_UTC + 0100.txt); Send us this file so we can analyze and see a possible solution
I have tried a number of different āmodelsā of Samsung printer on the off-chance that one may work - you can see this in the file.
I can see that test jobs are being submitted to the server / queue but nothing is printed. I donāt see any errors Iimmediately but you guys may spot something I missed!
Youāre right on that itās not possible on Endless OS to write anything under /usr/ due to the system partition being read-only, which unfortunately makes installing extra things -like certain printer drivers- a bit complicated.
However, in this particular case, I think there might be something you can do: besides copying all the related files needed by the printer under /opt/smfp-common, try editing the PPD file youāre using before using it to install the printer, so that it will look for the non-standard & Samsung-specific rastertospl binary directly in /opt/smfp-common/printer/bin/rastertopsl, instead of having it rely on an existing symlink at /usr/lib/cups/filter/rastertospl.
To be clear, Iād try something like this:
First of all, uninstall the printer if you still have it installed now
Copy the /opt/smfp-common directory (and any other printer-related directory under /opt, if any) from your Mint installation, into your Endless machine, under the same path under /opt (you need to do this as root, but, /opt is writable).
Copy the Samsung_M2020_Series.ppd aside somewhere and edit it, so that the line *cupsFilter: "application/vnd.cups-raster 0 rastertospl" becomes *cupsFilter: "application/vnd.cups-raster 0 /opt/smfp-common/printer/bin/rastertospl" instead (or whatever is the right path to that file), and save it as Samsung_M2020_Series_Endless.ppd.
Alternatively, you can do this from the command line running this command:
sed 's/rastertospl/\/opt\/smfp-common\/printer\/bin\/rastertospl/g' Samsung_M2020_Series.ppd > Samsung_M2020_Series_Endless.ppd
Now use that Samsung_M2020_Series_Endless.ppd to install the printer.
If things go right, and thereās no more weirdness related to that driver (e.g. other binaries or files not referenced from the PPD file expected to live under /usr), this might actually work.
Thanks Mario, Iāll give this a go this afternoon!
I was attempting to do something similar but creating my own symlink to the file(s) but I had no joy with thatā¦
1 question, should I need to re-install the Samsung Linux driver using the installtion script they provided or should I use the Endless Add Printer app, adding in the PPD file via the button?
Iām guessing doing this via the CUPS admin webpage acheives the same goal?
I have no idea of how the installation script works, but my understanding is that it will likely fail at some point when trying to write under /usr (it creates a symlink, right), and if that happens itās probable that whatever came next in the installation wonāt be performed, leaving it half way.
What I would do is to look at that script and, if itās not too complicated, either remove the lines touching the /usr file system and execute it that way, or simply try to understand what it does and do it manually. I wouldnāt bet my life on it, but I wouldnāt be surprised if all it does is to copy files under /opt/smfp-common and, create those symlinks and then install the printer using CUPSā commandline toolsā¦ in which case you can achieve the same effect (1) copying /opt/smfp-common over from your Mint installation, (2) modifying the PPD file as I described before and then manually installing that modified PPD file from the Endless Add Printer App, via the button you mentioned.
Alternatively, you can also add it from CUPS web interface at http://localhost:631, but using the desktop app is probably easier.
Copied the /opt folder and subfolders from my Mint machine to a USB stick
Copied the Samsung_M2020_Series.ppd file to the stick - edited the file to reflect the new location of the rastertospl file
Copied these files to the EOS /opt folder (this was previously empty) using the following to preserve any rights:
I tried to maintain the rights to the rastertospl file with my copy command but CUPS appears to be objecting to it saying is is insecure.
However, it would also appear that although it tries to start the filter via the scheduler it simply stops.
This is an extract below:
Jul 06 15:20:59 endless cupsd[366]: M2020-Series: File ā/opt/smfp-common/printer/bin/rastertosplā has insecure permissions (0100644/uid=1001/gid=1001).
Jul 06 15:20:59 endless cupsd[366]: Unable to start filter ā/opt/smfp-common/printer/bin/rastertosplā - Success.
Jul 06 15:20:59 endless cupsd[366]: Stopping job because the scheduler could not execute a filter.
Iām going to do some trawling around on the basis of this info unless you can suggest anything else in the meantime!
Yes you need to preserve permissions, something that probably the USB stick has thrown away (especially if itās on something like FAT or NTFS). What I would do is to create a tarball with the contents of your mint machine, put that tarball in the USB and then extract it directly on the target machine.
Something like the following should do it:
# On your mint machine (use sudo to make sure everything gets copied):
sudo tar czvf /PATH/TO/USB/DRIVE/samsung-printer-driver.tgz /opt/samsung /opt/smfp_common
# On your Endless machine, remove previous directories first, then extract
sudo rm -rf /opt/samsung
sudo rm -rf /opt/smfp_common
sudo tar xzvf /PATH/TO/USB/DRIVE/samsung-printer-driver.tgz -C /opt/
Sure thing - Iām usually quite mindful of maintaining the rights.
It would appear that the Samsung driver script creates a symlink in:
/usr/share/cups/model/uld-samsung to /opt/samsung/printer/share/ppd
which is where the PPD files are stored.
There is another symlink to the rastertospl file:
/usr/lib/cups/filter/rastertospl to /opt/smfp-common/printer/bin/rastertospl
One thing I did notice was that the rastertospl file is maked as executable in Mint - the one on EOS was not.
I rectified this and restarted CUPS.
This made no difference and the eos-diagnotics output showed the same issue with being unable to start the filterā¦
Iāll have a go now with your suggestion Mario - itās been a while since I had to dig this deep into Linux - and that was a printing problem on Corel Linux, when that was a thing!
It would appear that the Samsung driver script creates a symlink in:
/usr/share/cups/model/uld-samsung to /opt/samsung/printer/share/ppd
which is where the PPD files are stored.
Yeah, thatās very commonly done by printer drivers installed in /opt to leverage the fact that CUPS recursively looks for PPDs under /usr/share/cups/model (and any subdirectories), but itās only relevant so that CUPSā internal database (see output of lpinfo -m) know that the PPD files are there, so that they can be automatically discovered and picked when plugging the printer.
Since youāre manually installing a modified version of the PPD file, that symlink should be irrelevant once the printer is installed.
There is another symlink to the rastertospl file:
/usr/lib/cups/filter/rastertospl to /opt/smfp-common/printer/bin/rastertospl
This symlink is not needed either now that youāre modifying the PPD file.
One thing I did notice was that the rastertospl file is maked as executable in Mint - the one on EOS was not.
I rectified this and restarted CUPS.
Yes, CUPS filters are binary files that process an input and provide an output, and as such they need to be executable.
This made no difference and the eos-diagnotics output showed the same issue with being unable to start the filterā¦
Iāll have a go now with your suggestion Mario - itās been a while since I had to dig this deep into Linux - and that was a printing problem on Corel Linux, when that was a thing!
Hopefully that will help. Another thing I spotted in your log is this, btw:
That indicates the file is not executable (as you mentioned) but also that the ownership belongs to your main user so perhaps thatās another reason why this is failing? Iād suggest checking what the owner of those files are in your Mint installation (probably root) and making sure that whatever gets installed in your Endless machine belongs to the same user and group (although if you use tar that should be preserved already).
I had a real face-palm moment when I re-checked the diagnostic output - I was indeed the āownerā of the files and folders and not ārootā as it shouldāve been - that is likely to be what the issue was from the start - USB drives and rights / privs are a no-no from now on and Iāll make sure I tar ANYTHING like this again in the future!
As I said, the last time I had any issues with any Linux distro was with Corel Linux, way back when, and that was a printing issue too - Linux has come a long way since then!
I shall pass on my thanks to you from both myself and my 9 year old daughter - she has been going nuts since she saw EOS installed on this re-cycled laptop - I guess Iāll never get a look-in now!
Many Tnaks again Mario - your help/ guidance is really appreciated!