site  contact  subhomenews

Request to change default path in mtPaint

September 04, 2019 — BarryK

I raised an issue on github with Dmitry, the maintainer of mtPaint. Reproducing here:

Hi,
Most apps will default Open, Save and Download dialogs to the current directory. That is, if you type say "gimp" in a terminal, the current path will be used as the default when choose File -> Open dialog.

The XDG spec has certain variables that an app can read, at ~/.config/users-dirs.dirs, see here:
https://wiki.archlinux.org/index.php/XDG_user_directories

...however, I haven't found any apps that read these.

mtpaint defaults to whatever the $HOME variable is, and also saves the .mtpaintrc file there. Users would like to have some control of the default, without .mtpaintrc also shifting, by one of the above methods.

Interestingly, inkscape also has this problem, but starting it with "HOME=some/path inkscape" still results in the configuration being created, for case of being logged in as root, at /root/.config/inkscape, while Open/Save dialogs default to "some/path" --- rather odd, but does give the user control.
Anyway, I think the best choice for mtpaint is to do what most apps do, open at the current directory.

I am requesting this, as EasyOS has a need of it.

issue posted here: https://github.com/wjaguar/mtPaint/issues/37

The "home" folder in EasyOS is /mnt/${WKG_DEV}/${WKG_DIR}/home, and at bootup a symlink is created /mnt/wkg to /mnt/${WKG_DEV}/${WKG_DIR}. However, the path /mnt/wkg/home does not make any sense inside a container. I posted about a simplification, path /home, see here:

http://bkhome.org/news/201908/tweaks-to-the-folder-hierarchy.html

The script that runs when X is launched, /usr/bin/xwin, used to have "cd /mnt/wkg/home", now it has "cd /home", before starting X. This sets the "current path", and will cause most apps Open|Save|Download dialogs to default to /home. Except, as described above, for mtPaint and Inkscape.

EDIT 2019-09-07:
Dmitry explained how to fix the problem, see above github link. Yes, /etc/mtpaint/mtpaintrc with "last_dir = /home/media/images" solves the problem of default path at first bootup.
 

Tags: easy