1

Unable to open elementary's built in text-editor: code.

When launching from dock, it never opens while the cursor gets replaced by a circular spinner for 10-15 seconds. When launched from terminal, it gives the following error - [GLib-GIO] Settings schema 'io.elementary.code.settings' does not contain a key named 'smart-cut-copy' 1 31744 trace trap io.elementary.code

I tried sudo apt install --reinstall io.elementary.code, but it didn't fix anything, but it did give a warning on reinstallation

it didn't resolve, but it did give a warning on reinstallation

No such key 'button-layout' in schema 'org.gnome.mutter:Pantheon' as specified in override file '/usr/share/glib-2.0/schemas/20_elementary.pantheon.wm.gschema.override'; ignoring override for this key. No such key 'enable-animations' in schema 'org.gnome.mutter:Pantheon' as specified in override file '/usr/share/glib-2.0/schemas/20_elementary.pantheon.wm.gschema.override'; ignoring override for this key.

I've also updated to new version of code released today, but it doesn't fix this issue. I tried installation by cloning the repository, but it also gives same errors.

Github Issue

0

As you'll find in the linked Github issue - likely one of the schema settings is interfering with settings for elementary's code app. Since Code is unable to find it's settings it's crashing; it can be fixed if XDG_DATA_DIR is set to a value so that Code gets correct settings. In my case I, initially, had to add following in my terminal's shell startup script (e.g. .zshrc for zsh or .bashrc for bash) -

$ export XDG_DATA_DIRS="/usr/share:$XDG_DATA_DIRS"

but on further reading it I found out that in order to launch it from the dock, I'd need to put it inside ~/.xsessionrc

$ echo export 'XDG_DATA_DIRS="/usr/share:$XDG_DATA_DIRS"' >> ~/.xsessionrc

Just make sure if something goes awry, you should be able to revert the changes to xsessionrc

| improve this answer | |
  • Negative. Adding export XDG_DATA_DIRS="/usr/share:$XDG_DATA_DIRS" to ~/.xsessionrc does not solve the problem. Upgrading io.elementary.code still keeps missing keys. – Top Banana Apr 12 at 10:37
0

You can edit the 20_elementary.pantheon.wm.gschema.override file

sudo nano /usr/share/glib-2.0/schemas/20_elementary.pantheon.wm.gschema.override

Then comment out

#button-layout

Run the installer again

sudo apt install --reinstall io.elementary.code

Then edit the 20_elementary.pantheon.wm.gschema.override file again and uncomment the button-layout line

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.