SULDR Forums Supported Printers Printing Questions Scanning Questions General Questions Samsung Installer

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - totally-king

Pages: [1]
Hi hustler77,
on my new ubuntu saucy machine the python-imaging-sane package also depends on a specific version of the python-imaging package, which is 1.1.7+2.0.0-1ubuntu1. So for python-imaging-sane to work you need a python-imaging which provides that version (in your case 1.1.7-4). Since suld-scantopc cannot work without the python sane library, the dependency is correct und must remain there. The error seems to be in your debian repository/ies, because with your current situation you cannot install python-imaging-sane at all. A workaround for you might be (if you really need the latest python-imaging) to remove the python-imaging-sane package as suggested, install the python sane library via PyPI (the Python Package Index) and create & install a dummy .deb package that provides python-imaging-sane as needed by suld-scantopc. Another way could be to hold the current version of python-imaging until this repository bug is resolved. (You should consider reporting a bug.)
Code: [Select]
sudo aptitude hold python-imagingCheers, ~TK

Scanner Server (Scan to PC) / Re: Scan to PC in Linux (Development)
« on: October 06, 2013, 06:27:22 »
@bchemnet Thanks for the updates. All is fine except (probably my fault, sry!) that the script of suld-scantopc isn't executable anymore (which leads to a lot of dpkg errors since configuration pre/post routines rely on (re)starting/stopping ...):
Code: [Select]
-rw-rw-r-- 1 root root 59K Okt  2 20:11 /usr/bin/
The correct mode is probably 755 (-rwxr-xr-x). Maybe you could also apply this to the suld-scantopc-gui script (, which currently has 775.

Sry for so many posts. But I found and fixed a bug in the GUI when started by a user that is not configured to own the scan files saved by the server app.

See updated files and changelogs for (reposted) suld-scantopc v0.4.5 and suld-scantopc-gui v0.4.5 in the attachment.

Scanner Server (Scan to PC) / Re: IndexError: list index out of range
« on: October 02, 2013, 15:24:34 »
Good! Nice to know that it works now.

If you look at the package it says
Code: [Select]
Depends: python-pysnmp-common (>= 2.0) | python-pysnmp4

Well, I thought either of these packages should be working. Did anyone else have problems installing, because python-pysnmp-common wasn't enough and python-pysnmp4 was needed?

Scanner Server (Scan to PC) / Re: Scan to PC in Linux (Development)
« on: October 02, 2013, 13:38:29 »
What license is this software distributed under? Would it be possible to put a license file in the package?

I decided to put the deb packages under 'GPL-3+' which means they may be distributed under GPLv3 or any later version of that license. I attached the license text taken from /usr/share/common-licenses/GPL-3 on my ubuntu system, if you need it.

I added the IPv4 extraction method and also established an algorithm which tries to create the SIZE2SANE dictionary automatically. If one wants to override that, one simply has to define SIZE2SANE in the conf file.

See updated files and changelogs for suld-scantopc v0.4.5 and (reposted) suld-scantopc-gui v0.4.4 in the attachment.

@frankentux: Please tell me, if these new versions work for you without any tweaking. If so: mission accomplished! ;) If not: bugfixing time ...

Scanner Server (Scan to PC) / Re: IndexError: list index out of range
« on: October 02, 2013, 11:45:05 »
So it's definitely not the package that's corrupted ...
You could try backing up and removing the the pysnmp directory and maybe other files named something like that in /usr/lib/pymodules/python2.7/. Maybe then python will find the correct source installed by apt. (Check your Python's search path to find out in which order directories are checked:

Scanner Server (Scan to PC) / Re: IndexError: list index out of range
« on: October 02, 2013, 10:19:38 »
Well, you've got me stumped! You could try
Code: [Select]
sudo apt-get remove --purge python-pysnmp* suld-scantopc
sudo apt-get install suld-scantopc
since the -common package is only a version selection module in 12.04 (as I know now ^^).

Or maybe you installed a repository that gave you this non-working python module? To check this:
Code: [Select]
apt-cache showpkg python-pysnmp*

Scanner Server (Scan to PC) / Re: Scan to PC in Linux (Development)
« on: October 01, 2013, 10:12:29 »
Well, I personally like the interactive approach with ipython to exactly see where something goes wrong. You still are in the environment to try another approch.

There it is I think:
    --page-format Statement|Statement (Rotated)|A5|A5 (Rotated)|B5 (JIS)|Executive|A4|Letter|Custom [A4]
        Set the paper format of the scanned page

So as I said, you probably need to update the config file
Code: [Select]
SIZE2SANE={'SIZE_A4': 'A4', 'SIZE_A5': 'A5 (Rotated)',
           'SIZE_B5_JIS': 'B5 (JIS)', 'SIZE_EXECUTIVE': 'Executive',
           'SIZE_LETTER': 'Letter'}
For Statement and Executive (if you want/have that) you need to find out what your scanner's definitions for these formats are (as 'SIZE_A4' is for A4). To do that
Code: [Select]
and open the file to check for the definitions (if there are any).

Scanner Server (Scan to PC) / Re: IndexError: list index out of range
« on: October 01, 2013, 09:08:45 »
Have you changed your installation of python modules, especially pysnmp? Maybe you should try purging and reinstalling python-pysnmp-common via apt?

In my configuration (default python installation in ubuntu 12.10) the script that throws your error is located in /usr/lib/python2.7/dist-packages/pysnmp and contains only:
Code: [Select]
# PySNMP, version 4
majorVersionId = '4'
version = (4, 2, 1)

Scanner Server (Scan to PC) / Re: Scan to PC problem with SCX-4728FD
« on: October 01, 2013, 09:00:48 »
I posted updated source and config files (also tackling this issue) in the development thread: click!

Edit: I posted newer versions (both 0.4.5) here.

Here are the modified source and config files for version 0.4.4 of suld-scantopc and suld-scantopc-gui addressing the errors mentioned in and a bit more (updated changelogs included).

Scanner Server (Scan to PC) / Re: Scan to PC in Linux (Development)
« on: October 01, 2013, 07:07:57 »
Not really. Your scanner ID looks different from what I'm used to and what this application was made for. Mine for example is: smfp:SAMSUNG CLX-3300 Series on Maybe the sane python module can't handle such a name?! You could try initiating a scan through ipython and look if this throws the same error:
Code: [Select]
import sane
dev = sane.get_devices()[0][0]
s =
## Edit: check if page_format option is available
if 'page_format' in s.optlist:
    s.page_format = 'A4 - 210x297 mm'
    raise ValueError('page_format option not available')
pic = s.scan()

Edit: Now that I looked at the Traceback again, I think it's probably not the ID causing the sane error. (Still worth a try to check it out the manual way. Seems like there's a bug when trying to set the page format. If the error persists look what kinds of page format strings your scanner expects with scanimage --help -d 'smfp:net;' and modify the SIZE2SANE dictionary in /etc/samsungScannerServer.conf if necessary.) But your problems with having to force the scanner IP are definitely because of your unusual scanner ID and could be overcome by an alternative IP extraction algorithm (maybe depending on the semicolon?). If you want that just tell me. ;)

Scanner Server (Scan to PC) / Re: Scan to PC in Linux (Development)
« on: August 05, 2013, 08:09:38 »
Thank you very much! The GUI package throws the following error during install (postinst gave back error code 1):
Code: [Select]
update-rc.d: /etc/init.d/samsungScannerServer exists during rc.d purge (use -f to force)

I think, you need to add the '-f' to the invocation of update-rc.d. Since the service samsungScannerServer exists it won't delete the startup links without forcing it to.

I agree with both of you, if the scantopc package is installed alone.

But when the GUI package is added I think it is better to refrain from automatic startup of the service. The GUI (ubuntu App Indicator) I wrote starts the server upon its application start (or restarts it if the server is already running) and stops it upon its exit. (To save resources on laptops/netbooks etc. ...) The option to chose what one wants (configure while installing) is good, but doesn't really work, because even if you chose to have the server started upon system boot, as soon as the GUI is closed the server is stopped as well and would then not be restarted until next start of the GUI or reboot.

So maybe one should work on the package description of the GUI package? Like:
An Ubuntu Application Indicator (a graphical user interface, GUI) for the server app used for the 'Scan to PC' function of Samsung multi function printers (MFPs) in suld-scantopc. It has some convenient buttons and issues informational notification bubbles about incoming scan files. Note: This is intended for notebook/desktop PC users that do not want the backend server to always run but rather started and stopped together with the GUI.

Sorry a/b the changelog issue. I do not know very much about debian packaging. As I clicked on 'Get changelog' in Synaptic it told me nothing was present - which obviously isn't true. I incorporated your changelogs into what I already wrote and attached the new ones. You can leave them compressed, btw - the most standard way is probably the best way. ;)

v0.4.3 (both scantopc and scantopc-gui, see bundled attachment): I improved a few other things (logging and error handling) and added an option to the conf file to disable the scanner object caching introduced by angelnu, since this does not work with multiple servers registered at the same scanner. Ideally the scanner connection should then be closed after each (multipage) scan, but this causes a seg fault (exiting SANE does as well). Problem is, that the scanner only has one port 9400 to listen to one computer running the server ... But for now the general option is there and at least leads to less problems with multiple servers even though the main problem remains. (My scanner usually freezes if two different servers try to reach it via SANE (port 9400) at the same time, and one of the servers gives me some SANE I/O Error ...)

Thanks a lot to angelnu and bchemnet for your support and effort! And sorry I was leaving you alone lately. Well, the thing is I don't always have an MFP to test scantopc with, since I wrote this program mainly for my partner, who is living in another town. But now I'm back. ;)

Now v0.4.2:

I did a few bugfixes (compatibility to modified sane method was broken), and made some changes to the GUI part, so that it works with angelnu's improvements of the server backend and doesn't print out fuzzy messages. (= (See binary files destined for /usr/bin in attachment.)

The package description of suldr-scantopc-gui still refers to samsungmfp-scantopc, this should be updated to suldr-scantopc.

Also I would appreciate having the changelogs within the deb files as I originally implemented them (see attachment). When I created the deb packages I just renamed them to changelog and put them in the debian folder.

And maybe one could add a postinst routine to suld-scantopc-gui that disables the automatic startup (at bootup) of the server backend, since most people would probably use this package on desktop PCs and don't need the server running in background all the time. Like:
Code: [Select]
sudo update-rc.d -f samsungScannerServer remove
And of course the corresponding postrm code:
Code: [Select]
sudo update-rc.d samsungScannerServer defaults

I don't know really know how, but couldn't one ensure that suld-scantopc-gui always gets removed before suld-scantop, so no problems regarding these new routines arise?

Scanner Server (Scan to PC) / Re: Scan to PC in Linux
« on: April 03, 2013, 04:11:57 »
Nice, thank you! I hope it isn't too much trouble for you. Only (review? and) sign the packages and add them to the repo or am I thinking too simple? If you need anything else just tell me.

On another note: Fixed dependency issues with python-pysnmp* on ubuntu quantal (12.10), tested before only on precise (12.04): new version attached.

deb file for GUI (ubuntu application indicator)

I finally got it to work! It seems in the SANE backend for the CLX-3305W multi-page scanning is not implemented. That's why I wrote a TCP (and UDP) proxy that interferes with these messages as a man in the middle and recreates what the Samsung Windows server is doing. (Yet more reverse enginerring ... :| ) In the attached deb package this new method is disabled by default (you can enable it by editing `/etc/samsungScannerServer.conf`).

So, deb packages should install and work out of the box. The GUI package is an application indicator for ubuntu that provides status messages and easy clicks to restart / stop the server app. (Helpful if you don't run this on a server but your desktop PC or notebook.) Changelogs are included in the deb packages.

I provided the script is for use with the tarball in the previous post (since the old script was broken) for historical reasons. But you should use this version, since it does not break any functionality!

EDIT: GUI deb file in next post. Misclicked, sry ... am a little tired. Just ignore the tar.gz file.

bchemnet is right of course. However you should benchmark if the open source foomatic driver really gives you good printing results.

This page is pretty informative: It's German but the main point is to assess the printing quality (Druck-Qualität) of different drivers (Treiber) ... And that's about all German you need to know to understand the pictures. ;) They used the CLP-300 for their tests. I recommend you closely compare foomatic results to Windows and Unified Linux Driver and then consider which one is best.

One main issue seems to be printing black (text) in color mode where some drivers (especially the Unified Driver???) print black as a combination of CMY but do not use K, which of course gives horrible results ...

EDIT: fixed link

Ok, I now post a new version 0.2.2 with a few bug fixes and enhancements by me. For me this is still not working correctly, I can only scan one image and then have to wait around 5 minutes to do the next without restart of the server. But I still wanted to post this (as I think cleaner) version, since those problems might be device related. (The original author angelnu has a CLX-3300, I work with a CLX-3305W with updated firmware V3.00.01.18 as of 01/16/2013.)

All you need is in the attachments. To install the server first install needed packages:
Code: [Select]
sudo apt-get install python-imaging-sane python-pypdf python-pysnmp-common
After you downloaded the attached files into one directory, run the following from there:
Code: [Select]
bash samsungScannerServer_v022.tgz
and answer Yes to continue with default settings (nothing to be overwritten during 1st time install).

Start the server with:
Code: [Select]
sudo service samsungScannerService start # or stop or restart

If you want the server to be registered for automatic start up on system boot, run:
Code: [Select]
sudo update-rc.d samsungScannerServer defaultsAnd if you want to unregister it:
Code: [Select]
sudo update-rc.d -f samsungScannerServer remove

Read the changelog, if you wanna know what's new (and inspect the code if you like) and have fun. ;)

EDIT: In the changelog I meant uid 1000 (!not 100!).
EDIT: The script is not the correct one (it is for a GUI package, sry my bad!) just use the script in the next post.

How to use:
 - reboot or run "sudo service samsungScannerServer start"
For other users to know: Being started on system boot is not the default behaviour.

If you want the server to be registered for automatic start up on system boot, run:
Code: [Select]
sudo update-rc.d samsungScannerServer defaultsAnd if you want to unregister it:
Code: [Select]
sudo update-rc.d -f samsungScannerServer remove

With my configuration I get the same error behaviour with Qt4. The /tmp/ log file of is attached. Reverting to Qt3 makes the problem go away ... ;)

Printing / Re: slpr not working (broken link?)
« on: March 09, 2013, 22:20:39 »
The link replacement as suggested by you, @bchemnet, didn't work out, the exact same error message was printed to stderr rather than recorded in the /tmp/ log file. So IMHO the double link solution works better or more like the Samsung developer(s) probably wanted it to work ...

Either way, the problem persists: I can't print with slpr.

Printing / slpr still not working
« on: March 09, 2013, 21:00:08 »
So what I meant is slpr GUI basically works: I can see the GUI and tweak all I want. But then when it comes to printing (pressing 'OK' in the main window) nothing happens.

After running even this simple text file test print command
Code: [Select]
lpr <(echo 'Hello, World!')
the log file in /tmp/ has only one line content:
Code: [Select]
ProcessEx::execute: failed to launch

So what might be the problem or what am I doing wrong?

Printing / slpr not working (broken link?)
« on: March 09, 2013, 20:31:58 »
I use CLX-3305W over WiFi with ubuntu 12.10 (quantal). I have installed the driver over the repository including the samsungmfp-lpr package and everything seems to work fine (with qt3 only, qt4 had known (?) problems). However I wondered, if this slpr is working at all, because I do not get any extra printer options like 'multiple pages per sheet'. When I now run lpr directly (in my PATH /usr/local/bin takes precedence over /usr/bin, so /usr/local/bin/lpr -> ../../../opt/Samsung/mfp/bin/slpr) I get this:
Code: [Select]
$ lpr
/usr/local/bin/lpr: 15: /usr/local/bin/lpr: /usr/local/bin/ not found

So maybe a symbolic link like
Code: [Select]
cd /usr/local/bin
sudo ln -s ../../../opt/Samsung/mfp/bin/
is needed in addition in the samsungmfp-lpr package? (edit: corrected code error, ln finally working)

After I add it (s)lpr starts without problems.

Please correct me if any of my above speculative statements is wrong. Thx!

Scanner Server (Scan to PC) / Re: Scan to PC in Linux
« on: March 09, 2013, 08:13:36 »
OK, I installed it, configured it and it (kind of) works with the CLX-3305W over WiFi! (Only the first page is scanned, and sometimes the server needs to be restarted, maybe more details in a later post.)

But for all other interested people who want to install this in ubuntu you need the following packages for the scan server to work (tested with quantal):

Code: [Select]
sudo apt-get install python-imaging-sane python-pypdf python-pysnmp-common

Scanner Server (Scan to PC) / Re: Scan to PC in Linux
« on: March 08, 2013, 17:06:26 »
@bchemnet: Have you already packaged this and added it to the repository? What would be the package name?

Pages: [1]
Repository Information Legal Contact Alternative Drivers