claude-code icon indicating copy to clipboard operation
claude-code copied to clipboard

[BUG] Claude Code doesn't detect Cursor IDE on Linux

Open lukyncze opened this issue 5 months ago • 3 comments

Environment

  • Platform (select one):
    • [x] Anthropic API
    • [ ] AWS Bedrock
    • [ ] Google Vertex AI
    • [ ] Other:
  • Claude CLI version: v1.0.10
  • Operating System: Ubuntu 22.04
  • Terminal: Cursor integrated terminal

Bug Description

Claude Code doesn't detect that the IDE is cursor

Steps to Reproduce

  1. Open Cursor IDE
  2. Run claude in the integrated terminal
  3. Check /ide

Expected Behavior

I expect Claude to detect that I'm using Cursor.

Actual Behavior

Output from the /status command:

IDE Integration • /config
 ⚠  Error installing Cursor extension: 1: 1 [139092:0604/103908.228059:ERROR:ozone_platform_x11.cc(246)] Missing X server or $DISPLAY
    [139092:0604/103908.228242:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.

    Please restart your IDE and try again.

Output from the /ide command:

Select IDE                                                                                                                                                                      │
│  Connect to an IDE for integrated development features.                                                                                                                          │
│                                                                                                                                                                                  │
│  No available IDEs detected. Make sure your IDE has the Claude Code extension or plugin installed and is running.

Additional Context

Using Cursor version 0.50.5

Output from the /doctor command:

You are running Claude Code from your local installation (~/.claude/local). This installation method does not depend on global npm permissions.

Tried this, but without any success.

lukyncze avatar Jun 04 '25 08:06 lukyncze

You can solve it by making sure the cursor command run: I have this bash script in /home/yourname/.local/bin/cursor:

#!/bin/bash
# Ensure DISPLAY is set
if [ -z "$DISPLAY" ]; then
    export DISPLAY=:0
fi

exec ~/Applications/Cursor-0.48.8-x86_64.AppImage --no-sandbox "$@"

Make sure it's executable and in your path.

It manages to install with /ide but then it spawns always 3 new cursor instance upon opening Claude Code and it doesnt show the diff as it does in vscode...

grll avatar Jun 05 '25 19:06 grll

Manual installation of the extension works for me, roughly according to https://gist.github.com/sotayamashita/3da81de9d6f2c307d15bf83c9e6e1af6

orgoj avatar Jun 09 '25 20:06 orgoj

same issue, fix plz

DentaCool avatar Jun 23 '25 15:06 DentaCool

This is caused by https://forum.cursor.com/t/cursor-on-linux-does-not-support-flags/97970.

The extension is now published at https://marketplace.visualstudio.com/items?itemName=anthropic.claude-code, if you install from the marketplace then it should work.

blois avatar Jun 25 '25 01:06 blois

@blois Cursor (and I guess many other forks) uses open-vsx.org, which at the moment has version 1.0.29 of the extension. Could you please push updates to open-vsx too?

xl0 avatar Jul 29 '25 19:07 xl0

This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.

github-actions[bot] avatar Aug 06 '25 14:08 github-actions[bot]