Netbeans messing up home folder

Starting up latest netbeans from the community (stable), I get lots of folders in my home folder:

$ ls -lht ~
drwxr-xr-x 1 user   32 30 Sep 11.19  netigso
drwxr-xr-x 1 user   72 30 Sep 11.19  var
drwxr-xr-x 1 user  180 30 Sep 11.19  config
-rw------- 1 user   18 30 Sep 11.19  lock
drwxr-xr-x 1 user   32 30 Sep 11.19  lastModified
...

Now I don’t quite understand where to report these things when it is related to a specific package, so I try here. Apologies if I am making noise in the wrong place.

Does it only happen when starting Netbeans or is it at installation time?

A wild guess - could be an issue with your XDG folders missing.

I just threw the package on my system an launched it once - I got no folders like you describe - which makes me think of XDG.

I can find in my .cache/netbeans/$version/ a lastModified folder - in which case it points to the XDG cache folder is missing - which in turn makes apps write directly in your home.

1 Like

Thanks for quick responses. This happens on startup, and again on next startup if I delete them. I also get the question if I want to import from my previously installed version (11.2), which it finds from ~/.netbeans/11.2/. I see that folders ~/.netbeans/12.0 and ~/.cache/netbeans/12.0 have been created, which sounds like plausible destination for such config files. Where would this XDG folder/path be?

$ env | grep XDG
XDG_CURRENT_DESKTOP=KDE
XDG_DATA_DIRS=/home/user/.local/share/flatpak/exports/share:/var/lib/flatpak/exports/share:/usr/local/share:/usr/share
XDG_RUNTIME_DIR=/run/user/1000
XDG_SEAT=seat0
XDG_SEAT_PATH=/org/freedesktop/DisplayManager/Seat0
XDG_SESSION_CLASS=user
XDG_SESSION_DESKTOP=KDE
XDG_SESSION_ID=1
XDG_SESSION_PATH=/org/freedesktop/DisplayManager/Session0
XDG_SESSION_TYPE=x11
XDG_VTNR=1

I can also add that at first it did not want to start, but after I moved /usr/etc/netbeans.clusters to /etc/netbeans.clusters it worked. Not sure I understand fully what impact this has yet, perhaps related.

Edit: The reason I copied this file over was because I got the following error when trying to start the application initially:

% netbeans
Cannot read cluster file: //etc/netbeans.clusters

Aha, I think I answered my own question :man_facepalming:

Moving the file netbeans.conf as well (and netbeans.import just for the sake of it) seems to have solved the issue. I suppose this is some sort of packaging error where these files should normally go to /etc directly?

Arch packaging puts the config in /usr/etc, user defined configs override that, those should be placed in ~/.netbeans/{version}/etc.
From the original post, I would say netbeans_default_userdir was set to ~ instead of the default ${DEFAULT_USERDIR_ROOT}/{version}

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.