[ 
https://issues.apache.org/jira/browse/GUACAMOLE-2150?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18028170#comment-18028170
 ] 

Nick Couchman commented on GUACAMOLE-2150:
------------------------------------------

[~dangelidaniel] and [~sh0tgun], thank you for the additional details. Based on 
the information that you've both provided, what I suspect is happening is that 
the source text, on Windows, has the Windows-type line break + carriage return 
(\n\r) in it, and, when pasting into a Linux-based system, this results in 
multiple line breaks being pasted for the copied/pasted text. I seem to recall 
that we've dealt with this once or twice in the past, but not with any 
definitive solution for it. The tricky part to solving this seamlessly is 
making safe assumptions about where text is coming from and where it's going, 
solving it for most situations but trying to avoid breaking it for everyone 
else.

Corentin and Mike are much more familiar with the terminal code than I, and 
probably better able to assess possible solutions, but I think it could involve 
a combination of:
 * Detecting Client O/S and Browser to try to figure out what safe defaults 
might be for the user. This could happen as part of the hand-shake process 
during connection time.
 * Detecting or allowing the guest system file format type to be set at 
connection time.
 * Sending the client information to guacd so that it can make some decisions 
about how to interpret things that are different between the host and guest 
system.
 * Allowing those things to be overridden in the config file or the Guacamole 
User preferences

I think other SSH clients have similar configurations where you can set the 
default file format and it will adjust how newlines are inserted.

> Pasting doesn't respect text formatting
> ---------------------------------------
>
>                 Key: GUACAMOLE-2150
>                 URL: https://issues.apache.org/jira/browse/GUACAMOLE-2150
>             Project: Guacamole
>          Issue Type: Bug
>    Affects Versions: 1.6.0
>         Environment: Docker deployment on Ubuntu server.
>            Reporter: Daniel D'Angeli
>            Priority: Minor
>         Attachments: image-2025-10-03-15-50-49-130.png, 
> image-2025-10-03-16-03-47-402.png, image-2025-10-07-15-41-13-067.png, 
> image-2025-10-07-16-51-57-522.png, image-2025-10-07-16-53-19-595.png, 
> image-2025-10-07-16-55-43-369.png, image-2025-10-07-16-56-41-600.png, 
> immagine (1).png, immagine.png
>
>
> When pasting long text with multiple rows, Guacamole adds an empty line in 
> between the rows breaking text formatting. This doesn't happen with 
> JumpServer, so it's not browser fault.
> Tried both with Firefox and Chrome, same issue.
> For example, this curl command with multiple rows:
> curl [https://www.google.com|https://www.google.com/] \
>   -X GET \
>   -H "User-Agent: Mozilla/5.0" \
>   -H "Accept: text/html" \
>   -L
> Insted of being executed as a single command, is sent to the target as a 
> command per row, resulting in the screenshot attached.
> Another example is this docker-compose,yaml file:
> services :
>   guacamole:
>     image: guacamole/guacamole: 1.6.0
>     environment :
>     - GUACAMOLE_LDAP_ENCRYPTION_METHOD: starttls
>     - GUACAMOLE_LDAP_DISABLE_VERIFY: "true"
>      - JAVA_OPTS: "-Djavax. net . ssl . trustStore=/path/to/cacerts -Djavax. 
> net. ssl. trustStorePassword=changeit"
>  
> This behaviour doesn't allow operators to smoothly work on machines, 
> resulting in a turn off of guacamole in our infrastructure and look for other 
> solutions.
> Feel free to ask anything if needed.
> Regards,
> Daniel D.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to