#2948 closed defect (needinfo)
printing documentation changes
Reported by: | Francesco Potortì | Owned by: | Francesco Potortì |
---|---|---|---|
Priority: | trivial | Milestone: | 4.1 |
Component: | android | Version: | 3.0.x |
Keywords: | printing documentation | Cc: |
Description
I am trying to debug why printing does not work and I found these documentation problems:
The man page does not mention printing. I don't know if this is as it should be.
On the wiki:
Debian nowadays should mention python3-cups in addition to the older python-cups, which is no more available in testing (bullseye)
The debugging section does not mention on which side one should run printing.py
When I run printing.py I get an error. I suppose it is some paths missing:
$ python /usr/lib/python3/dist-packages/xpra/platform/printing.py Traceback (most recent call last): File "/usr/lib/python3/dist-packages/xpra/platform/printing.py", line 11, in <module> from xpra.util import envbool, print_nested_dict ImportError: No module named xpra.util
Attachments (2)
Change History (11)
comment:1 Changed 18 months ago by
Owner: | changed from Antoine Martin to Francesco Potortì |
---|
comment:2 Changed 18 months ago by
The printer was there, I had just missed it.
The error from python comes from Debian testing having python as v2, while the python3-cups is v3. So when calling it one should use python3
, not python
.
The debugging example is written as if printing.py
were executable, which on Debian is not. If it were, the first line would need to use python3
rather than python
.
The script works for listing printers (and the printer is there) but if I try printing I get:
$ python3 /usr/lib/python3/dist-packages/xpra/platform/printing.py /tmp/oneline.txt Traceback (most recent call last): File "/usr/lib/python3/dist-packages/xpra/platform/printing.py", line 202, in <module> sys.exit(main(sys.argv)) File "/usr/lib/python3/dist-packages/xpra/platform/printing.py", line 181, in main printer = printers.keys()[0] TypeError: 'dict_keys' object is not subscriptable
Printing remotely now apparently works, but the printer does not print...
The remote cups server says the file has been printed without error, but the local cups has nothing in the queue of current or completed jobs.
One possible source of problem is that the local printer is a wireless network printer and cups sees it, but in the local print dialogs I see two printers, or sometimes three ones, the other ones I suppose are identified by avahi. I don't think this is a problem with xpra, bunt I wanted to mention it anyway.
These are messages in the server syslog after an attempt at printing. All of them are created by xpraforwarder and have the ame timestamp:
'/usr/lib/cups/backend/xpraforwarder' '3919' 'pot' 'Unsaved Document 1' '1' 'Resolution=600dpi PageSize=A4 overridea4withletter=yes noCollate Duplex=None edgetoedge=yes ColorModel=color joboffset=on manualduplex=off manualfeed=off number-up=1 borderless=on lowsupplies=continue ret=notset job-uuid=urn:uuid:a4737c35-515a-3fd1-51df-6e603ce19026 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1605890948 time-at-processing=1605890948' version 4.0.4, username: pot, title: Unsaved Document 1, filename: -, job_id: 3919 uid=(0, 0, 0), gid=(7, 7, 7) DEVICE_URI=xpraforwarder:/tmp?display=%3A7&source=e489d47d8bd040350eec458e399ddf196a5543bb&socket-path=%2Frun%2Fuser%2F1000%2Fxpra%2Ftucano.isti.cnr.it-7&remote-printer=HP_LaserJet_M15w_8EA306_&remote-device-uri=implicitclass%3A%2F%2FHP_LaserJet_M15w_8EA306_%2F&mimetype=application%2Fpdf parsed attributes={'display': [':7'], 'source': ['e489d47d8bd040350eec458e399ddf196a5543bb'], 'socket-path': ['/run/user/1000/xpra/tucano.isti.cnr.it-7'], 'remote-printer': ['HP_LaserJet_M15w_8EA306_'], 'remote-device-uri': ['implicitclass://HP_LaserJet_M15w_8EA306_/'], 'mimetype': ['application/pdf']} xpra display: :7, socket-path: /run/user/1000/xpra/tucano.isti.cnr.it-7 running: ['xpra', 'print', 'socket:/run/user/1000/xpra/tucano.isti.cnr.it-7', '-', 'application/pdf', 'e489d47d8bd040350eec458e399ddf196a5543bb', 'Unsaved Document 1', 'HP_LaserJet_M15w_8EA306_', '1', 'Resolution=600dpi PageSize=A4 overridea4withletter=yes noCollate Duplex=None edgetoedge=yes ColorModel=color joboffset=on manualduplex=off manualfeed=off number-up=1 borderless=on lowsupplies=continue ret=notset job-uuid=urn:uuid:a4737c35-515a-3fd1-51df-6e603ce19026 job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1605890948 time-at-processing=1605890948'] returncode=0
I suppose the next step is to set -d printing
on both the server and client, right?
Changed 18 months ago by
comment:3 Changed 18 months ago by
I run xpra with -d printing and saved stderr to a file, which is attached as xpra.log
. I opened a remote pdf file and printed it on the local printer. No errors were shown by the printing application, but the local printer did not print.
I think that the offending line in the log may be this one:
org.freedesktop.DBus.Error.ServiceUnknown: The name :1.1683 was not provided by any .service files
but I don't know what it means
comment:4 Changed 18 months ago by
TypeError: 'dict_keys' object is not subscriptable
Fixed in r28074: this script should work with both python2 and python3.
Xpra GTK3 X11 client version 4.0.4-r27557 64-bit
...
The remote cups server says the file has been printed without error, but the local cups has nothing in the queue of current or completed jobs.
I have a suspicion that the file to print has been sent to the client but wrongly rejected.
Try updating to 4.0.5 which has this fix.
comment:5 Changed 18 months ago by
Try updating to 4.0.5 which has this fix.
I was wrong, it does not: you need r28028.
comment:6 Changed 18 months ago by
I applied r28074 and r28028, removed the __pycache__
directory from both the net
and platform
directories, stopped the server and restarted. I see no apparent change. I am attaching the new log as xpra-log-2
, but I can see that there is no difference with the previous log.
Edit: the Debian version is xpra (4.0.4-r27557-1) UNRELEASED
Changed 18 months ago by
comment:7 Changed 17 months ago by
I don't see the dict_keys
error you had before.
What is the problem now?
comment:8 Changed 17 months ago by
Resolution: | → needinfo |
---|---|
Status: | new → closed |
comment:9 Changed 16 months ago by
this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2948
Probably not, but writing documentation takes time.. Feel free to suggest edits.
Replaced: wiki/Printing
That's not right,
xpra.util
is always there:Maybe something is damaged in your installation?