5

I tried to install cursor.sh in Ubuntu 24.04 but it doesn't work. They give me a cursor-0.34.2x86_64.AppImage file but it doesn't run.

In their forum i found this post:

https://forum.cursor.sh/t/cursor-sh-install-ubuntu-24-04/4838

It sent me to another post:

https://github.com/getcursor/cursor/issues/844#issuecomment-2080288303

I did a profile with their instructions but at Ubuntu restart, my pc didn't boot and show me a ACPI error. Then i had to reinstall Ubuntu.

Somebody knows how to secure install cursor.sh in the last Ubuntu version?

4 Answers4

12

Here's what worked for me from beginning to end.

  1. Install libfuse2t64 with sudo apt install libfuse2t64
  2. Download the Cursor AppImage file from the official website
  3. Navigate to the directory where the .AppImage file sits (e.g. Downloads)
  4. Grant permissions with chmod +x cursor-0.39.5x86_64.AppImage (modify the version and platform to match your .AppImage file)
  5. Move the file to the /opt directory while changing the file name to a more friendly one: sudo mv cursor-0.39.5x86_64.AppImage /opt/cursor.appimage
  6. Create the desktop entry with sudo nano /usr/share/applications/app.desktop and add this to the file:
[Desktop Entry]
Name=Cursor
Exec=/opt/cursor.appimage
Icon=CHANGE THIS TO THE LOCATION OF YOUR ICON FILE (DOWNLOAD IT FROM THE INTERNET)
Type=Application
Categories=Development;
  1. Fix the apparmor error with the script some user added on github with the path that matches our location, i.e. -> make the file at /etc/apparmor.d/cursor-appimage and add the following to it:
# This profile allows everything and only exists to give the
# application a name instead of having the label "unconfined"

abi <abi/4.0>, include <tunables/global>

profile cursor /opt/cursor.appimage flags=(unconfined) { userns,

Site-specific additions and overrides. See local/README for details.

include if exists <local/cursor> }

  1. Run the parser with: sudo apparmor_parser -r /etc/apparmor.d/cursor-appimage
1

Ubuntu 22.04 will break after sudo apt install fuse. Don't do it! It took me a half day to recover the OS. I saw many times the sudo apt install fuse libfuse2 advice (both fuse and libfuse2 packages). But as I was corrected in a comment the libfuse2 shouldn't break Ubuntu.

apt install --simulate fuse.

The following packages will be REMOVED: fuse3 gnome-remote-desktop gnome-session gnome-shell-extension-desktop-icons-ng gnome-snapshot gvfs-fuse nautilus shotwell ubuntu-desktop ubuntu-desktop-minimal ubuntu-gnome-desktop ubuntu-session xdg-desktop-portal xdg-desktop-portal-gnome xdg-desktop-portal-gtk

Ubuntu 22.04 has fuse3 from the box and the installation of the old fuse lib removes many system packages and breaks the system.

Here are the save instructions for installing Cursor AI IDE on Ubuntu without any fuse package:

# Make the downloaded image executable
chmod +x cursor-0.44.11-build-250103fqxdt5u9z-x86_64.AppImage

Extract Cursor files without FUSE

mkdir -p ~/.local/bin/cursor ./cursor-0.44.11-build-250103fqxdt5u9z-x86_64.AppImage --appimage-extract mv squashfs-root/* ~/.local/bin/cursor/

Fix the sandbox permissions

sudo chown root:root ~/.local/bin/cursor/chrome-sandbox sudo chmod 4755 ~/.local/bin/cursor/chrome-sandbox

Run Cursor

./cursor/AppRun

Create a desktop shortcut

mkdir -p ~/.local/share/applications echo "[Desktop Entry] Name=Cursor Exec=$HOME/.local/bin/cursor/AppRun Icon=$HOME/.local/bin/cursor/cursor.png Type=Application Categories=Development;" > ~/.local/share/applications/cursor.desktop

0

Try this:

$ sudo apt install libfuse2

... then re-try running any AppImage.

Hannu
  • 6,605
  • 1
  • 28
  • 45
0

I created this script. I also created a gist to make it easier.

You can run only this.

curl https://gist.githubusercontent.com/tatosjb/0ca8551406499d52d449936964e9c1d6/raw/eec8df843c35872ba3e590c7db5451af7e131906/install-cursor-sh | bash

https://gist.github.com/tatosjb/0ca8551406499d52d449936964e9c1d6

#!/bin/bash

To install on ubuntu

curl -fsSL https://gist.githubusercontent.com/tatosjb/0ca8551406499d52d449936964e9c1d6/raw/254665b405d8fa9a8bb4e69e1605119bdb376aa0/install-cursor-sh | bash

installCursor() { if ! [ -f /opt/cursor.appimage ]; then echo "Installing Cursor AI IDE..." mkdir -p ~/Applications/cursor # URLs for Cursor AppImage and Icon APPIMAGE_URL="https://downloader.cursor.sh/linux/appImage/x64" ICON_URL="https://global.discourse-cdn.com/flex020/uploads/cursor1/original/2X/f/f7bc157cca4b97c3f0fc83c3c1a7094871a268df.png"

    # Paths for installation
    APPDIR=&quot;$HOME/Applications/cursor&quot;
    APPIMAGE_PATH=&quot;$APPDIR/cursor.AppImage&quot;
    ICON_PATH=&quot;$APPDIR/cursor-icon.png&quot;
    UPDATE_SCRIPT_PATH=&quot;$APPDIR/update-cursor.sh&quot;
    DESKTOP_ENTRY_PATH=&quot;/usr/share/applications/cursor.desktop&quot;

    # Install curl if not installed
    echo &quot;curl is not installed. Installing...&quot;
    sudo apt-get update
    sudo apt-get install -y wget dbus-x11 update-notifier

    # Download Cursor AppImage
    echo &quot;Downloading Cursor AppImage...&quot;
    wget -O $APPIMAGE_PATH &quot;$APPIMAGE_URL&quot;
    sudo chmod +x $APPIMAGE_PATH
    sudo ln -s ~/Applications/cursor/cursor.AppImage /usr/local/bin/cursor

    # Download Cursor icon
    echo &quot;Downloading Cursor icon...&quot;
    wget -O $ICON_PATH &quot;$ICON_URL&quot;

    # Create a .desktop entry for Cursor
    echo &quot;Creating .desktop entry for Cursor...&quot;
    sudo bash -c &quot;cat &gt; $DESKTOP_ENTRY_PATH&quot; &lt;&lt;EOL

[Desktop Entry] Name=Cursor Exec=$APPIMAGE_PATH --no-sandbox Icon=$ICON_PATH Type=Application Categories=Utility;Development; EOL

    bash -c &quot;cat &gt; $UPDATE_SCRIPT_PATH&quot; &lt;&lt;EOL

#!/bin/bash

APPDIR=$APPDIR APPIMAGE_URL=$APPIMAGE_URL

wget -O $APPDIR/cursor.AppImage $APPIMAGE_URL chmod +x $APPDIR/cursor.AppImage EOL chmod +x $UPDATE_SCRIPT_PATH

    mkdir -p ~/.config/systemd/user
    bash -c &quot;cat &gt; $HOME/.config/systemd/user/update-cursor.service&quot; &lt;&lt; EOL

[Unit] Description=Update Cursor

[Service] ExecStart=$UPDATE_SCRIPT_PATH Type=oneshot

[Install] WantedBy=default.target EOL

    eval $(dbus-launch --sh-syntax)

    systemctl --user enable update-cursor.service
    systemctl --user start update-cursor.service

    echo &quot;export XDG_RUNTIME_DIR=\&quot;/run/user/\$(id -u)\&quot;&quot; &gt;&gt; $HOME/.zshrc
    echo &quot;export DBUS_SESSION_BUS_ADDRESS=\&quot;unix:path=\${XDG_RUNTIME_DIR}/bus\&quot;&quot; &gt;&gt; $HOME/.zshrc

    echo &quot;

Cursor AI IDE installation complete. You can find it in your application menu.

PLEASE REBOOT YOUR SYSTEM TO MAKE SURE THAT EVERYTHING WAS SET UP PROPERLY " else echo "Cursor AI IDE is already installed." fi }

installCursor

Rid Zeal
  • 103