Installing command line launcher on Linux

How does one install the CLI launcher on Linux? I’m not prompted to install it when I first put it on my system (Fedora 40) and searching for “install” or “command line” or “cli” does not bring anything up.

@hardcoreUFO do you have the path to your binary in your $PATH?

I think I read CLI integration on Linux is broken and disabled in the app image. With help of some nice AI, Sonnet 3.5 probably :smile: , I got this:

#!/bin/bash

# Wrapper script to launch Cursor IDE

# Directory where AppImages are stored
APPIMAGE_DIR="$HOME/Applications"

# Find the most recent Cursor AppImage
CURSOR_APPIMAGE=$(ls -t "$APPIMAGE_DIR"/cursor-*.AppImage | head -n 1)

if [ -z "$CURSOR_APPIMAGE" ]; then
    echo "Error: Cursor AppImage not found in $APPIMAGE_DIR"
    exit 1
fi

# Launch Cursor
"$CURSOR_APPIMAGE" --no-sandbox "$@" &> "$(mktemp /tmp/cursor.XXXXX)" &
disown

Saved it in ~/.local/bin as cursor (or somewhere else in $PATH), set executable flag chmod u+x cursor and it is working fine.

4 Likes

NICE simple solution.

Now running cursor in the terminal brings up Cursor and it lets you open a folder/project.

Running cursor . opens that path IN Cursor. Just like in VS Code with the code command.

2 Likes

This worked for me.

After Cursor 0.46.0 update, path handling changed and Cursor was trying to open passed files and dirs as if launched from /tmp/.mount_cursorXXXX . So after a bit of swearing at Haiku, Sonnet managed to fix it :blush:. Cursor IDE AppImage Launcher (Linux) ($4809431) · Snippets · GitLab

1 Like

This is great thanks for sharing!

It seems like the new appimages start with a capital C so you’ll need to update this.

I have added the capital C support, though I still have access only to 0.46.3 which has name cursor-0.45.14-build-250219jnihavxsz-x86_64.AppImage. Not sure why in the file name is 0.45.14 :man_shrugging:.

I recently reinstalled my OS, Arch Linux BTW!

Wanted to update the script.

  • mkdir ~/Applications

Download the latest Cursor-1.1.6-x86_64.AppImage and move it into Applications/.

Create the following - save as cursor and chmod +x cursor. Save/Move into ~/.local/bin/cursor.

#!/usr/bin/env bash

# Directory where AppImages are stored
APPIMAGE_DIR="$HOME/Applications"

# Glob for both lowercase and uppercase names, sorted by modification time
mapfile -t files < <(ls -t "$APPIMAGE_DIR"/[cC]ursor-*.AppImage 2>/dev/null)

if [ ${#files[@]} -eq 0 ]; then
  echo "Error: No Cursor AppImage found in $APPIMAGE_DIR" >&2
  exit 1
fi

CURSOR_APPIMAGE="${files[0]}"

# Launch the AppImage, forward args, detach properly
"$CURSOR_APPIMAGE" --no-sandbox "$@" &> /dev/null &
disown

Now you can continue to run cursor . from the terminal and open your projects in Cursor.

I have no need for a .Desktop file as I won’t ever have to run Cursor from my app launcher.