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

Status Fixed / completed
Maintainer reply ✓ Yes — grll
Activity 6 comments · opened Jun 4, 2025 · closed Jun 25, 2025
💡 Likely answer: A maintainer (grll, contributor) responded on this thread — see the highlighted reply below.

Environment

  • Platform (select one):
  • [x] Anthropic API
  • [ ] AWS Bedrock
  • [ ] Google Vertex AI
  • [ ] Other: <!-- specify -->
  • 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.

View original on GitHub ↗

6 Comments

grll contributor · 1 year ago

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...

orgoj · 1 year ago

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

DentaCool · 1 year ago

same issue, fix plz

blois collaborator · 1 year ago

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.

xl0 · 1 year ago

@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?

github-actions[bot] · 1 year ago

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.