Author Topic: Settings Not Saved & Cannot Open Files with Double Click  (Read 5391 times)

Offline oscarjgv24

  • Single posting newcomer
  • *
  • Posts: 3
Settings Not Saved & Cannot Open Files with Double Click
« on: May 16, 2020, 08:29:25 pm »
I have a problem with my Code Blocks installation.

I am running Ubuntu 18.04, and whenever I save anything in the Settings/Environment tab, for example, open all project files, unchecking allowing running only one instance, or things like this, IT WON'T STAY the next time I restart the program.

I am trying to do this this because FOR SOME REASON, I am unable to open files with double click from my desktop. I can only open ONE file, for example "whatever.cpp", and then when I try to open the next file "whatever2.cpp", it shows me an error saying "whatever.cpp Code:Blocks is ready", and won't open the second file with double click. I have to manually go and find the file from the menu which is annoying!!!!

Please, I need help. This has been an awful experience so far.
« Last Edit: May 16, 2020, 10:18:14 pm by oscarjgv24 »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Settings Not Saved & Cannot Open Files with Double Click
« Reply #1 on: May 16, 2020, 08:51:22 pm »
I am running Ubuntu 18.04, and whenever I save anything in the Settings/Environment tab, for example, open all project files, unchecking allowing running only one instance, or things like this, IT WON'T STAY the next time I restart the program.
What are the permissions of the config file in ~/.config/codeblocks/?

... is fucking annoying!!!!
Please mind your language.

I might know what the problem is. Does doing codeblocks --file=/full/path/to/file.cpp work if you do it in a terminal?
(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 oscarjgv24

  • Single posting newcomer
  • *
  • Posts: 3
Re: Settings Not Saved & Cannot Open Files with Double Click
« Reply #2 on: May 16, 2020, 11:00:03 pm »
Hey man,

Thank you for your prompt reply, and sorry for the language! I was frustrated but I went out to do some exercise and now I'm better. :D XD

The permission of the file ~/.config/codeblocks/default.conf is root. I think this was the problem. I've managed to modify the settings permanently now by opening codeblocks as super user (sudo codeblocks)! Thank you for that!!!!

Regarding the other problem.... After I modified the Settings/Environment to Unchecked "Allow only one running instance (will take place after restart)" & Unchecked "Use an already running instance (if possible)", I am now able to open any file by double clicking one after the other which is great.  Recall that the problem I had was that after I open the first one, the next ones wouldn't open at all and I had to open them through the editor which is annoying. The problem now is that it is opening a new program per file I click, eg. double click "code1.cpp" and it opens CodeBlocks editor 1, double click "code2.cpp" and opens another CodeBlocks editor 2. I'd prefer if all of them were in the same editor and had just tabs on them to quickly swap between programs. Do you know if this is possible?

Thanks in advance!


Offline oscarjgv24

  • Single posting newcomer
  • *
  • Posts: 3
Re: Settings Not Saved & Cannot Open Files with Double Click
« Reply #3 on: May 16, 2020, 11:02:12 pm »
LOL dude, never mind. I just found out I can drag the files into the editor and they would open hahahahahaha!

My god... the mental blocking is real isn't it? XD

All the best.

Cheers!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Settings Not Saved & Cannot Open Files with Double Click
« Reply #4 on: May 17, 2020, 12:36:29 am »
The permission of the file ~/.config/codeblocks/default.conf is root. I think this was the problem. I've managed to modify the settings permanently now by opening codeblocks as super user (sudo codeblocks)! Thank you for that!!!!
This is wrong. You should modify the permissions in a way that your normal user could change them. Search the internet how to it.

Regarding the other problem....
What version are you using? This was a problem in the past, but it should be fixed in the 20.03.
(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!]