Bug 481504

Summary: OSC-8 embedded URL only work after switching to same(!!!!) profile
Product: [Applications] konsole Reporter: Charlemagne Lasse <charlemagnelasse>
Component: generalAssignee: Konsole Bugs <konsole-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: agateau, fanzhuyifan, jurien, lynne
Priority: NOR    
Version First Reported In: 24.01.95   
Target Milestone: ---   
Platform: Debian stable   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 24.12.3
Sentry Crash Report:
Attachments: attachment-241130-0.html

Description Charlemagne Lasse 2024-02-18 10:32:04 UTC
SUMMARY

I wanted to test OSC-8 URLs in konsole. So I printed one which links to a specific line of file. This didn't didn't work at first because this feature is disabled by default. So I went to "Edit Current Profile" -> Mouse -> Miscellaneous and made sure following entries are enabled:

1. Underline links
2. Underline files
3. Text editor command: Kate
4. Allow escape sequences for links
5. Allowed link format: http://;https://;file://
6. Require Ctrl key for drag & drop
7. Enable Alternate Screen buffer profile
8. Disable drag & drop menu for files & URLs
9. Allow Ctrl+scrollweel to some text size
10. Preview colors on hover
11. Allow terminal application to handle clicks and drags

(so only "Open files/links by direct click" was not enabled)

Then I've closed konsole and tried following steps:

STEPS TO REPRODUCE
1. Open new konsole
2. run: printf '\e]8;;file:///etc/passwd#line:3\e\\Open passwd line 3\e]8;;\e\\\n'
3. try to click (with ctrl pressed) on the output -> Fails
4. Use Menubar -> Settings -> Switch Profile -> $CURRENT_PROFILE (which is the default according to settings)
5. run: printf '\e]8;;file:///etc/passwd#line:3\e\\Open passwd line 3\e]8;;\e\\\n'
6. try to click (with ctrl pressed) on the output -> kate opens with /etc/passwd on line 3

OBSERVED RESULT

First output cannot be clicked. The output after switching (to currently running) profile is clickable (and works)

EXPECTED RESULT

First + second output is clickable (and works)

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Debian bookworm amd64
(available in About System)
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8

ADDITIONAL INFORMATION

* runs kwin11-wayland
* There is only two profiles available. "Built-in" and "Shell" (which is marked as default and uses a different color scheme than "Built-in"
* happens with both bash (system default config) and zsh (semantic shell configuration)
Comment 1 Charlemagne Lasse 2024-02-18 10:49:56 UTC
Just as info: The file detection which automatically creates the "links" to click on works perfectly fine. So for example, if I go into the konsole git repository and do following:

git grep -n EscapeSequenceUrlExtractor

Then I can ctrl+click on the file name + line number on the beginning of the line and kate opens at the right position. No need to switch to the already active profile
Comment 2 fanzhuyifan 2024-02-18 23:36:10 UTC
Can reproduce
Comment 3 lynne 2025-02-17 04:58:24 UTC
Can confirm that this still happens on the current version (24.12.2).

Linux/KDE Plasma: Fedora 41 KDE Spin, kernel version `6.12.11-200.fc41.x86_64`
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.2

I'm using Wayland, if that helps.
Comment 4 tcanabrava 2025-02-17 08:06:36 UTC
Created attachment 178459 [details]
attachment-241130-0.html

That's... really weird.
I promess to look at it this week.

On Mon, Feb 17, 2025 at 5:58 AM <bugzilla_noreply@kde.org> wrote:

> https://bugs.kde.org/show_bug.cgi?id=481504
>
> lynne@bune.city changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>                  CC|                            |lynne@bune.city
>
> --- Comment #3 from lynne@bune.city ---
> Can confirm that this still happens on the current version (24.12.2).
>
> Linux/KDE Plasma: Fedora 41 KDE Spin, kernel version
> `6.12.11-200.fc41.x86_64`
> KDE Plasma Version: 6.3.0
> KDE Frameworks Version: 6.10.0
> Qt Version: 6.8.2
>
> I'm using Wayland, if that helps.
>
> --
> You are receiving this mail because:
> You are the assignee for the bug.
Comment 5 Juriën Huisman 2025-04-16 16:31:44 UTC
This appears to be describing the same behaviour as BUG #465911. This is fixed in version 24.12.3.

*** This bug has been marked as a duplicate of bug 465911 ***