feat: replace X11 clipboard with OSC 52 for better remote terminal support#182
Open
guox18 wants to merge 2 commits into
Open
feat: replace X11 clipboard with OSC 52 for better remote terminal support#182guox18 wants to merge 2 commits into
guox18 wants to merge 2 commits into
Conversation
added 2 commits
January 13, 2026 07:01
…pport - Remove clipboard crate dependency (X11-based) - Add base64 crate for encoding - Implement OSC 52 escape sequence for clipboard operations - Works in SSH sessions without X11 forwarding
|
The change in this branch looks as if it will remove the ability to copy to the clipboard, for people using X11 and a terminal emulator that does not support OSC 52. For example, according to the tmux wiki:
Would it be practical to make See also the approach taken in #121. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR replaces the X11-based clipboard implementation with OSC 52 escape sequences.
Motivation
When using jless over SSH without X11 forwarding, the clipboard functionality fails with:
OSC 52 is a terminal escape sequence that allows copying to the local clipboard through the terminal emulator, without requiring X11. It's supported by most modern terminals including:
set -g set-clipboard on)Changes
clipboardcrate dependency (X11-based)base64crate for encodingycommands now work in SSH sessions without X11 forwardingTesting
Tested on remote Linux server via SSH, clipboard copy works correctly with iTerm2.