We need to convert it to work with Python 3
When fixing bug 7554 non-ASCII printer names does not work anymore. (Before it only worked on UTF-8 systems) It should work again, on any system, when tl-limit-printers run with Python 3. This needs to be tested on this bug. (Bug 7554, comment 179) > Tested the following on Ubuntu20.04 with build 6753.r36201: > ✓ ASCII printer name both tlwebadm and tl-limit-printer > ✓ non-ASCII printer name in tlwebadm > ✗ non-ASCII printer name in tl-limit-printers* > ✓ tlwebadm/locations on server with locale GB18030 and UTF-8 > ✓ tl-limit-printers on server with locale GB18030 and UTF-8 > > > * This is broken as long as we still run tl-limit-printers with Python 2. > When tl-limit-printers is running with Python 3 this should work.
Tested thinlocal ---------------- Build 2166. Server on Fedora 34 with cups 2.3.3. Client on Fedora 33. Tested: ✓ Content from stdin ✓ Is printed. ✓ Tempfile on server is removed. ✓ Non-ascii input on UTF-8 system. ✓ Content from file is printed. ✓ Content type is correctly sent to client. ✓ Jobname is correctly sent to client. ✓ vsmserver is not responding -> the job is printed once it's up again
Tested nearest ---------------- Build 2166. Server on Fedora 34 with cups 2.3.3. Client on Fedora 32. Tested: ✓ Content from stdin ✓ Is printed. ✓ Tempfile on server is removed. ✓ Non-ascii input on UTF-8 system. ✓ Content from file is printed. ✓ The client terminal was not found in configuration ✓ Nearest printer is configured as 'nearest'. ✓ ipp command returned != 0 ✓ Multiple copies ✓ Non-ASCII content in file
Tested thinlocal respooling on RHEL 8 (cups-2.2.6) with build 2168. - Given: Two agents configured in a subcluster connected to one master. User has ThinLinc active session on agent A. - When: User connects via ssh to agent B and prints a job to 'thinlocal' printer. - Then: The job is respooled to agent A and then printed to 'thinlocal' on agent A. Finally the job is printed on the local printer of the ThinLinc session. NOTE: ----- Had to allow remote printing on agent A > cupsctl --remote-admin --remote-any --share-printers And disable the firewall to send the printing job.
Tested tl-limit-printers on Fedora 34 with server build 2168. ✓ Limited on session start ✓ Limited on reconnect ✓ No USER variable ✓ User has no session ✓ Limited via hardware address ✓ Limited via location ✓ Non-ASCII printer name (Fixes comment #1 (Only tested on UTF-8 though)) ✓ Multiple users ✓ From same hardware address ✓ From two different hwaddr ✓ One execution of tl-limit-printers updates printers for all users ✓ Connecting from unknown hardware address. ✓ Configured printer that does not exist. ✓ vsmserver not responding
Tested tl-lp-redir on Fedora 34 with server build 2168. Tested this by running this in a ThinLinc session: > echo "text" > /var/opt/thinlinc/sessions/cendio/last/dev/lp0 ✓ The content is printed on the client's local printer. ✓ [..]/dev/lp0 is deleted once the session is terminated.
Tested thinlinc-ps2pdf filter on Fedora 34 with server build 2168. This is tested by printing a postscript file to 'thinlocal', the filter will convert the file to PDF before sending it to the client. ✓ Printing .ps content from stdin ✓ Printing .ps content from file NOTE: Make sure the filter actually is used by checking the cups log. If there is another filter that does the same thing with lower cost it will be used instead. I had to remove '/usr/lib/cups/filter/gstopdf' and then restart cups.
Had to fix some resource warnings. Things that need retesting: tl-limit-printers ----------------- - [ ] Make sure the right information about sessions is fetched - [ ] Can't connect to vsmserver -> no ResourceWarnings - [ ] A printer is configured but does not exists -> check log entry - [ ] Make sure lockfile is closed -> no ResourceWarnings thinlocal --------- - [ ] A job can be printed to local printer - [ ] No ResourceWarnings when vsmserver is unreachable
(In reply to Frida from comment #33) > Had to fix some resource warnings. > > Things that need retesting: > > tl-limit-printers > ----------------- > - [X] Make sure the right information about sessions is fetched > - [X] Can't connect to vsmserver -> no ResourceWarnings > - [X] A printer is configured but does not exists -> check log entry > - [X] Make sure lockfile is closed -> no ResourceWarnings > > > thinlocal > --------- > - [X] A job can be printed to local printer > - [X] No ResourceWarnings when vsmserver is unreachable Tested on Fedora 34 with build 2172.
Tested on SLES 12 (cups-1.7.5), ThinLinc server build 2175: ✓ thinlocal ✓ nearest ✓ l-limit-printers ✓ tl-lp-redir ✗ thinlinc-ps2pdf* * Found a ResourceWarning that needs fixing. > D [28/Jun/2021:15:47:48 +0200] [Job 11] /usr/lib/cups/filter/thinlinc-ps2pdf:38: ResourceWarning: unclosed file <_io.BufferedReader name='/var/spool/cups/d00011-001'>
The resource warning from thinlinc-ps2pdf is now fixed. Tested on SLES 12 with build 2176. Now everything should be converted to Python 3 and tested. Some useful tips for tester: * I mostly used Cups-PDF to check that the prints are correct. * If you want to create a fake printer that does nothing when printed to: > lpadmin -p my_test_printer -E -v file:///dev/null * Easy printing from command line, for example: > echo 'hello' | lpr -P thinlocal
Tested these on a Fedora 33 server with build 2188: Tested thinlocal ---------------- ✓ Content from stdin ✓ Is printed. ✓ Tempfile on server is removed. ✓ Non-ascii input on UTF-8 system. ✓ Content from file is printed. ✓ Content type is correctly sent to client. ✓ Jobname is correctly sent to client. ✓ vsmserver is not responding -> the job is printed once it's up again ✓ Resource warning check: ✓ A job can be printed to local printer ✓ No ResourceWarnings when vsmserver is unreachable Tested tl-limit-printers ------------------------ ✓ Limited on session start ✓ Limited on reconnect ✓ No USER variable ✓ User has no session ✓ Limited via hardware address ✓ Limited via location ✓ Non-ASCII printer name ✓ Multiple users ✓ From same hardware address ✓ From two different hwaddr ✓ One execution of tl-limit-printers updates printers for all users ✓ Connecting from unknown hardware address. ✓ Configured printer that does not exist. ✓ vsmserver not responding Resource warning checks: ✓ Can't connect to vsmserver -> no ResourceWarnings ✓ Make sure the right information about sessions is fetched ✓ Make sure lockfile is closed -> no ResourceWarnings tl-lp-redir ----------- ✓ The content is printed on the client's local printer. ✓ [..]/dev/lp0 is deleted once the session is terminated. thinlinc-ps2pdf --------------- ✓ Printing .ps content from stdin ✓ Printing .ps content from file Looks good! Left to test: Non-ASCII printer names. (non UTF-8 system) Nearest ---------------- Content from stdin Is printed. Tempfile on server is removed. Non-ascii input on UTF-8 system. Content from file is printed. The client terminal was not found in configuration Nearest printer is configured as 'nearest'. ipp command returned != 0 Multiple copies Non-ASCII content in file
Tested on Fedora 33 server with build 2188: Tested nearest ---------------- ✓ Content from stdin ✓ Is printed. ✓ Tempfile on server is removed. ✓ Non-ascii input on UTF-8 system. ✓ Content from file is printed. ✓ The client terminal was not found in configuration ✓ Nearest printer is configured as 'nearest'. ✓ ipp command returned != 0 ✓ Multiple copies ✓ Non-ASCII content in file Left to test: Respooling Non-ASCII printer names. (non UTF-8 system)
tested on build 2188 with Fedora 33 server: ✓ Respooling ✓ Non-ASCII printer names. (non UTF-8 system) Works good!