Solved Is it possible to run "Cursor AI" (VSCode Modded) Linux AppImage in FreeBSD 14.1?

Hello,

Cursor AI is a VScode editor modded by "Cursor".
It is a game changer for programmers since it has ChatGPT 4o / 4 / 3.5 models implemented and have unlimited chat requests for $20/month.
Has made me 1000x more productive and get projects done quickly.

I'm trying to get it running on FreeBSD with it's Linux compatibility feature and its giving a lot of errors such as:
Code:
/compat/linux/bin/sh: error while loading shared libraries: libtinfo.so.5: wrong ELF class: ELFCLASS32

Anyhow, hope there are other FreeBSD programmers using Cursor AI and maybe figured out how to get it running on FreeBSD.

Here is their git page, seems to be closed source and no source code provided:

Here is their website to obtain the Cursor AI Linux App Image download (they provide a 14 day free trial with unlimited chat requests):

Thanks for any advice.
 
How, specifically, are you unpacking and running it now?

I extracted the linux ".AppImage" using:

/home/user/cursor-0.39.0x86_64.AppImage --appimage-extract

I then tried running the ".AppRun" file in the extracted contents on FreeBSD terminal:

Screenshot_20240806_204902.png


I would run it this way on FreeBSD:
/compat/linux/bin/sh -c './AppRun'

However I think this seems not the ideal way to do it.

Now using a different method, installed "Ubuntu Focal" using the "debootstrap" method, this is new to me and then I chroot into it and did some library installs to it based on the errors I got on executing the .AppImage and now it seems like the .AppImage is executing properly but now there is no display server in the Ubuntu environment and wondering how to go about it:

Running in the chroot of Ubuntu:
root@user:/# /home/user/cursor-0.39.0x86_64.AppImage --no-sandbox

Code:
[28206:0807/003849.722286:ERROR:file_path_watcher_inotify.cc(890)] Failed to read /proc/sys/fs/inotify/max_user_watches
[28205:0807/003849.722293:ERROR:file_path_watcher_inotify.cc(890)] Failed to read /proc/sys/fs/inotify/max_user_watches
[28202:0807/003849.771602:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Error: Unable to retrieve mac address (unexpected format)

at S (/tmp/.mount_cursor8wkG9H/resources/app/out/main.js:1:316561)
at e (/tmp/.mount_cursor8wkG9H/resources/app/out/main.js:1:317120)
at Object.<anonymous> (/tmp/.mount_cursor8wkG9H/resources/app/out/main.js:7:8489)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1311:10)
at Module.load (node:internal/modules/cjs/loader:1098:32)
at Module._load (node:internal/modules/cjs/loader:945:12)
at c._load (node:electron/js2c/node_init:2:13672)
at node:electron/js2c/browser_init:2:121151
at node:electron/js2c/browser_init:2:121360
at node:electron/js2c/browser_init:2:121364
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:392:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10)
at loadBuiltinModule (node:internal/modules/helpers:68:7)
at Module._load (node:internal/modules/cjs/loader:923:17)
at c._load (node:electron/js2c/node_init:2:13672)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:96:12)
at node:internal/main/run_main_module:23:47

[28202:0807/003850.447777:ERROR:ozone_platform_x11.cc(244)] Missing X server or $DISPLAY
[28202:0807/003850.447793:ERROR:env.cc(257)] The platform failed to initialize.  Exiting.

Now with Ubuntu setup, when I run the command below on FreeBSD terminal, I get the following:
root@user:/usr/home/user/Downloads # /compat/linux/ubuntu/bin/bash -c "AppRun --no-sandbox"

Code:
/compat/linux/ubuntu/bin/bash: error while loading shared libraries: libtinfo.so.6: cannot open shared object file: No such file or directory
 
Alright got the GUI to open but now it has lots of network connectivity issues and I can't login, I press the login button and nothing happens:

Screenshot_20240806_234605.png


Error:

root@user:/usr/home/user/Downloads # chroot /compat/linux/ubuntu /bin/sh -c "/home/user/cursor-0.39.0x86_64.AppImage --no-sandbox"

Code:
[14733:0807/034502.188478:ERROR:file_path_watcher_inotify.cc(890)] Failed to read /proc/sys/fs/inotify/max_user_watches
[14732:0807/034502.188475:ERROR:file_path_watcher_inotify.cc(890)] Failed to read /proc/sys/fs/inotify/max_user_watches
[14729:0807/034502.238692:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
Error: Unable to retrieve mac address (unexpected format)
at S (/tmp/.mount_cursorPLtgiY/resources/app/out/main.js:1:316561)
at e (/tmp/.mount_cursorPLtgiY/resources/app/out/main.js:1:317120)
at Object.<anonymous> (/tmp/.mount_cursorPLtgiY/resources/app/out/main.js:7:8489)
at Module._compile (node:internal/modules/cjs/loader:1256:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1311:10)
at Module.load (node:internal/modules/cjs/loader:1098:32)
at Module._load (node:internal/modules/cjs/loader:945:12)
at c._load (node:electron/js2c/node_init:2:13672)
at node:electron/js2c/browser_init:2:121151
at node:electron/js2c/browser_init:2:121360
at node:electron/js2c/browser_init:2:121364
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:392:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:328:10)
at loadBuiltinModule (node:internal/modules/helpers:68:7)
at Module._load (node:internal/modules/cjs/loader:923:17)
at c._load (node:electron/js2c/node_init:2:13672)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:96:12)
at node:internal/main/run_main_module:23:47
[14729:0807/034503.045504:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14729:0807/034503.045580:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14729:0807/034503.073033:ERROR:proxy_config_service_linux.cc(621)] inotify_init failed: Function not implemented (38)
[14729:0807/034503.079619:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /tmp/dbus-GAsMMcDeVO: No such file or directory
[14729:0807/034503.079635:ERROR:file_path_watcher_inotify.cc(337)] inotify_init() failed: Function not implemented (38)
[14729:0807/034503.079677:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /tmp/dbus-GAsMMcDeVO: No such file or directory
[14729:0807/034503.079708:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /tmp/dbus-GAsMMcDeVO: No such file or directory
[14729:0807/034503.079738:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /tmp/dbus-GAsMMcDeVO: No such file or directory
[14729:0807/034503.109285:ERROR:udev_watcher.cc(51)] Failed to initialize a udev monitor.
[14729:0807/034503.413803:ERROR:proxy_config_service_linux.cc(621)] inotify_init failed: Function not implemented (38)
[14729:0807/034503.522723:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14729:0807/034503.522775:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[14729:0807/034503.523519:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /var/run/dbus/system_bus_socket: No such file or directory
[main 2024-08-07T03:45:03.527Z] [File Watcher (node.js)] Failed to watch /root/.config/Cursor/User for changes using fs.watch() (Error: ENOSYS: function not implemented, watch '/root/.config/Cursor
/User')
[main 2024-08-07T03:45:03.738Z] update#setState disabled
[main 2024-08-07T03:45:03.738Z] update#ctor - updates are disabled as there is no update URL
[14729:0807/034503.742276:ERROR:bus.cc(407)] Failed to connect to the bus: Failed to connect to socket /tmp/dbus-GAsMMcDeVO: No such file or directory
[main 2024-08-07T03:45:03.746Z] [File Watcher (node.js)] Failed to watch /root/.config/Cursor/User/settings.json for changes using fs.watch() (Error: ENOSYS: function not implemented, watch '/root/
.config/Cursor/User/settings.json')
[main 2024-08-07T03:45:03.807Z] [storage state.vscdb] error checking size of src.vs.platform.reactivestorage.browser.reactiveStorageServiceImpl.persistentStorage.workspaceUser: Error: Unexpected nu
mber of rows - 0
[main 2024-08-07T03:45:03.811Z] [uncaught exception in main]: Error: SQLITE_CANTOPEN: unable to open database file
[main 2024-08-07T03:45:03.811Z] Error: SQLITE_CANTOPEN: unable to open database file
[14729:0807/034503.891718:ERROR:proxy_config_service_linux.cc(621)] inotify_init failed: Function not implemented (38)
[14739:0807/034504.217130:ERROR:command_buffer_proxy_impl.cc(131)] ContextResult::kTransientFailure: Failed to send GpuControl.CreateCommandBuffer.
[main 2024-08-07T03:45:06.785Z] vscode-file: Refused to load resource /tmp/.mount_cursor5X646X/resources/app/extensions/theme-seti/icons/seti.woff from vscode-file: protocol (original URL: vscode-f
ile://vscode-app/tmp/.mount_cursor5X646X/resources/app/extensions/theme-seti/icons/seti.woff)
[main 2024-08-07T03:45:08.164Z] [File Watcher (node.js)] Failed to watch /root/.config/Cursor/User for changes using fs.watch() (Error: ENOSYS: function not implemented, watch '/root/.config/Cursor
/User')
[main 2024-08-07T03:45:08.165Z] [File Watcher (node.js)] Failed to watch /root/.config/Cursor/User/settings.json for changes using fs.watch() (Error: ENOSYS: function not implemented, watch '/root/
.config/Cursor/User/settings.json')
[main 2024-08-07T03:45:08.215Z] [File Watcher (node.js)] Failed to watch /root/.cursor/extensions for changes using fs.watch() (Error: ENOSYS: function not implemented, watch '/root/.cursor/extensi
ons')
[main 2024-08-07T03:45:08.215Z] [File Watcher (node.js)] Failed to watch /root/.cursor/extensions/extensions.json for changes using fs.watch() (Error: ENOSYS: function not implemented, watch '/root
/.cursor/extensions/extensions.json')
 
Alright.

I found an alternative way to run Cursor AI IDE (Linux) on FreeBSD on "native" sort of way...

Simply use X11 SSH method into an Ubuntu Bhyve VM instance running in FreeBSD host.

SSH can run GUI apps. Requires some configurations on guest.

# ssh -X user@ubuntu_vm_ip
$ cursor &

Getting it setup was an easy journey.

Its effective and take low CPU resources too.

Screenshot_20240824_194837.png
 
Back
Top