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

Corentin Soriano edited comment on GUACAMOLE-2150 at 11/7/25 11:26 AM:
-----------------------------------------------------------------------

There are two separate issues:
 * nano, which interprets \n as ^J (see GUACAMOLE-666).
 ** The immediate solution is to add the following line in /etc/nanorc
{code:java}
bind ^J enter main{code}
 ** Some terminals have implemented a specific workaround but I don't know if 
that's the best way (example: [Github MS 
Terminal|https://github.com/microsoft/terminal/blob/4b946c0d5cc0264ff0529643f9455fd2c6c227b4/src/interactivity/win32/Clipboard.cpp#L298-L311])

 
 * And the CR LF that cause two linefeeds in shell.

 

Since GUACAMOLE-1682 ([Github 
PR|https://github.com/apache/guacamole-server/pull/395/files]), CRLF are 
replaced by LF before being sent to the console.

I was unable to reproduce this issue without reverting this change. Perhaps a 
specific stty configuration is causing this double line break.

 

[~dangelidaniel] Could you perform some additional tests?
 * Type this command:
{code:java}
xxd -c 1 {code}
And try to paste CR, CRLF and LF (no need for other content in the clipboard).
Example:
{code:java}
[root@localhost ~]# xxd -c 1

00000000: 0a  .

00000001: 0a  .

00000002: 0a  .
^C
[root@localhost ~]# {code}
I get the same result in all three cases. 0x0a corresponds to LF (\n).
I think you'll get a more interesting response than I did.
Could you also try this in version 1.5.5 of guacd to see if the result is 
different?

 
 * Can you give me the output of this command?
{code:java}
stty -a {code}

 


was (Author: JIRAUSER305102):
There are two separate issues:
 * nano, which interprets \n as ^J (see GUACAMOLE-666).
 ** The immediate solution is to add the following line in /etc/nanorc
{code:java}
bind ^J enter main{code}

 ** Some terminals have implemented a specific workaround but I don't know if 
that's the best way (example: [Github MS 
Terminal|https://github.com/microsoft/terminal/blob/4b946c0d5cc0264ff0529643f9455fd2c6c227b4/src/interactivity/win32/Clipboard.cpp#L298-L311])

 
 * And the CR LF that cause two linefeeds in shell.

 

Since GUACAMOLE-1682 ([Github 
PR|https://github.com/apache/guacamole-server/pull/395/files]), CRLF are 
replaced by LF before being sent to the console.

I was unable to reproduce this issue without reverting this change. Perhaps a 
specific stty configuration is causing this double line break.

 

[~dangelidaniel] Could you perform some additional tests?
 * Type this command:
{code:java}
xxd -c 1 {code}
And try to paste CR, CRLF and LF (no need for other content in the clipboard).
Example:
{code:java}
[root@localhost ~]# xxd -c 1

00000000: 0a  .

00000001: 0a  .

00000002: 0a  .
^C
[root@localhost ~]# {code}
I get the same result in all three cases. 0x0a corresponds to LF (\n).
I think you'll get a more interesting response than I did.
Could you also try this in version 1.5.5 of guacd to see if the result is 
different?

 
 * Can you give me the output of this command?
{code:java}
stty -a {code}

 

> 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, 
> image-2025-10-08-10-49-13-653.png, image-2025-10-08-10-50-23-765.png, 
> image-2025-10-08-10-50-42-887.png, image-2025-10-08-10-51-03-383.png, 
> image-2025-10-08-10-53-10-572.png, image-2025-10-08-10-53-30-185.png, 
> image-2025-10-08-10-53-46-350.png, image-2025-10-08-10-54-41-125.png, 
> image-2025-10-08-10-57-46-536.png, image-2025-10-08-10-58-18-771.png, 
> image-2025-10-08-10-59-09-434.png, image-2025-10-08-11-01-51-647.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