Open Haraven opened 1 month ago
As a follow-up, after looking into this issue some more, it seems to be a problem with the way AppImages work. They run in a sandboxed environment and they don't let you run commands that require elevated permissions.
In VS Code this doesn't happen because in my case I am using an RPM version. But since Cursor is only available as an AppImage, the issue persists.
If I try to run Cursor with elevated privileges (sudo /path/to/cursor.AppImage
), I get this terminal error:
[0530/122225.619999:FATAL:electron_main_delegate.cc(295)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.
.
If i try to add the --no-sandbox flag, it still doesn't work. Running /path/to/cursor.AppImage --no-sandbox
still leads to the same permissions error. Running sudo /path/to/cursor.AppImage --no-sandbox
causes another error to pop up in the terminal:
[22642:0530/122312.689466:ERROR:ozone_platform_x11.cc(240)] Missing X server or $DISPLAY [22642:0530/122312.689547:ERROR:env.cc(257)] The platform failed to initialize. Exiting. fish: Job 1, 'sudo path/to/cursor.AppImage' terminated by signal SIGSEGV (Address boundary error)
So, no matter what I do, I can't save files that require elevated permissions. This is annoying, because what I end up doing is opening my file in VS Code, copy pasting my changes, saving it, then going back to Cursor.
This back and forth between Cursor and another text editor with elevated privilege access shouldn't be needed...
Seems like I'm alone with this issue. I did some digging on the Cursor forums and found this thread where someone recommends installing the Save as Root in Remote VSCode extension. That adds a new command you can run via CTRL+SHIFT+P: Save as Root.
That lets you save files with elevated permissions.
It's a workaround, not a solution, though.
Description
On Linux, if you try to save files in protected locations (e.g.,
/usr/bin/
), Cursor throws an error. At first, it says I have insufficient permissions and prompts me to retry as sudo. If I retry as sudo, I get the password prompt, I enter my sudo password, then I get the following error:In VSCode I get the retry as sudo prompt too, but the major difference is that after I enter my password, the file saves successfully.
Steps to reproduce
/usr/bin/
OS information