1

Unable to save after editing eclipse.ini (OS Ubuntu 12.04 LTS). How to make changes in eclipse.ini file or in anyother .ini file?

Eclipse and Scala IDE requires to set Heap Size atleat to 1024 MB. Current Heap size shows 371MB So I need to modify the eclipse.ini

Kindly note that the dialogue to change the permission is disabled and says that 'You are not the owner so you can not change the permissions. (The owner is : root).

Optimight
  • 2,989
  • 6
  • 30
  • 48
  • check the permissions on the file. – Ajay George Jun 09 '12 at 19:49
  • @Ajay George Ohh... I forgot to mention that the dialogue to change the permission is disabled and says that 'You are not the owner so you can not change the permissions. (The owner is : root. – Optimight Jun 10 '12 at 01:04

1 Answers1

4

If it's actually a permissions problem, you'll need to change the permissions using sudo and chown, then change the permissions if needed.

First, you need to own the file to change the permissions. You do that by running this command: sudo chown your_username:your_username filename

It will ask for your password. Enter the one you logged into Ubuntu with.

Then run: ls -l filename

you'll get output in that may begin something like:

-rw-rw-r--

Note that and are changed to yours. The "-rw-rw-r--" section is what you're interested in next. If the first set of 'r's or 'w's are missing you'll need to add them. Those are the permissions to read and write to the file. You can do that by running this command:

sudo chmod ug+rw

Now editing the file with gedit should work.

I recommend getting familiar with those commands if you're don''t know them already.

  • Sir, can you suggest any documentation /manual to understand those commands. I'll definitely learn them. – Optimight Jun 10 '12 at 01:59
  • I did follow your suggested steps. It has enabled the Save button for eclipse.ini file while opened but there was a warning "Could not create a backup file while saving /usr/lib/eclipse/eclipse.ini" and gave the options 'Save Anyway' amd 'Don't Save'. I continued with 'Save Anyway' but no action. The eclipse.ini remained in original state. Please guide. – Optimight Jun 10 '12 at 02:12
  • Okay. I assumed that your Eclipse was a local install in your home folder. My mistake. The reason this is happening is the eclipse.ini is in a folder that you don't have rights to edit. Type sudo gedit . It will ask you for your password. You should be able to save now. – Craig Jennings Jun 10 '12 at 03:56