Menu

#1206 Follow XDG Base Directory Specification on Linux

v_7.x
open
nobody
None
5
2024-05-13
2024-04-10
Zwei
No

Sweet Home 3D appears to use the ~/.eteks/sweethome3d directory to store user-specific data and configuration files not intended to be edited by hand.

Would it be possible to implement the XDG Base Directory specification for Linux? Files controlled by the program (like preferences.xml) as well as the other data files are usually stored in the location $XDG_DATA_HOME if that variable is specified.

Assuming a common default was specified for$XDG_DATA_HOME, the full path to say preferences.xml would be ~/.local/share/eteks/sweethome3d/preferences.xml.

System Info --
OS: Linux 6.8.2
Distro: Arch
Arch: x64
Java:

openjdk 11.0.22 2024-01-16
OpenJDK Runtime Environment (build 11.0.22+7)
OpenJDK 64-Bit Server VM (build 11.0.22+7, mixed mode)

Discussion

  • Emmanuel Puybaret

    If you want to place your data in ~/.local/share/eteks/sweethome3d folder, set the system properties named com.eteks.sweethome3d.applicationFolders and com.eteks.sweethome3d.preferencesFolder as explained in SweetHome3D class API.
    To set these properties with existing SweetHome3D Linux scripts, just use the -D java option, for example:
    exec "$PROGRAM_DIR"/runtime/bin/java -Dcom.eteks.sweethome3d.applicationFolders=~/.local/share/eteks/sweethome3d -Dcom.eteks.sweethome3d.preferencesFolder=~/.local/share/eteks/sweethome3d ...

     

    Last edit: Emmanuel Puybaret 2024-05-13
  • Emmanuel Puybaret

    Ticket moved from /p/sweethome3d/bugs/1256/

     

Log in to post a comment.

MongoDB Logo MongoDB