Change folder that Matlab saves session information

I run Matlab on Linux machines.
Matlab is saving session information (e.g. History.xml, parallel_settings, etc) in a folder called .matlab in my Linux home directory. This home directory doesn't have much space and the .matlab folder has filled it. I cannot seem to figure out how to configure Matlab to save this info elsewhere. It is not the startup folder, because Matlab is doing that the way I want it (and not the home directory).

 Respuesta aceptada

Bjorn Gustavsson
Bjorn Gustavsson el 24 de Sept. de 2020
Which version are you using?
How much space does .matlab take?
On my machine I have subdirectories for 2013a, 2015a and 2020a, they take 3, 165 and 7.2 M respectively, not worryingly much.
I cannot imagine how matlab would be sensitive to a .matlab sym-link pointing to a directory on some other partition, so why not just move the entire .matlab-directory to somewhere nice and spacious, and create a link to there.
HTH

4 comentarios

Paul Safier
Paul Safier el 24 de Sept. de 2020
I am using Matlab2016b, Matlab2018 and Matlab2019a/b. The .matlab folder is exceeding 200MB and that's the limit for the home directory. I simply moved the .matlab to somewhere that I have lots of space, but Matlab created it again in the original location... How do I instruct Matlab to save to the new location?
OK, I'd do something like this:
cd ~
mv .matlab /big/disk/my_suitable_dir/
ln -s /big/disk/my_suitable_dir/.matlab .matlab
I think that would do it. Obviously you might clean out the stuff from the older versions if you no longer use them.
The only peculiarly big waste I found in my .matlab was a file: .matlab/R2015a/HtmlPanel/glnxa64/chromium/libjxbrowser-chromium-lib.so on the order of ~160 MB, that's gonna eat out of a 200 MB-quota...
I have no idea what a -lib.so-file does in a users configuration-directory?!?
Paul Safier
Paul Safier el 24 de Sept. de 2020
Thanks, I'll give that a shot. I appreciate your help.
My pleasure.

Iniciar sesión para comentar.

Más respuestas (1)

Raymond Norris
Raymond Norris el 24 de Sept. de 2020
If you run local parallel pools, the metadata is also stored in ~/.matlab (by default for Linux). You might consider deleting it, as such
c = parcluster('local');
c.Jobs.delete
You'll need to do this for each version of MATLAB. If you want to point MATLAB to another preference directory, you can also set MATLAB_PREFDIR prior to starting MATLAB (or setting it in your .profile/.bashrc/etc. file.

5 comentarios

Raymond, what does/did the libjxbrowser-chromium-lib.so to in my .matlab/R2015a/HtmlPanel/glnxa64/chromium directory? That seems like something that should never have been in such a directory under a user?
Hi Bjorn,
I searched internally and have cobbled together what I think may be happening, but I suspect Technical Support will get this better then I do.
JxBrowser (libjxbrowser-chromium-lib.so) is used for our Documentation rendering and is meant to be stored in <matlabroot>/sys/jxbrowser-chromium/ARCH/chromium. If it can't, we store a copy into ~/.matlab/VERSION/HtmlPanel/ARCH/chromium -- or at least maybe it did at one point.
Here's where it gets a bit sketchy for me. I renamed the library and MATLAB & Documentation started fine. I then renamed the preferences folder, restarted MATLAB and the same (renamed) library appeared (not libjxbrowser-chromium-lib.so). That tells me that when MATLAB started up and didn't find the appropriate preferences folder, it copied over the last known good one I just ran (the renamed preferences folder). So, it's possible that libjxbrowser-chromium-lib.so is actually an artifact of copying previous preference folders over time. I wonder if we placed it in .matlab a long time ago, are now shipping it in <matlabroot>, and now disregard the one in .matlab.
Again, best to check with Technical Support :)
Raymond
@Raymond: Cheers, that sattisfies my curiosity - and since I have large enough space on my /home-partition I will definitely go no further into configuration design details, I have enough problems working on my own problems :)
@Raymond Norris I'm still getting libjxbrowser-chromium-lib.so appearing in mutiple ~/.matlab/VERSION/HtmlPanel/ARCH/chromium folders for multiple (non-admin) users and multiple product installations including R2023a
This duplication is now taking up a lot of space on the shared user account drive. Can we simply have users delete the HtmlPanel folders or is there some reconfiguration needed? Matlab was fully installed already with root privileges - does the help browser download jxbrowser as an additional artifact after installation? I haven't found this .so file in any product installation folders.
thanks
Graham
Hi @Graham McArdle, let me not conject what the file is doing. I would suggest contacting MathWorks Technical Support (support@mathworks.com) to get their advice.

Iniciar sesión para comentar.

Categorías

Más información sobre Introduction to Installation and Licensing en Centro de ayuda y File Exchange.

Productos

Versión

R2019b

Preguntada:

el 24 de Sept. de 2020

Comentada:

el 12 de Mzo. de 2024

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by