On linux, the XDG Base Directory Specification defines the paths inside the users home directory that should be used for different purposes. Factorio currently saves the data files in $HOME/.factorio which ends up cluttering the home directory even more than it already is or needs to be.
To comply with the standard factorio should:
* Check if $XDG_CONFIG_DIR $XDG_DATA_DIR and $XDG_CACHE_DIR environment variables are set and determine the location of the directories as defined in the standard
* Once the XDG data dirs have been established factorio should place its files as follows:$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.
$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used.
$XDG_DATA_DIRS defines the preference-ordered set of base directories to search for data files in addition to the $XDG_DATA_HOME base directory. The directories in $XDG_DATA_DIRS should be separated with a colon ':'.
If $XDG_DATA_DIRS is either not set or empty, a value equal to /usr/local/share/:/usr/share/ should be used.
$XDG_CONFIG_DIRS defines the preference-ordered set of base directories to search for configuration files in addition to the $XDG_CONFIG_HOME base directory. The directories in $XDG_CONFIG_DIRS should be seperated with a colon ':'.
If $XDG_CONFIG_DIRS is either not set or empty, a value equal to /etc/xdg should be used.
o .factorio/config/* should be placed in $XDG_CONFIG_HOME/factorio/
o .factorio/temp/* should be placed in $XDG_CACHE_HOME/factorio/
o Everything else(data files, logs etc) should be placed in $XDG_DATA_HOME/factorio/
A simpler to implement but not-so-compliant alternative that a lot of steam games use is to simply put everything in $XDG_DATA_HOME/factorio/. While this technically achieves the purpose of getting the files off the home directory root, full compliance with the standard would be much better in my opinion.
 https://specifications.freedesktop.org/ ... atest.html