Well it seems the missing ~/.config/Pinta directory wasn't actually what was causing this because I can now reproduce this even though that folder exists. Here's the error I get:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.UnauthorizedAccessException: Access to the path "/home/andrei/.config/Pinta/layouts.xml" is denied.
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0
at System.IO.FileStream..ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0
at (wrapper remoting-invoke-with-check) System.IO.FileStream:.ctor (string,System.IO.FileMode,System.IO.FileAccess,System.IO.FileShare)
at System.Xml.XmlTextWriter..ctor (System.String filename, System.Text.Encoding encoding) [0x00000] in <filename unknown>:0
at MonoDevelop.Components.Docking.DockFrame.SaveLayouts (System.String file) [0x00000] in <filename unknown>:0
at Pinta.MainWindow.<MainWindow>m__23 (System.Object , System.EventArgs ) [0x00000] in <filename unknown>:0
at Pinta.Core.FileActions.HandlePintaCoreActionsFileExitActivated (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0
at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (object,object[],System.Exception&)
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
--- End of inner exception stack trace ---
at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0
at System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
at System.MulticastDelegate.DynamicInvokeImpl (System.Object[] args) [0x00000] in <filename unknown>:0
at System.Delegate.DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0
at GLib.Signal.ClosureInvokedCB (System.Object o, GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.Invoke (GLib.ClosureInvokedArgs args) [0x00000] in <filename unknown>:0
at GLib.SignalClosure.MarshalCallback (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0
Well it seems the missing ~/.config/Pinta directory wasn't actually what was causing this because I can now reproduce this even though that folder exists. Here's the error I get:
System. Reflection. TargetInvocatio nException: Exception has been thrown by the target of an invocation. ---> System. UnauthorizedAcc essException: Access to the path "/home/ andrei/ .config/ Pinta/layouts. xml" is denied. IO.FileStream. .ctor (System.String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, Boolean anonymous, FileOptions options) [0x00000] in <filename unknown>:0 IO.FileStream. .ctor (System.String path, FileMode mode, FileAccess access, FileShare share) [0x00000] in <filename unknown>:0 invoke- with-check) System. IO.FileStream: .ctor (string, System. IO.FileMode, System. IO.FileAccess, System. IO.FileShare) Xml.XmlTextWrit er..ctor (System.String filename, System. Text.Encoding encoding) [0x00000] in <filename unknown>:0 Components. Docking. DockFrame. SaveLayouts (System.String file) [0x00000] in <filename unknown>:0 w.<MainWindow> m__23 (System.Object , System.EventArgs ) [0x00000] in <filename unknown>:0 FileActions. HandlePintaCore ActionsFileExit Activated (System.Object sender, System.EventArgs e) [0x00000] in <filename unknown>:0 Reflection. MonoMethod: InternalInvoke (object, object[ ],System. Exception& ) Reflection. MonoMethod. Invoke (System.Object obj, BindingFlags invokeAttr, System. Reflection. Binder binder, System.Object[] parameters, System. Globalization. CultureInfo culture) [0x00000] in <filename unknown>:0 Reflection. MonoMethod. Invoke (System.Object obj, BindingFlags invokeAttr, System. Reflection. Binder binder, System.Object[] parameters, System. Globalization. CultureInfo culture) [0x00000] in <filename unknown>:0 Reflection. MethodBase. Invoke (System.Object obj, System.Object[] parameters) [0x00000] in <filename unknown>:0 Delegate. DynamicInvokeIm pl (System.Object[] args) [0x00000] in <filename unknown>:0 MulticastDelega te.DynamicInvok eImpl (System.Object[] args) [0x00000] in <filename unknown>:0 Delegate. DynamicInvoke (System.Object[] args) [0x00000] in <filename unknown>:0 ClosureInvokedC B (System.Object o, GLib.ClosureInv okedArgs args) [0x00000] in <filename unknown>:0 ure.Invoke (GLib.ClosureIn vokedArgs args) [0x00000] in <filename unknown>:0 ure.MarshalCall back (IntPtr raw_closure, IntPtr return_val, UInt32 n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data) [0x00000] in <filename unknown>:0
at System.
at System.
at (wrapper remoting-
at System.
at MonoDevelop.
at Pinta.MainWindo
at Pinta.Core.
at (wrapper managed-to-native) System.
at System.
--- End of inner exception stack trace ---
at System.
at System.
at System.
at System.
at System.
at GLib.Signal.
at GLib.SignalClos
at GLib.SignalClos