Code::Blocks Forums

User forums => Help => Topic started by: namosca on November 01, 2016, 01:22:36 am

Title: Compiler settings and syntax highlighting settings being lost
Post by: namosca 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,
Title: Re: Compiler settings and syntax highlighting settings being lost
Post by: oBFusCATed 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.
Title: Re: Compiler settings and syntax highlighting settings being lost
Post by: teto 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.
Title: Re: Compiler settings and syntax highlighting settings being lost
Post by: namosca 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!
Title: Re: Compiler settings and syntax highlighting settings being lost
Post by: oBFusCATed 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.
Title: Re: Compiler settings and syntax highlighting settings being lost
Post by: namosca 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.
Title: Re: Compiler settings and syntax highlighting settings being lost
Post by: oBFusCATed 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.
Title: Re: Compiler settings and syntax highlighting settings being lost
Post by: namosca on November 03, 2016, 07:24:29 am
When you say reporting an error, you mean reporting to Ubuntu?
Title: Re: Compiler settings and syntax highlighting settings being lost
Post by: oBFusCATed 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.