TRegistry on Linux lazarus / 32-Linux ---------------------------------------------------------------------- tenox · 2018-06-07 00:39 This has been previously answered, TRegistry is multi platform and on Linux is supposed to use reg.xml file inside .config/appname/ folder. Unfortunately this doesn't work for me for some reason. Doing strace I do see that the file is being checked: access("/home/as/.config/test/reg.xml", F_OK) = -1 ENOENT (No such file or directory) However it's never created and creating it by hand with touch does nothing, the file never gets written to. Am I doing something wrong in the code? Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i   Cfg := TRegistry.Create(KEY_READ Or KEY_WRITE);  Cfg.RootKey := HKEY_CURRENT_USER;  if Cfg.OpenKey('Software\\Tenox\\test\\',True) then  begin     Cfg.WriteBool('TestVal', "foo");  end ---------------------------------------------------------------------- Handoko · 2018-06-07 02:37 Hello tenox, Welcome to the forum. This code works on my test on my Linux computer: (I really saw the reg.xml was created) Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TForm1.SaveRegistry(Sender: TObject);var  Cfg: TRegistry;begin  Cfg := TRegistry.Create(KEY_READ Or KEY_WRITE);  Cfg.RootKey := HKEY_CURRENT_USER;  if Cfg.OpenKey('Software\\Tenox\test\\',True) then  begin     Cfg.WriteString('TestVal', 'foo');  end;  Cfg.Free;end; ---------------------------------------------------------------------- marcov · 2018-06-07 08:17 (why all the double backslashes?) As you can see handoko frees the class which might be the trigger to write. You can also do cfg.flush; to force a write without closing. ---------------------------------------------------------------------- tenox · 2018-06-07 22:37 Thank you. There is no flush method on this but free worked. Thanks for help!