bugMyPaint - Bugs: bug #13040, put config file into...

 
 
Show feedback again

You are not allowed to post comments on this tracker with your current authentification level.

bug #13040: put config file into $XDG_CONFIG_HOME ( ~/.config/)

Submitted by:  lh <jarryson>
Submitted on:  Sat 21 Feb 2009 06:06:04 PM UTC  
 
Severity: 1 - WishPriority: 5 - Normal
Status: FixedPrivacy: Public
Assigned to: Andrew Chadwick <achadwick>Open/Closed: Closed
Release: Planned Release: None
Operating System: linux

(Jump to the original submission Jump to the original submission)

Mon 23 Jun 2014 09:42:40 PM UTC, comment #18:

[This is a canned response, please forgive the broken formatting: it's one of the many things
Gna! unfortunately does not do well.]

This bug tracker will shortly be moving to Github. As part of this process, we are reviewing
old bug reports on gna.org.

This bug was marked as Fixed long ago, but was still classified as Open. Github does not
distinguish between Fixed+Open and Fixed+Closed in the way we once did here, so this bug is
now being marked Closed, and will not be migrated into the github issues tracker.

If you believe that this bug still affects the most recent git master of MyPaint (and thus
the next release), please feel free to open a new issue on Github about it. Our new issue
trackers are:

https://github.com/mypaint/mypaint/issues
https://github.com/mypaint/libmypaint/issues

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sun 17 Mar 2013 03:36:55 PM UTC, comment #17:

I've added XDG user-config and user-data support in a way that doesn't force it on existing users: https://gitorious.org/mypaint/mypaint/commit/cf723b74cde5d1878a2bc148e5e22b5c60a6e2a1

  • If $HOME/.mypaint exists, it will continue to work
  • If it doesn't exist, MyPaint will use $XDG_DATA_HOME/mypaint and $XDG_CONFIG_HOME/mypaint instead

Please test, particularly on Windows. For now I'll assume this old bug is fixed in 1.1.0+git, and can be closed with the first stable release after 1.1.0.

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sun 17 Mar 2013 03:31:32 PM UTC, comment #16:

I'll assume it will Just Work on Windows since nobody has tested it on that platform.

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sun 10 Mar 2013 06:22:34 PM UTC, comment #15:

Actually if someone with access to Windows could run

I'd be much obliged. FWIW, the results on a Debian box are:

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sun 10 Mar 2013 06:16:00 PM UTC, comment #14:

Reassigning to myself. I think we should support XDG as much as possible, and store our data {brushes, backgrounds, palettes} under $XDG_DATA_HOME as well. However we should support existing user configurations that store configs and user data in $HOME/.config by testing for its existence and using that, with a warning. For new installations, only the new locations would be used.

These can be got at cleanly via glib: glib.get_user_data_dir() and glib.get_user_config_dir(). These paths are the same on Windows, but different on POSIX+XDG systems. I think using those would give on POSIX systems:

For Windows, everything should be the same as it is now according to the glib docs:

Andrew Chadwick <achadwick>
Project AdministratorIn charge of this item.
Sat 05 Jan 2013 07:07:48 PM UTC, comment #13:

"What is planned about FreeDesktop.org XDG basedir specification for MyPaint?"
I think we should follow it, and would welcome a new patch that implements the change and migrates existing settings to new locations.

Jon Nordby <jonnor>
Project Administrator
Fri 21 Dec 2012 06:54:58 PM UTC, comment #12:

>Their old configuration would be ignored. Should ~/.mypaint be >moved automatically


To preserve backward compatibility, you can continue to use ~/.mypaintv if it exits, but using/creating XDG dirs if it not exists.

> XDG_CONFIG_HOME in case the variable exists, but shouldn't the >default be to use ~/.mypaint when it is not set?


Spec says: "If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used. "

Heintzmann Eric <eheintzmann>
Sun 09 Dec 2012 10:13:05 AM UTC, comment #11:

What is planned about FreeDesktop.org XDG basedir specification for MyPaint?

http://ploum.net/post/207-modify-your-application-to-use-xdg-folders
https://live.gnome.org/GnomeGoals/XDGConfigFolders
http://standards.freedesktop.org/basedir-spec/latest/

Eric Heintzmann <eric_h>
Fri 07 Jan 2011 10:48:46 PM UTC, comment #10:

Configuration things have changed quite a bit now, moving this back to wish.

Jon Nordby <jonnor>
Project Administrator
Wed 03 Feb 2010 08:20:50 PM UTC, comment #9:

I have merged master into the boot branch (is this the same as rebasing?) As for removing not XDG related stuff i have no time to do that at the moment. I also see no point in splitting things up. From the start my patch was not intended to fix this bug but to improve the entire configuration management in a platform dependent manner. Attaching a link to this bug report was just a way to make the patch seen.

Besides XDG for Linux it also provides a more natural way of handling configuration on Windows. The binary is also a part of this improvement and I have no intention or enough git skills to split that. Of course the code is online and anyone can make the split, however I have a feeling that there is not much interest for these changes ... and at the moment that is fine by me ... perhaps in a month or two when I will again have more time for mypaint the skepticism will be resolved.

Luka Čehovin <lukacu>
Project Member
Wed 03 Feb 2010 07:45:21 PM UTC, comment #8:

There are merge conflicts with the current master branch; can you make a branch that is rebased against master? Also, it would be nice to have /only/ XDG changes in this branch. And I already commented about index.theme; if anything, it belongs into a windows/ subdirectory somewhere.

I think adding XDG support has nothing to do with making a mypaint binary. I am still quite sceptical about this change, and I would prefer (and be faster) to review your XDG changes without this.

Martin Renold <martinxyz>
Project Administrator
Tue 05 Jan 2010 10:30:01 PM UTC, comment #7:

Patch ready for testing in http://gitorious.org/~lukacu/mypaint/lukacu-mypaint/commits/boot

Luka Čehovin <lukacu>
Project Member
Fri 20 Mar 2009 05:42:09 PM UTC, comment #6:

Please comment at bug #13226 if you have updates about the UnboundLocalError problem. I'll leave this bug open for XDG. The patch is a start, but not production quality.

If someone makes a patch that adds full XDG support (not only for the config file) and also does automatically migrate existing ~/.mypaint config files, I'll probably accept it. An additional library dependency is OK if most distributions have a package for it.

Martin Renold <martinxyz>
Project Administrator
Mon 02 Mar 2009 02:12:14 PM UTC, comment #5:

as i know, more and more applications change to meet this standard. and it was not difficult for user to find the config files.

seems python already have such things, in pyxdg package. i just don't want to add more dependcy. so i do it in simply way.

deluge use pyxdg, emesene don't, but emesene also put config dir to .config/. so maybe can use their code.

and not much need the .local/share/ dir if you think it's difficult. and this xdg change can wait for a big update version, and then do this. :)

lh <jarryson>
Mon 02 Mar 2009 12:53:54 PM UTC, comment #4:

About your error: I don't know where it comes from, but try to upgrade swig first. I'm using swig 1.3.36, and it does not generate the line that causes your error.

Martin Renold <martinxyz>
Project Administrator
Mon 02 Mar 2009 12:51:03 PM UTC, comment #3:

Thanks for the patch, but how is this supposed to work for users who are upgrading? Their old configuration would be ignored. Should ~/.mypaint be moved automatically? And we'll have to handle the case when ~/.config does not exist.

From an usability point of view, I have no problem to use XDG_CONFIG_HOME in case the variable exists, but shouldn't the default be to use ~/.mypaint when it is not set? Because that's where most users go looking for the config files today, and probably also in five years from now.

And the XDG_DATA_DIRS variable should be respected, too... after reading and thinking a bit about XDG, I'm starting to doubt that it is worth the effort...

Martin Renold <martinxyz>
Project Administrator
Mon 02 Mar 2009 11:10:03 AM UTC, comment #2:

but no matter patch this or not, and use svn version or not, i always get this error..

Traceback (most recent call last):
File "/usr/bin/mypaint", line 54, in <module>
from lib import mypaintlib
File "/usr/share/mypaint/lib/mypaintlib.py", line 19, in <module>
_mypaintlib = swig_import_helper()
File "/usr/share/mypaint/lib/mypaintlib.py", line 17, in swig_import_helper
if fp is not None: fp.close()
UnboundLocalError: local variable 'fp' referenced before assignment

(file #5372)

lh <jarryson>
Mon 02 Mar 2009 07:59:36 AM UTC, comment #1:

Hi, since it's currently not "you guys" but just "me guy", I can tell you I'm not working on this in the near future. GUI improvements are more important. Patches for this are welcome.

Martin Renold <martinxyz>
Project Administrator
Sat 21 Feb 2009 06:06:04 PM UTC, original submission:

a litter change to meet XDG standards.and will make $HOME more clear.

wish you guys can change this.

it's a really good paint apps :)

sorry for my english. :)

lh <jarryson>

 

Attached Files
file #5372:  mypaint-xdg.patch added by jarryson (492B - application/octet-stream - i am not good at python, here is the patch. )

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by achadwick (Posted a comment)
  • -unavailable- added by eheintzmann (Posted a comment)
  • -unavailable- added by eric_h (Posted a comment)
  • -unavailable- added by jonnor (Posted a comment)
  • -unavailable- added by lukacu (Posted a comment)
  • -unavailable- added by martinxyz (Posted a comment)
  • -unavailable- added by jarryson (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 13 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 23 Jun 2014 09:42:40 PM UTCachadwickOpen/ClosedOpen=>Closed
    Sun 17 Mar 2013 03:36:55 PM UTCachadwickStatusIn Progress=>Fixed
    Sun 10 Mar 2013 06:16:00 PM UTCachadwickStatusWish=>In Progress
      Assigned tolukacu=>achadwick
      Planned Release0.8.0=>None
    Fri 07 Jan 2011 10:48:46 PM UTCjonnorStatusReady For Test=>Wish
    Tue 05 Jan 2010 10:30:01 PM UTClukacuStatusPostponed=>Ready For Test
      Assigned toNone=>lukacu
      Planned ReleaseNone=>0.8.0
      Operating Systemarchlinux=>linux
    Fri 20 Mar 2009 05:42:09 PM UTCmartinxyzSummaryput configure file into $XDG_CONFIG_HOME( ~/.config/)=>put config file into $XDG_CONFIG_HOME ( ~/.config/)
    Mon 02 Mar 2009 11:10:03 AM UTCjarrysonAttached File-=>Added mypaint-xdg.patch, #5372
    Mon 02 Mar 2009 07:59:36 AM UTCmartinxyzStatusNone=>Postponed
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup