You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@guacamole.apache.org by "Andy Ward (Jira)" <ji...@apache.org> on 2026/03/25 08:11:00 UTC
[jira] [Commented] (GUACAMOLE-2213) systemd ocs prompt on ssh terminal
[ https://issues.apache.org/jira/browse/GUACAMOLE-2213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18068210#comment-18068210 ]
Andy Ward commented on GUACAMOLE-2213:
--------------------------------------
This appears to be because guac_terminal_osc in src/terminal/terminal-handlers.c does not correctly ignore unrecognised OSC sequences. It will revert to guac_terminal_echo on the first unrecognised character received.
The attached patch sets the character handler to a new function, guac_terminal_unknown_osc which ignores all characters until ECMA-48 ST (String Terminator).
> systemd ocs prompt on ssh terminal
> ----------------------------------
>
> Key: GUACAMOLE-2213
> URL: https://issues.apache.org/jira/browse/GUACAMOLE-2213
> Project: Guacamole
> Issue Type: Bug
> Components: SSH
> Affects Versions: 1.6.0
> Reporter: Klaus Tachtler
> Priority: Minor
> Attachments: guac.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> Hi,
> Since {*}systemd version 258.x{*}, systemd installs a script at
> *{{/etc/profile.d/80-systemd-osc-context.sh}}*
> which stores OCS information inside the "bash" PROMPT and is ignored or not displayed by most terminal programs.
> Unfortunately, Apache Guacamole does display it, so that a prompt in the SSH terminal type, e.g., linux, looks like this:
> {code:java}
> 03;start=35429af8-8d4d-43f2-90de-c32ea9389fc0;user=root;hostname=archlinux;machineid=a283760a983749dbb26173669285ae5c;bootid=6df8736c-7230-4081-8028-2c0ef71001c8;pid=768;type=command;cwd=/root[root@archlinux ~]#
> {code}
> A very elegant solution would be to be able to set a terminal type inside the Web-GUI for SSH connections to
> {{dump}}
> as the script would then not change the PROMPT.
> ({_}There are other type like{_} *{{{}ansi{}}}, {{{}linux{}}}, {{xterm}}* \{_}and others to{_}o...)
>
> Please see also: [https://github.com/systemd/systemd/issues/39114]
>
> Thank you in advance.
> Greetings
> Klaus Tachtler.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)