IDE in Read-only mode, cannot edit any files

Im using arduino IDE 1.8.19 on manjaro linux. Im unable to edit any files, even new sketches that I open from the IDE using the new button. But when I open the IDE from the terminal using sudo, Im able to edit things but all the libraries and BSPs are missing. See the screenshot below.

I tried both the official version and flatpak versions available in the package manager but to no avail.

Welcome to the forum

What is the location of your Sketchbook folder ?

its within my home directory
Screenshot_20230808_165934

I just tried with a different directory, but that made no difference

Hi @aloysiousbenoy. Please do this:

  1. Select File > Preferences... from the Arduino IDE menus.
    The "Preferences" dialog will open.
  2. Uncheck the box next to "Use External Editor" in the "Preferences" dialog.
  3. Click the "OK" button.

You should now find that you are able to edit files in Arduino IDE.

This "Use External Editor" is intended for users who prefer to use some other text editor (e.g., VS Code, Emacs, Vim) for editing their sketch files, while simultaneously using the unique non-editor capabilities of Arduino IDE such as Library Manager, Boards Manager, compiling, uploading. But you should not enable that preference if you like to use Arduino IDE to edit your sketches.

Thanks that solved it.

You are welcome. I'm glad it is working now.

Regards,
Per