0

When I try to save a file in /usr/share/gtksourceview-3.0/styles I get a window telling that the file cannot be saved because I can't change the contents of that folder.

When I right-click on the styles folder and go to permissions tab I come to know that the I am not the owner and thus cannot change these permissions. Here is a screenshot of this window:

enter image description here

1

You don't need to edit those files, besides if you upgrade gtksourceview, your changes might get lost.

In order to make changes of your own, create the folder ~/.local/share/gtksourceview-3.0/styles:

mkdir  ~/.local/share/gtksourceview-3.0/styles

then copy the file you are interested in modifying:

cp /usr/share/gtksourceview-3.0/styles/cobalt.xml  ~/.local/share/gtksourceview-3.0/styles

(You can run these commands from the terminal. If you are using Gedit, the correct folder might be ~/.local/share/gedit/styles.)

|improve this answer|||||
0

You need to use elevated privileges to modify files you don't own. So, instead of gedit filename, you'd use gksudo gedit filename. Or, instead of nano filename, you'd use sudo nano filename. Similarly, instead of mv, you'd need sudo mv.

Of course, you should be sure want to modify something that isn't in your home directory. And even if you're sure, make a backup for safety.

|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.