Open MingcongBai opened 8 years ago
The workingdir is set on first start of lmms. You can change the working directory in the preferences.
The reason why I opened this issue is that it's not done automatically, and that can bring confusion when one would move his/her home directory.
Say, I had a home directory at /home/jeffbai
, one day I decided to rename myself as "jellybai" and moved the home directory to /home/jellybai
. Then you have a mismatch in the XML file...
Why should someone move her/his home directory?
Why should someone move her/his home directory?
But it can happen though couldn't it... I marked this issue with "trivial" with this thought.
There could be a home:
search path.
If .lmmsrc.xml was not kept in current system-folder, but instead locally in the LMMS installation, it would be possible to have more than one lmms-installation in the partition. Why must this pested dot file exist as a dot-file, and why in a systemfolder for the partition? I suggest to not use dot-file-typ, and place it in root of the separate lmms-installation.
@musikBear, what you are describing is a portable install. By default, most applications write settings for persistent (system-installed) applications to some place within the user's home directory, which aids software developers and users through a sane upgrade process.
Portable installs can't really benefit from an upgrade process, since any self-contained settings will be... self-contained only. However, portable applications do have some advantages such as sandboxing, which allows different configurations, testing multiple versions, etc.
Today, we just assume it's a system-installed application however ideally, the config would be written in a way which tries to write relative to the portable install, yet fallback on a sane temporary location.
On Linux, AppImages have gone to great lengths to ensure portability in regards to file associations, mimetype icons, etc. These can be important to people who want to double-click a .mmpz
file, for example. We could certainly move LMMS to be a "portable-first" application and just continue down this localized-install-centric design for all desktops.
In regards to the naming of the file -- $HOME/.lmmsrc.xml
, I agree, it could be improved.
$HOME
directory decision is a Linux/Unix convention and doesn't really scale or even follow modern conventions for -- say -- MacOS and Windows (at least not exactly, see the 3rd bullet).
. This convention is an old holdover from the idea on Linux that breadcrumbs should be hidden. This too doesn't really scale or even follow modern conventions. As an example, the game Minecraft, writes it's data into options.txt
and launcher_profiles.json
, etc but within the standard application support directory (usually %APPDATA%/Minecraft
or equivalent, thus %APPDATA%/lmms/config.json
would be a more modern approach to tackling this problem.lmms.exe
and config.json
may be preferred. Note Linux doesn't really do this, so we'd need to decide each sane portable config locations per-system that's easy for user's to guess and/or navigate to.In regards to how this influences the LMMS WORKING DIRECTORY
, we (hypothetically) can scale this problem and relavatize based on config path.
Just found that .lmmsrc.xml in my home directory contains references to the absolute path of my home directory.
To attack the original problem, simply supporting -- or more accurately -- writing relative paths using workingdir="./lmms" ... sf2dir="./lmms/samples/sf2/"
should be enough to close out this bug report.
Portable installs can't really benefit from an upgrade process,
-ok then i see a reason in it, just a shame. The dot-file is such a pain in the ...
just a shame. The dot-file is such a pain in the ..
I don't understand this comment. I think I properly explained that this old holdover will eventually go away.
Just found that
.lmmsrc.xml
in my home directory contains references to the absolute path of my home directory.It's quite a trivial issue, but when a user is trying to move his/her home directory, this can be problematic, as the home directory is different to what is specified here,