You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by FG74 <fb...@gmail.com> on 2020/11/06 15:12:24 UTC

Re: Guacamole Redirected Printer download files

I know that several years have passed and that downloading the pdf file is
the universal solution. BUT I wanted to ask if you can guide me about the
code to modify in the official version to open the Print Dialog Form instead
of downloading the pdf file.



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Guacamole Redirected Printer download files

Posted by brian mullan <bm...@gmail.com>.
Look into IPP (Internet Printing Protocol) lets you setup any relatively
modern remote printer (most support IPP) and print to it as if it were any
normal printer.

To add a remote printer for me is a 1 liner tjen the printer shows as an
available printer on amy print activity.

The following is a link to a note about configuring IPP from my github

*TIP - How To setup Internet Printing Protocol (IPP everywhere) to print to
any printer from CIAB · Issue #9 · bmullan/ciab-remote-desktop*

**https://github.com/bmullan/ciab-remote-desktop/issues/9**

Don't know if this is helpful but wanted share the info.

Brian

On Fri, Nov 6, 2020, 10:12 AM FG74 <fb...@gmail.com> wrote:

> I know that several years have passed and that downloading the pdf file is
> the universal solution. BUT I wanted to ask if you can guide me about the
> code to modify in the official version to open the Print Dialog Form
> instead
> of downloading the pdf file.
>
>
>
> --
> Sent from:
> http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
> For additional commands, e-mail: user-help@guacamole.apache.org
>
>

Re: Guacamole Redirected Printer download files

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Nov 6, 2020 at 11:56 AM brian mullan <bm...@gmail.com> wrote:

> re IPP (Internet Printing Protocol) I believe IPP is built in to CUPS in
> CUPS latest release and that you can use the CUPS web GUI to configure IPP
> for remote printers.
>
>
I think the challenge with IPP becomes the direction you have to make the
connection. If you're operating in an environment where you do not know the
IP addresses of the clients that are going to be connecting to the remote
servers, then it's hard to be able to run an IPP server on those client
machines that are connecting to Guacamole, and then figure out a way to
tell the remote server (RDP, SSH, etc.) where that client IP is so that you
can then (automatically) set up a connection back to the IPP printer. This
is where something like Google's CloudPrint comes in handy - you can
register your printer on CloudPrint, then sign in with your Google account
on the remote server and use whatever printers are registered.

If you're in an environment where the printers have static IPs, or you can
set up a print server with a static IP and then make that available to the
remote systems, IPP is a great option.

Other than that, I'm not sure if there's any sort of a way to create a
"reverse tunnel" over the HTTP and/or Websocket connection that Guacamole
is using that could be used for that, but I suspect not - and, you still
have the problem of dynamically configuring the printer device on whatever
remote system you're running, which, depending on the remote system, may be
more or less complicated.

-Nick

>

Re: Guacamole Redirected Printer download files

Posted by brian mullan <bm...@gmail.com>.
re IPP (Internet Printing Protocol) I believe IPP is built in to CUPS in
CUPS latest release and that you can use the CUPS web GUI to configure IPP
for remote printers.

On Fri, Nov 6, 2020, 11:50 AM Nick Couchman <vn...@apache.org> wrote:

> On Fri, Nov 6, 2020 at 10:12 AM FG74 <fb...@gmail.com> wrote:
>
>> I know that several years have passed and that downloading the pdf file is
>> the universal solution. BUT I wanted to ask if you can guide me about the
>> code to modify in the official version to open the Print Dialog Form
>> instead
>> of downloading the pdf file.
>>
>>
> To my knowledge this isn't possible in a seamless fashion - that is, there
> is nothing you can do to trigger the print dialog in the browser when you
> print something within the remote session. This used to be possible with
> Java, ActiveX, and/or Flash plugins, but as those have all fallen out of
> support, I don't think that will work.
>
> The only possible solution I can think of is to embed the PDF in a window
> when it is downloaded and then use JavaScript to trigger the print dialog:
>
>
> https://stackoverflow.com/questions/16239513/print-pdf-directly-from-javascript
>
> Beyond that, maybe Google Print?!
>
> -Nick
>

Re: Guacamole Redirected Printer download files

Posted by Remote <in...@remoteitassistant.com>.
Hello,

I would like to know if someone found a solution for this ? I also want to
print preview instead of downloading the file.

Thank you



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Guacamole Redirected Printer download files

Posted by sciUser <sh...@securitycentric.net>.
This may help, 
https://community.bitnami.com/t/printing-not-working-in-rdp/77423
You can also look at React to make the connection.

Hope this helps.



-----
A Cybersecurity Enablement Company 
We don't just run you through the motions, Our labs teach you how to think! 
Known good Guacamole  installations

--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Guacamole Redirected Printer download files

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Nov 6, 2020 at 2:02 PM FG74 <fb...@gmail.com> wrote:

> I know it is possible because in another job we used a product similar to
> Guacamole that generated a virtual printer and when sending the print job
> there a new browser tab was opened with the print dialog form ready to
> press
> the "print" button in the default local printer (the user can change the
> printer).
>
Unfortunately I am a functional user, not a programmer, and I only could see
> a temporary pdf was generated on the server and the new browser tab was
> redirected there with the instruction to print, not to download a file...
>
>
Right, I think that's what I said was the possibility, but this doesn't
give you a completely seamless experience where a print from your remote
connection spools up on a client printer. But it sounds like it would work
for what you're trying to accomplish.

That said, that doesn't mean it's a trivial change. Today, Guacamole Client
does not know the difference between a file transferred because the user
requested it via file redirection and a print job. Assuming you're talking
about printing from RDP connections, the print file download is started
here:

https://github.com/apache/guacamole-server/blob/9df3e294c3f5cb42a51efcea00c7dc384e0b093d/src/protocols/rdp/print-job.c#L138-L140

and then other functions within that file take care of sending along the
chunks of data. However, as you can see in the source code above, all this
does is send a file to the remote client. So, in order to make the browser
behave differently for a print job versus a file download (via drive
redirection or SFTP), you would have to do one of the following things:
1) Create a new channel (instruction) for printing and modify Guacamole
Client to handle the print channel differently from the File channel.
2) Modify the file instruction and put a flag that tells Guacamole client
to try to display (or print) the file in the browser instead of downloading
it automatically.
3) Within Guacamole Client, examine the file type of the incoming file
stream and make a determination about whether to try to display supported
files automatically in the browser if they are of a certain type.

That's just my guess at what it would take without doing much digging. Of
the above, #1, if doable, would definitely achieve what you're looking for
by allowing for the print dialog to be created when the "print"
instruction/channel gets data. #2 could attempt to display the data in the
browser, and possibly generate a print dialog you're looking for depending
on how it was implemented. #3 doesn't really get you seamless printing,
just gets the files displayed automatically in the browser, at which point
you could print it and maybe save a little time of having to open the file
before printing.

-Nick

Re: Guacamole Redirected Printer download files

Posted by FG74 <fb...@gmail.com>.
I know it is possible because in another job we used a product similar to
Guacamole that generated a virtual printer and when sending the print job
there a new browser tab was opened with the print dialog form ready to press
the "print" button in the default local printer (the user can change the
printer).

Unfortunately I am a functional user, not a programmer, and I only could see
a temporary pdf was generated on the server and the new browser tab was
redirected there with the instruction to print, not to download a file...

We are looking to replicate something like this in Guacamole.



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@guacamole.apache.org
For additional commands, e-mail: user-help@guacamole.apache.org


Re: Guacamole Redirected Printer download files

Posted by Nick Couchman <vn...@apache.org>.
On Fri, Nov 6, 2020 at 10:12 AM FG74 <fb...@gmail.com> wrote:

> I know that several years have passed and that downloading the pdf file is
> the universal solution. BUT I wanted to ask if you can guide me about the
> code to modify in the official version to open the Print Dialog Form
> instead
> of downloading the pdf file.
>
>
To my knowledge this isn't possible in a seamless fashion - that is, there
is nothing you can do to trigger the print dialog in the browser when you
print something within the remote session. This used to be possible with
Java, ActiveX, and/or Flash plugins, but as those have all fallen out of
support, I don't think that will work.

The only possible solution I can think of is to embed the PDF in a window
when it is downloaded and then use JavaScript to trigger the print dialog:

https://stackoverflow.com/questions/16239513/print-pdf-directly-from-javascript

Beyond that, maybe Google Print?!

-Nick