News for hackers. Stuff that matters.
Re:Void: Open-source Cursor alternative by dheera on Thursday May 08, 2025 @02:15PM (#43929402)
The weird thing is, the biggest reason I don't use Cursor much is because they just distribute this AppImage, which doesn't install or add itself to the Ubuntu app menu, it just sits there and I have to do

    sudo chmod 755 path/to/Cursor-0.48.6.x86_64.AppImage
    path/to/Cursor-0.48.6.x86_64.AppImage
and then I get greeted with an error message:

    The setuid sandbox is not running as root. Common causes:
      * An unprivileged process using ptrace on it, like a debugger.
      * A parent process set prctl(PR_SET_NO_NEW_PRIVS, ...)
    Failed to move to new namespace: PID namespaces supported, Network namespace supported, but failed: errno = Operation not permitted
I have to go Googling, then realize I have to run it with

    bin/appimage/Cursor-0.48.6-x86_64.AppImage --no-sandbox
Often I'm lazy to do all of this and just use the Claude / ChatGPT web version and paste code back and forth to VS code.

The effort required to start Cursor is the reason I don't use it much. VS code is an actual, bona fide installed app with an icon that sits on my screen, I just click it to launch it. So much easier. Even if I have to write code manually.

Re:Void: Open-source Cursor alternative by NoahKAndrews on Thursday May 08, 2025 @02:58PM (#43929977)
AppImageLauncher improves the AppImage experience a lot, including making sure they get added to the menu. I'm not sure if it makes launching without the sandbox easier or not.
Re:Void: Open-source Cursor alternative by pineaux on Thursday May 08, 2025 @02:36PM (#43929675)
here's something you could do: fix it with a script or even better, ask claude to make you a script.

Edit: asked gemini2.5 to make the script for you. Copy, chmod and run. (maybe check if I am not trolling you first).

#!/bin/bash

echo "Cursor AppImage Desktop Integration Script" echo "-----------------------------------------"

# --- Configuration --- # Default application name DEFAULT_APP_NAME="Cursor" # Directory to store AppImages APPIMAGE_DIR="$HOME/Applications" # Directory for .desktop files DESKTOP_ENTRY_DIR="$HOME/.local/share/applications" # Directory for icons (optional, if you want to copy the icon) # ICON_DIR="$HOME/.local/share/icons/hicolor/scalable/apps"

# --- Ensure target directories exist --- mkdir -p "$APPIMAGE_DIR" mkdir -p "$DESKTOP_ENTRY_DIR" # mkdir -p "$ICON_DIR" # Uncomment if you choose to copy icons to a standard path

# --- Get AppImage Path --- read -e -p "Enter the full path to your Cursor AppImage file: " APPIMAGE_PATH

if [ ! -f "$APPIMAGE_PATH" ]; then echo "Error: AppImage file not found at '$APPIMAGE_PATH'." exit 1 fi

# --- Get Application Name --- read -p "Enter the name for the application menu shortcut (default: $DEFAULT_APP_NAME): " APP_NAME APP_NAME=${APP_NAME:-$DEFAULT_APP_NAME}

# Sanitize APP_NAME for use in filenames (lowercase, no spaces) DESKTOP_FILE_BASENAME=$(echo "$APP_NAME" | tr '[:upper:]' '[:lower:]' | tr -s ' ' '_' | sed 's/[^a-z0-9_-]//g') if [ -z "$DESKTOP_FILE_BASENAME" ]; then DESKTOP_FILE_BASENAME="cursorapp" # fallback fi

# --- Define Target AppImage Path --- # Use the sanitized app name or the original AppImage name for the stored file # For simplicity, let's use a generic name like AppName.AppImage TARGET_APPIMAGE_NAME="${APP_NAME}.AppImage" TARGET_APPIMAGE_PATH="$APPIMAGE_DIR/$TARGET_APPIMAGE_NAME"

# --- Move and Prepare AppImage --- echo "Copying AppImage to '$TARGET_APPIMAGE_PATH'..." cp "$APPIMAGE_PATH" "$TARGET_APPIMAGE_PATH" if [ $? -ne 0 ]; then echo "Error: Failed to copy AppImage." exit 1 fi

echo "Making AppImage executable..." chmod +x "$TARGET_APPIMAGE_PATH" if [ $? -ne 0 ]; then echo "Error: Failed to make AppImage executable." # Consider cleanup or proceed if non-critical for .desktop creation itself fi

# --- Get Icon Path (Optional) --- ICON_ENTRY="Icon=$DESKTOP_FILE_BASENAME" # Default icon name, system might find it if themed read -e -p "Enter the full path to an icon file (e.g., .png, .svg) (optional, press Enter to skip): " ICON_PATH

if [ -f "$ICON_PATH" ]; then # Option 1: Use the direct path in the .desktop file ICON_ENTRY="Icon=$ICON_PATH" echo "Using icon from '$ICON_PATH'."

    # Option 2 (More advanced, if you want to copy it to a standard location):
    # ICON_FILENAME="${DESKTOP_FILE_BASENAME}.png" # Or get extension from ICON_PATH
    # cp "$ICON_PATH" "$ICON_DIR/$ICON_FILENAME"
    # if [ $? -eq 0 ]; then
    #     ICON_ENTRY="Icon=$DESKTOP_FILE_BASENAME" # Or $ICON_FILENAME without path if in theme path
    #     echo "Copied icon to '$ICON_DIR/$ICON_FILENAME'."
    # else
    #     echo "Warning: Could not copy icon. Will use direct path if available or default."
    # fi
elif [ ! -z "$ICON_PATH" ]; then # User entered something, but file not found echo "Warning: Icon file not found at '$ICON_PATH'. Using default icon name." fi

# --- Create .desktop File --- DESKTOP_FILE_PATH="$DESKTOP_ENTRY_DIR/${DESKTOP_FILE_BASENAME}.desktop" echo "Creating .desktop file at '$DESKTOP_FILE_PATH'..."

cat > "$DESKTOP_FILE_PATH" << EOF [Desktop Entry] Version=1.0 Name=$APP_NAME Comment=AI Powered Code Editor (AppImage) Exec="$TARGET_APPIMAGE_PATH" --no-sandbox %U $ICON_ENTRY Terminal=false Type=Application Categories=Development;IDE;TextEditor;Utility; StartupWMClass=Cursor # Often helps with icon association in docks/taskbars. May need adjustment. EOF

# Try to guess StartupWMClass if possible (more advanced, requires running the app and using xprop) # For Cursor, "Cursor" is a likely candidate. If window grouping issues arise, this might need to be # identified using a tool like `xprop WM_CLASS` on an open Cursor window.

if [ $? -ne 0 ]; then echo "Error: Failed to create .desktop file." exit 1 fi

# Make .desktop file readable (and executable for user, as some guides suggest) chmod u+rwx "$DESKTOP_FILE_PATH" # User read, write, execute chmod go+r "$DESKTOP_FILE_PATH" # Group and Other read

# --- Update Desktop Database --- echo "Updating application database..." update-desktop-database -q "$DESKTOP_ENTRY_DIR" # -q for quiet

echo "" echo "-----------------------------------------" echo "Success!" echo "'$APP_NAME' should now be available in your application menu." echo "If it doesn't appear immediately, you might need to log out and log back in or restart your desktop environment." echo "" echo "To launch, you can now search for '$APP_NAME'." echo "The AppImage is stored at: $TARGET_APPIMAGE_PATH" echo "The desktop shortcut file is: $DESKTOP_FILE_PATH" echo "" echo "If you encounter issues with the icon not showing up, ensure the path in '$ICON_ENTRY' is correct or place an icon named '${DESKTOP_FILE_BASENAME}.png' (or .svg) in ~/.local/share/icons/ or a system icon theme directory." echo "-----------------------------------------"

exit 0

Re:Void: Open-source Cursor alternative by johnisgood on Thursday May 08, 2025 @04:00PM (#43930683)
Not only did you mess up the formatting, but you pasted a very lengthy code, generated by an LLM. Perhaps consider using a pastebin in the future, if at all.