Hello, I am trying to install Cursor on a fresh Ubuntu 24.04 and I keep getting this error:
Command: ./cursor-0.33.1x86_64.AppImage
Output:
[15782:0509/084956.875712:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I’m aborting now. You need to make sure that /tmp/.mount_cursorgbp94S/chrome-sandbox is owned by root and has mode 4755.
Trace/breakpoint trap (core dumped)
I am not very prolific with AppImage, could you give me any tip to continue the installation?
Cursor AI is a modern AI-driven IDE that boosts productivity for developers. This guide shows how to set up Cursor on your Linux system using a simple script that handles dependencies, downloads the Cursor AppImage, and creates a convenient desktop launcher.
Prerequisites
Ensure you have curl installed on your system. You can install it by running:
bash
Copy code
sudo apt-get update
sudo apt-get install -y curl
Note: If you use a different package manager (like dnf for Fedora or zypper for openSUSE), use it instead.
Installation Script
Copy and paste the following script into a file (e.g., install_cursor.sh):
bash
Copy code
#!/bin/bash
installCursor() {
if ! [ -f /opt/cursor.appimage ]; then
echo "Installing Cursor AI IDE..."
# URLs for Cursor AppImage and Icon
CURSOR_URL="https://downloader.cursor.sh/linux/appImage/x64"
ICON_URL="https://raw.githubusercontent.com/rahuljangirwork/copmany-logos/refs/heads/main/cursor.png"
# Paths for installation
APPIMAGE_PATH="/opt/cursor.appimage"
ICON_PATH="/opt/cursor.png"
DESKTOP_ENTRY_PATH="/usr/share/applications/cursor.desktop"
# Install curl if not installed
if ! command -v curl &> /dev/null; then
echo "curl is not installed. Installing..."
sudo apt-get update
sudo apt-get install -y curl
fi
# Download Cursor AppImage
echo "Downloading Cursor AppImage..."
sudo curl -L $CURSOR_URL -o $APPIMAGE_PATH
sudo chmod +x $APPIMAGE_PATH
# Download Cursor icon
echo "Downloading Cursor icon..."
sudo curl -L $ICON_URL -o $ICON_PATH
# Create a .desktop entry for Cursor
echo "Creating .desktop entry for Cursor..."
sudo bash -c "cat > $DESKTOP_ENTRY_PATH" <<EOL
[Desktop Entry]
Name=Cursor AI IDE
Exec=$APPIMAGE_PATH
Icon=$ICON_PATH
Type=Application
Categories=Development;
EOL
echo "Cursor AI IDE installation complete. You can find it in your application menu."
else
echo "Cursor AI IDE is already installed."
fi
}
installCursor
Save the file and make it executable:
bash
Copy code
chmod +x install_cursor.sh
Run the script:
bash
Copy code
./install_cursor.sh
Explanation
Dependency Installation: The script checks if curl is installed and installs it if necessary.
AppImage Download: It downloads the Cursor AppImage from the specified URL.
Icon Download: It retrieves an icon to be used in the application menu.
Desktop Entry Creation: The script creates a .desktop file, allowing you to launch Cursor from your application menu easily.
Launch Cursor
Once the script completes, you can find Cursor AI in your applications menu. Click to open and start coding!
The script works!! Thank you for the script though after installation the application does not open i would suggest adding the --no-sandbox option on the exec path of the desktop. This fixes the problem as it worked for me.
It opens and sits at the login screen and does not respond when clicking register or login. New ubuntu 24.04, on a framework13, no other software running.
Thank you for the script, it worked. However, after closing the IDE and clicking on the button again it won’t open anymore.
I checked the desktop application and it seems that the cursor.appimage can’t run without the --no-sandbox option.
(base) kyrbuntu@nook:/opt $ ls
containerd cursor.appimage cursor.png google nvidia teamviewer
(base) kyrbuntu@nook:/opt $ ./cursor.appimage
[61178:1218/095118.727150:FATAL:setuid_sandbox_host.cc(158)] The SUID sandbox helper binary was found, but is not configured correctly. Rather than run without sandboxing I'm aborting now. You need to make sure that /tmp/.mount_cursorjgVsYq/chrome-sandbox is owned by root and has mode 4755.
[1] 61178 trace trap (core dumped) ./cursor.appimage
For reference, I’m using Ubuntu 24.04.
I edited the script so the Desktop entry includes the --no-sandbox flag:
[Desktop Entry]
Name=Cursor AI IDE
Exec=$APPIMAGE_PATH --no-sandbox
Icon=$ICON_PATH
Type=Application
Categories=Development;
Then restarted my computer and it seems to be working well so far.
Unfortunately, this is an issue with almost all Electron-based applications.
While we appreciate you, as the community, finding ways to work around this for now, we would love to get this fixed, but this is proving to be a much larger issue, and not something we have the direct ability to solve.
You can see ongoing discussions around this (and no solution yet ) here:
As soon as a fix is available that is safe, secure and reliable, we’ll be sure to roll it out!
Do you add the --no-sandbox option in the script provided, and if so, where exactly in the bash script. Or do we add it while opening cursor on terminal i.e
I have no interest in removing the sandbox protections that AppImage provides, and the last few versions of Cursor’s AppImage are broken, so I created a linux installation script which will install Cursor and fix these issues:
Read this so you understand what it does, and then paste into a .sh file to run.
# Remove any previously installed versions if they exist
sudo rm -rf ./squashfs-root || true
sudo rm -rf /opt/cursor || true
sudo rm -f /usr/share/applications/cursor.desktop || true
sudo rm -f cursor-*.AppImage
# Download the latest version
curl -JLO https://downloader.cursor.sh/linux/appImage/x64
# Extract AppImage and fix permissions
chmod +x ./cursor-*.AppImage # Make executable
./cursor-*.AppImage --appimage-extract # Extract appimage
rm ./cursor-*.AppImage
sudo mv ./squashfs-root /opt/cursor # Move extracted image to program directory
sudo chown -R root: /opt/cursor # Change owner to root
sudo chmod 4755 /opt/cursor/chrome-sandbox # Fix permissions for the sandbox file
sudo find /opt/cursor -type d -exec chmod 755 {} \; # Some directories are only accessible by root which prevents application from launching. Lets fix
sudo chmod 644 /opt/cursor/cursor.png # Make sure the app icon has permission to be viewed
# Create Desktop entry
cat > cursor.desktop <<EOL
[Desktop Entry]
Name=Cursor AI IDE
Exec=/opt/cursor/AppRun
Icon=/opt/cursor/cursor.png
Type=Application
Categories=Development;
EOL
# Set permisisons for .desktop file and move it to the correct directory
sudo chown root: cursor.desktop
sudo chmod 644 cursor.desktop
sudo mv cursor.desktop /usr/share/applications
I created a script that solves most of the common issues Linux users face with the Cursor .AppImage application, making everything easier! No more visiting the website to look for new versions or manually repeating tasks every time you want to update—this script handles all .AppImage-related updates and configurations for you.
See Cursor Setup Wizard in action below and see how it streamlines the entire process:
For full details and instructions, check out the repository's README.md. Here's a quick overview:
Highlights include:
Simplifies Cursor .AppImage management: Fetch updates, manage configurations, and resolve common issues effortlessly.
One command updates: Use the alias cursor-setup in your terminal to check for updates and install the latest .AppImage version anytime.
Optimized defaults: Works out of the box with pre-configured settings tailored for most users.
Customizable paths and themes: Easily modify paths, icons, and even colors to suit your preferences.
Multi-shell support: Automatically adds aliases for Bash and Zsh for quick access.
Detailed feedback: Logs every step of the process for transparency and easier troubleshooting.
Automatic version checks: Fetches the latest version online and compares its MD5 hash with your local version to ensure you're always up-to-date.
Comprehensive setup: Downloads the latest .AppImage, fetches the icon, creates desktop shortcuts, sets up AppArmor, and configures the "cursor" terminal command.