Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: set TERM env variable for terminal to fix Delete key not working#13747

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
majiayu000 wants to merge1 commit intorustdesk:master
base:master
Choose a base branch
Loading
frommajiayu000:fix/terminal-delete-key-13621

Conversation

@majiayu000
Copy link

Summary

  • SetTERM=xterm-256color environment variable when spawning PTY shell
  • This ensures proper handling of terminal control sequences

Problem

Delete/Backspace keys were not working in terminal connections, particularly when connecting from iPad to Linux.

Root cause: The PTY was spawning shell without setting theTERM environment variable, causing the shell to not properly interpret certain control character sequences.

Solution

Addedcmd.env("TERM", "xterm-256color") interminal_service.rs before spawning the shell process. This tells the shell it's running in an xterm-compatible terminal, enabling proper handling of:

  • Delete key (\x7f)
  • Backspace key
  • Arrow keys and other special keys

Test plan

  • Connect from iPad to Linux via terminal
  • Type text and press Delete/Backspace
  • Verify characters are correctly deleted
  • Runecho $TERM and verify output isxterm-256color

Fixes#13621

Set TERM=xterm-256color when spawning PTY shell to ensure properhandling of control sequences. This fixes the issue where Delete/Backspace keys were not working in terminal connections, particularlyfrom iPad to Linux.Fixesrustdesk#13621
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Delete-key not working inside terminal

1 participant

@majiayu000

[8]ページ先頭

©2009-2025 Movatter.jp