Author Topic: Compiler settings and syntax highlighting settings being lost  (Read 4866 times)

Offline namosca

  • Multiple posting newcomer
  • *
  • Posts: 12
Compiler settings and syntax highlighting settings being lost
« on: November 01, 2016, 01:22:36 am »
Hello.

Since I have switched to Linux, some settings are always lost when I re-open codeblocks, namely:
-Syntax highlighting theme
-Path of compiler executables
-List of previously opened projects

How can I solve this?

I understood from a chat session on CodeBlocks IRC that this might be due to CodeBlocks not having permission to write on his configuration file. In this case, which file (or directory) should I grant permission, and which concrete type of permission should be given?

Thanks,

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiler settings and syntax highlighting settings being lost
« Reply #1 on: November 01, 2016, 09:03:15 am »
Which version are you using?
This is the path to the file ~/.config/codeblocks/default.conf
I guess you need read and write permissions.

Are you sure C::B is not crashing on exit? To check this start it from terminal and look at the output.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline teto

  • Almost regular
  • **
  • Posts: 127
Re: Compiler settings and syntax highlighting settings being lost
« Reply #2 on: November 02, 2016, 01:59:48 pm »
maybe you opened 2 instances of codeblocks, in which case the last instance that closes overwrites the changes you have made in the other instance.
Try to modify the configuration with just one codeblocks open and close it immediately. Then  launch a new instance and check your changes were saved.

Offline namosca

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Compiler settings and syntax highlighting settings being lost
« Reply #3 on: November 02, 2016, 06:29:04 pm »
Hi Obfuscated, thanks for your information!!

Now, everything works fine. The problem was that only the root was allowed to use the file and, so as a solution I have changed it to be used by me with via the chown command.

I am using version 16.01 installed from apt-get on Ubuntu. Its pretty undesirable that this is the default behaviour.

Any chance it can be improved for future users?

Thank you!
« Last Edit: November 02, 2016, 08:51:04 pm by namosca »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiler settings and syntax highlighting settings being lost
« Reply #4 on: November 02, 2016, 08:56:27 pm »
I am using version 16.01 installed from apt-get on Ubuntu. Its pretty undesirable that this is the default behaviour.

Any chance it can be improved for future users?
What do you mean by this? This is the expected behaviour. The config file is saved at the expected place on both linux and windows systems.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline namosca

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Compiler settings and syntax highlighting settings being lost
« Reply #5 on: November 02, 2016, 09:44:56 pm »
Undesired in the sense that all compiler settings, syntax hightlit settings and preivous projects history are lost when we quit the program.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiler settings and syntax highlighting settings being lost
« Reply #6 on: November 02, 2016, 11:24:15 pm »
The only thing we could do about this issue is to report an error.
We're not setting the permissions on this file to root. You've somehow done it.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline namosca

  • Multiple posting newcomer
  • *
  • Posts: 12
Re: Compiler settings and syntax highlighting settings being lost
« Reply #7 on: November 03, 2016, 07:24:29 am »
When you say reporting an error, you mean reporting to Ubuntu?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiler settings and syntax highlighting settings being lost
« Reply #8 on: November 03, 2016, 09:01:24 am »
No. I mean show a messagebox with the error and record the error message in the log.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]