User account menu

Putting NetBeans log directory on a temporary file system

Submitted by gunnar
on Sat, 11/05/2016 - 19:36

Whenever you do something, anything, in NetBeans, it will write to the uigestures file in the NetBeans log directory, .netbeans/8.2/var/log for NetBeans 8.2. I finally got tired of hearing my disk being written to every time I pressed a key so I decided to put the log directory on a temporary file system in memory. I imagine this will also be good for the future health of an SSD drive.

I'm using OpenSUSE Leap so there may be variations on other distros.

OpenSUSE will automatically create a directory for me in /run, which uses a tmpfs file system. My personal directory is called /run/user/1000 since 1000 is my uid. There is an environment variable, XDG_RUNTIME_DIR, that points to this directory.

The following script sets up the log directory and ensures that your NetBeans profile has a symbolic link to it: