Re: Guacamole update: on-screen keyboard and printing
The guacd pdf patch for GS below works fine. Using it in production env. Hope guacd source in GIT can drop that parameter or use another setting. As far as the on-screen keyboard issue is concerned, it happens with Firefox. Here's a screenshot: https://drive.google.com/file/d/159usIgPY1Uw_mKaikLR0PenM7Zb_g_nS/view?usp=sharing My client environment is Ubuntu Linux running latest stable non-ESR Firefox 64bits. Google Chrome does not behave like this. Even if I change keyboard input methods, the on-screen keyboard always stays there. "Unfortunately", it doesn't always happen. Sometimes it connects fine and honors the input method. When it happens, it's for any protocol (I'm using RDP, telnet, ssh), and it keeps happening even if I restart Firefox. Puzzling. It's a problem of course because I can't force users to use Chrome instead of Firefox, and not beng able to get rid of the on-screen keyboard reduces drastically the visual. Thanks, Vieri On Friday, January 14, 2022, 12:37:59 AM GMT+1, Hankins, Jonathan wrote: I believe it introduces the .setpdfwrite command, so you would need to remove it too: https://www.ghostscript.com/doc/current/Use.htm > -c token ... > -c string ...Interprets arguments as PostScript code up to the next argument > that begins with "-" followed by a non-digit, or with "@". For example, if > the file quit.ps contains just the word "quit", then -c quit on the command > line is equivalent to quit.ps there. Each argument must be valid PostScript, > either individual tokens as defined by the token operator, or a string > containing valid PostScript. Leaving the "-c" isn't causing any harm in this case due to the statement in bold above, but it should be removed to be proper/safe. FWIW the gs(1) man page on my system did not cover -c, but the docs do. On Thu, Jan 13, 2022 at 5:29 PM Vieri wrote: > Thanks, Jonathan. > > With guacd GIT there's only one place to delete which is: > > --- a/src/protocols/rdp/print-job.c 2022-01-13 23:56:09.624104530 +0100 > +++ b/src/protocols/rdp/print-job.c 2022-01-14 00:11:11.980761279 +0100 > @@ -46,7 +46,6 @@ > "-sDEVICE=pdfwrite", > "-sOutputFile=-", > "-c", > - ".setpdfwrite", > "-sstdout=/dev/null", > "-f", > "-", > > I don't know what the "-c" option does as I haven't found it in the man page. > I'm supposing it has nothing to do with .setpdfwrite. > In any case, I compile guacamole-server with this patch, and I can confirm > that printing to PDF finally works. > > Is a bug report necessary? > > Thanks again, > > Vieri > > > - > To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org > For additional commands, e-mail: user-h...@guacamole.apache.org > > -- Jonathan Hankins Homewood City Schools W: 205-877-4548 This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments are prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved. - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
I believe it introduces the .setpdfwrite command, so you would need to remove it too: https://www.ghostscript.com/doc/current/Use.htm -c token ... > -c string ...Interprets arguments as PostScript code *up to the next > argument that begins with "-" followed by a non-digit*, or with "@". For > example, if the file quit.ps contains just the word "quit", then -c quit > on the command line is equivalent to quit.ps there. Each argument must be > valid PostScript, either individual tokens as defined by the token > operator, or a string containing valid PostScript. Leaving the "-c" isn't causing any harm in this case due to the statement in bold above, but it should be removed to be proper/safe. FWIW the gs(1) man page on my system did not cover -c, but the docs do. On Thu, Jan 13, 2022 at 5:29 PM Vieri wrote: > Thanks, Jonathan. > > With guacd GIT there's only one place to delete which is: > > --- a/src/protocols/rdp/print-job.c 2022-01-13 23:56:09.624104530 +0100 > +++ b/src/protocols/rdp/print-job.c 2022-01-14 00:11:11.980761279 +0100 > @@ -46,7 +46,6 @@ > "-sDEVICE=pdfwrite", > "-sOutputFile=-", > "-c", > -".setpdfwrite", > "-sstdout=/dev/null", > "-f", > "-", > > I don't know what the "-c" option does as I haven't found it in the man > page. I'm supposing it has nothing to do with .setpdfwrite. > In any case, I compile guacamole-server with this patch, and I can confirm > that printing to PDF finally works. > > Is a bug report necessary? > > Thanks again, > > Vieri > > > - > To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org > For additional commands, e-mail: user-h...@guacamole.apache.org > > -- Jonathan Hankins Homewood City Schools W: 205-877-4548 -- This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments are prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
Re: Guacamole update: on-screen keyboard and printing
Thanks, Jonathan. With guacd GIT there's only one place to delete which is: --- a/src/protocols/rdp/print-job.c 2022-01-13 23:56:09.624104530 +0100 +++ b/src/protocols/rdp/print-job.c 2022-01-14 00:11:11.980761279 +0100 @@ -46,7 +46,6 @@ "-sDEVICE=pdfwrite", "-sOutputFile=-", "-c", - ".setpdfwrite", "-sstdout=/dev/null", "-f", "-", I don't know what the "-c" option does as I haven't found it in the man page. I'm supposing it has nothing to do with .setpdfwrite. In any case, I compile guacamole-server with this patch, and I can confirm that printing to PDF finally works. Is a bug report necessary? Thanks again, Vieri - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
FWIW, .setpdfwrite was deprecated in gs 9.5.0 (2019-08-13) and removed in gs 9.5.4 (2021-02-12). Quick googling shows that the removal has broken various projects that involve PDF and use gs over the last year. Vieri, if you are building guacd yourself, it's trivial to remove it: guacamole-server-1.4.0/src/protocols/rdp/print-job.c lines 48 and 49. http://git.ghostscript.com/?p=ghostpdl.git=search=refs%2Fheads%2Fgs9.55.0=commit=setpdfwrite http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=180419375973b9ce4664286a67106d712260ef7f On Thu, Jan 13, 2022 at 4:43 PM Vieri wrote: > > On Thursday, January 13, 2022, 11:30:41 PM GMT+1, Vieri > wrote: > > > It looks like the issue lies in GhostScript itself > > Error: /undefined in .setpdfwrite > > That option is indeed passed to "gs" in the case of the print filter > command used by the RDP support > > I downgraded to ghostscript-gpl-9.52, and PDF printing now works fine! > It also seems that simply removing .setpdfwrite in guacamole should be > fine. It doesn't seem to do much anyway. > > Should a bug report be opened, or is this ML thread enough? > > Thanks again, > > Vieri > > - > To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org > For additional commands, e-mail: user-h...@guacamole.apache.org > > -- Jonathan Hankins Homewood City Schools W: 205-877-4548 -- This e-mail is intended only for the recipient and may contain confidential or proprietary information. If you are not the intended recipient, the review, distribution, duplication or retention of this message and its attachments are prohibited. Please notify the sender of this error immediately by reply e-mail, and permanently delete this message and its attachments in any form in which they may have been preserved.
Re: Guacamole update: on-screen keyboard and printing
On Thursday, January 13, 2022, 11:30:41 PM GMT+1, Vieri wrote: > It looks like the issue lies in GhostScript itself > Error: /undefined in .setpdfwrite > That option is indeed passed to "gs" in the case of the print filter command > used by the RDP support I downgraded to ghostscript-gpl-9.52, and PDF printing now works fine! It also seems that simply removing .setpdfwrite in guacamole should be fine. It doesn't seem to do much anyway. Should a bug report be opened, or is this ML thread enough? Thanks again, Vieri - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
On Thursday, January 13, 2022, 11:22:57 PM GMT+1, Mike Jumper wrote: > It looks like the issue lies in GhostScript itself > Error: /undefined in .setpdfwrite > That option is indeed passed to "gs" in the case of the print filter command > used by the RDP support Well, that's "good" news! Thanks for looking into this. I have gs v. 9.55, and I can try to downgrade all the way down to v. 9.52. I'm guessing you're not seeing my printing problem, so what gs version are you using? Vieri - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
On Thu, Jan 13, 2022 at 2:46 AM Vieri wrote: > > On Thursday, January 13, 2022, 09:55:26 AM GMT+1, Mike Jumper > wrote: > > >> I can even send the "empty" PDF file that the client downloads if that can > >> be of any help. > > > > Sure - I'd be interested to see the content received. > > I'm attaching the PDF. You should see "printer test" on the first page. > Instead, it's blank. > It looks like the issue lies in GhostScript itself, perhaps due to an update that affects the command-line options accepted by "gs". Within the PDF you attached, there's junk at the top consisting of errors/warnings from GhostScript: Error: /undefined in .setpdfwrite Operand stack: Execution stack: %interp_exit .runexec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- --nostringval-- --nostringval-- false 1 %stopped_push .run exec2 --nostringval-- --nostringval-- --nostringval-- 2 %stopped_push --nostringval-- Dictionary stack: --dict:764/1123(ro)(G)-- --dict:0/20(G)-- --dict:75/200(L)-- Current allocation mode is local Searching around for the above error, there's a post that suggests the "-c .setpdfwrite" option has been deprecated by GhostScript: https://stackoverflow.com/questions/57787990/strange-error-on-ghostscript-conversion-ps-to-pdf That option is indeed passed to "gs" in the case of the print filter command used by the RDP support: https://github.com/apache/guacamole-server/blob/b2ae2fdf003a6854ac42877ce0fce8e88ceb038a/src/protocols/rdp/print-job.c#L34-L54 - Mike - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
On Thursday, January 13, 2022, 11:46:38 AM GMT+1, Vieri wrote: >> Are you saying that if you run the 1.3.0 guacd with the 1.4.0 webapp, the >> problem disappears? > > No, in my case rolling back means going back to using my old server which has > both guacd and client at 1.3.0. > > I can try guacd 1.3.0 with client 1.4.0 if you think it's worth a try. I can't compile guacd 1.3.0 on my new server because it fails with my freerdp2 lib which is of course a lot newer that the one on my older server. Going back to my older server, the guacd version is actually: Guacamole proxy daemon (guacd) version 1.2.0 So at this point I don't know what else to try to get printing to PDF back up. Vieri - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
On Thursday, January 13, 2022, 09:55:26 AM GMT+1, Mike Jumper wrote: >> I can even send the "empty" PDF file that the client downloads if that can >> be of any help. > > Sure - I'd be interested to see the content received. I'm attaching the PDF. You should see "printer test" on the first page. Instead, it's blank. > Do you see any warnings in the Guacamole logs regarding the HTTP tunnel? The Tomcat Guacamole client log does show anything special except for: [http-nio-8080-exec-1] DEBUG o.a.g.t.StreamInterceptingTunnel - Intercepting output stream #0 of tunnel "4963a8ec-2fca-4c5e-84c7-815f241d84cb". [http-nio-8080-exec-1] DEBUG o.a.g.t.StreamInterceptingTunnel - Intercepted output stream #0 of tunnel "4963a8ec-2fca-4c5e-84c7-815f241d84cb" ended. [pool-1-thread-1] DEBUG o.a.g.rest.auth.HashTokenSessionMap - Checking for expired sessions... [pool-1-thread-1] DEBUG o.a.g.rest.auth.HashTokenSessionMap - Session check completed in 0 ms. The guacamole-server guacd syslog messages are: guacd[2340]: Print job created guacd[2340]: Created PDF filter process PID=2540 guacd[2340]: Reading output from filter process... guacd[2540]: Running gs guacd[2340]: Beginning print stream: new 1.pdf guacd[2340]: Sending 474 byte(s) of filtered output. guacd[2340]: Sending 190 byte(s) of filtered output. guacd[2340]: Sending 35 byte(s) of filtered output. guacd[2340]: Sending 1931 byte(s) of filtered output. guacd[2340]: End of print stream. guacd[2340]: Print job completed. guacd[2340]: Print job closed >> If I roll back to using the previous server printing to PDF works fine (I >>get a PDF with the right content). > > Are you saying that if you run the 1.3.0 guacd with the 1.4.0 webapp, the > problem disappears? No, in my case rolling back means going back to using my old server which has both guacd and client at 1.3.0. I can try guacd 1.3.0 with client 1.4.0 if you think it's worth a try. Vieri new 1.pdf Description: Adobe PDF document - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
On Tue, Jan 11, 2022, 22:19 Vieri wrote: > On Tuesday, January 11, 2022, 11:43:54 PM GMT+1, Mike Jumper < > mjum...@apache.org> wrote: > > > Are you running a copy of the webapp that has been modified from the > mainline .war in any way? > > > No, these are the exact commands I run on my system: > > # wget > https://apache.org/dyn/closer.lua/guacamole/1.4.0/binary/guacamole-1.4.0.war?action=download > -O HMANsq.war > # mv ./HMANsq.war /var/lib/tomcat-8.5-hman/webapps/HMANsg.war > # /etc/init.d/tomcat-8.5-hman restart > * Stopping 'tomcat-8.5-hman' > ... > [ ok ] > * Starting tomcat-8.5-hman > ... > [ ok ] > > I can even send the "empty" PDF file that the client downloads if that can > be of any help. > Sure - I'd be interested to see the content received. Do you see any warnings in the Guacamole logs regarding the HTTP tunnel? If I roll back to using the previous server printing to PDF works fine (I > get a PDF with the right content). > Are you saying that if you run the 1.3.0 guacd with the 1.4.0 webapp, the problem disappears? - Mike
Re: Guacamole update: on-screen keyboard and printing
On Wednesday, January 12, 2022, 05:34:17 PM GMT+1, Vieri wrote: > > I have ghostscript-gpl-9.55.0. > > So I guess gs is not the issue here. > > Any suggestions? Hi, This has become a security issue for me because I cannot upgrade to 1.4.0 as my users require virtual printing to PDF. I'm stuck with 1.3.0 even though I rely on a WAF such as modsecurity. Is there anything at all I can try in order to debug this further as it seems that no one else is having this problem? Or no one else is printing to PDF with 1.4.0? If I were to open a bug report what data/details would be useful? The guacd syslog messages don't say much about printing even in "debug" mode. Where do you think the problem is more likely to be? In guacamole-server or guacamole-client? Vieri - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
Hi again, On the guacamole 1.4.0 server I ran the following test to somehow simulate the gs output guacd would expect (I guess): # pdf2ps guac_print.pdf Warning: File has some garbage before %PDF- . # gs -sDEVICE=pdfwrite -sOutputFile=guac_print_test.pdf guac_print.ps If I open guac_print_test.pdf I can see the page content just fine. I have ghostscript-gpl-9.55.0. So I guess gs is not the issue here. Any suggestions? - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
On Tuesday, January 11, 2022, 11:43:54 PM GMT+1, Mike Jumper wrote: > Are you running a copy of the webapp that has been modified from the mainline > .war in any way? No, these are the exact commands I run on my system: # wget https://apache.org/dyn/closer.lua/guacamole/1.4.0/binary/guacamole-1.4.0.war?action=download -O HMANsq.war # mv ./HMANsq.war /var/lib/tomcat-8.5-hman/webapps/HMANsg.war # /etc/init.d/tomcat-8.5-hman restart * Stopping 'tomcat-8.5-hman' ... [ ok ] * Starting tomcat-8.5-hman ... [ ok ] I can even send the "empty" PDF file that the client downloads if that can be of any help. If I roll back to using the previous server printing to PDF works fine (I get a PDF with the right content). Do you think the issue is in guacamole-client, guacamole-server or a dependency? I was asking to test the intermediate output of gs because maybe that's where the problem is. I haven't tried to manually generate a PDF with gs on the new system, but I guess I coudl try that for starters. Vieri - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Re: Guacamole update: on-screen keyboard and printing
Are you running a copy of the webapp that has been modified from the mainline .war in any way? - Mike On Tue, Jan 11, 2022, 09:10 Vieri wrote: > Hi, > > After 2+ years of Guacamole running fine with the same version (and > dependencies) I decided it was time to update the whole system. > So the new system has a new freerdp lib, a new tomcat (but still 8.5), new > guacd, etc. > The clients and the target systems however are the same. > > There are two major issues I've encountered. > > On a Linux client with Firefox 95.0.1 amd64 the on-screen keyboard is > always there no matter which other "input method" I choose. This does not > occur with Google Chrome. > > Printing to a virtual PDF device opens a valid PDF file with a blank page. > > The target RDP systems are Windows 10, 7 and Server 2012. > > Installing the WAR file from the older Guacamole server does not change > this behavior. > > So I'm guessing the problem might be with either freerdp or guacd. At > least as far as the second issue is concerned (printing). > > The guacd log doesn't display any errors: > > guacd[29594]: Device 0 (PDF local) connected successfully > guacd[29594]: Ignoring printer cached configuration data > guacd[29594]: Print job created > guacd[29594]: Created PDF filter process PID=29882 > guacd[29594]: Reading output from filter process... > guacd[29882]: Running gs > guacd[29594]: Beginning print stream: (*test. Notepad).pdf > guacd[29594]: Sending 474 byte(s) of filtered output. > guacd[29594]: Sending 2156 byte(s) of filtered output. > guacd[29594]: End of print stream. > guacd[29594]: Print job completed. > guacd[29594]: Print job closed > > I have ghostscript 9.55.0. > > Any clues? > > What can I try? > > Regards, > > Vieri > > > > - > To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org > For additional commands, e-mail: user-h...@guacamole.apache.org > >
Re: Guacamole update: on-screen keyboard and printing
Can "Running gs" be more verbose? I just want to make sure ghostscript is producing the right output. I am running both 1.4.0 and GIT versions, and RDP printing (device redirection) is broken on my system. Testing with latest Firefox and Chrome clients. - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org
Guacamole update: on-screen keyboard and printing
Hi, After 2+ years of Guacamole running fine with the same version (and dependencies) I decided it was time to update the whole system. So the new system has a new freerdp lib, a new tomcat (but still 8.5), new guacd, etc. The clients and the target systems however are the same. There are two major issues I've encountered. On a Linux client with Firefox 95.0.1 amd64 the on-screen keyboard is always there no matter which other "input method" I choose. This does not occur with Google Chrome. Printing to a virtual PDF device opens a valid PDF file with a blank page. The target RDP systems are Windows 10, 7 and Server 2012. Installing the WAR file from the older Guacamole server does not change this behavior. So I'm guessing the problem might be with either freerdp or guacd. At least as far as the second issue is concerned (printing). The guacd log doesn't display any errors: guacd[29594]: Device 0 (PDF local) connected successfully guacd[29594]: Ignoring printer cached configuration data guacd[29594]: Print job created guacd[29594]: Created PDF filter process PID=29882 guacd[29594]: Reading output from filter process... guacd[29882]: Running gs guacd[29594]: Beginning print stream: (*test. Notepad).pdf guacd[29594]: Sending 474 byte(s) of filtered output. guacd[29594]: Sending 2156 byte(s) of filtered output. guacd[29594]: End of print stream. guacd[29594]: Print job completed. guacd[29594]: Print job closed I have ghostscript 9.55.0. Any clues? What can I try? Regards, Vieri - To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org For additional commands, e-mail: user-h...@guacamole.apache.org