G'MIC Gimp Plugin Favorites disabled

I should have made clear that the git suggestion was not advanced as a solution to the problem, but as a useful way to cope with configuration/scripting files that get whacked from time-to-time by unknown processes. I did not wish to convey the idea that your present backup strategy is insufficient or that you just have to follow this New, Improved Configuration Preservation Process as a permanent workaround because we’re never ever going to address the unknown .json whacker. I apologize for this inadvertent suggestion.

The root problem is difficult to catch because it happens irregularly and the consequence — deleted files — is only noticed minutes, hours, or days later, long after the horse has left the barn. But — just because tracking down the root cause is hard doesn’t mean the bug should not be addressed. The challenge is setting up the circumstances where it can be caught.

One of a set of circumstances that might help, insofar as Linux systems are concerned, is to set the immutable attribute on the .json file. The linux ext2, ext3, ext4 file systems support a set of extended attributes above and beyond basic read, write, and execute flags. A file with the immutable attribute set cannot be modified: it cannot be deleted or renamed, no (hard) link can be created to the file, most of the file’s metadata can not be modified, and the file can not be opened in write mode.

I advance this not as a permanent solution, but as a way to create an event source that a debugger can catch. It can be used to catalog what events attempt to change the .json file and — perhaps — if some of those events are unexpected. It is possible this approach might not work: too many false flags from well-known events, perhaps, such as those surrounding favorites being added or deleted.

Setting the attribute requires a super-user account. This would not be something I would do on a production system, but in a sandbox. Here is a demo:

bertha /home/gosgood/.config/gmic # ls -l
total 15084
-rw------- 1 gosgood gosgood     534 Apr  9 11:29 gmic_qt_faves.json
-rw-r--r-- 1 gosgood gosgood 8449944 Apr  9 11:29 gmic_qt_log
-rw------- 1 gosgood gosgood     346 Apr  9 11:29 gmic_qt_params.dat
-rw------- 1 gosgood gosgood      75 Apr  9 11:29 gmic_qt_tags.dat
-rw------- 1 gosgood gosgood      75 Apr  9 11:29 gmic_qt_tags.dat.bak
-rw------- 1 gosgood gosgood      63 Apr  9 11:29 gmic_qt_visibility.dat
-rw-r--r-- 1 gosgood gosgood  629812 Dec  4  2016 sample_greece.png
-rw-r--r-- 1 gosgood gosgood  438447 Aug  7  2017 sample_lena.png
-rw-r--r-- 1 gosgood gosgood  273917 Aug 12  2017 sample_rose.png
-rw-r--r-- 1 gosgood gosgood  707433 Aug 13  2017 sample_tiger.png
-rw------- 1 gosgood gosgood 4911708 Apr  3 14:10 update310.gmic
bertha /home/gosgood/.config/gmic # chattr +i gmic_qt_faves.json
bertha /home/gosgood/.config/gmic # lsattr gmic_qt_faves.json
----i---------e------- gmic_qt_faves.json
bertha /home/gosgood/.config/gmic # rm gmic_qt_faves.json
rm: cannot remove 'gmic_qt_faves.json': Operation not permitted
bertha /home/gosgood/.config/gmic # chmod 1777 gmic_qt_faves.json
chmod: changing permissions of 'gmic_qt_faves.json': Operation not permitted
bertha /home/gosgood/.config/gmic # chown root.root gmic_qt_faves.json
chown: changing ownership of 'gmic_qt_faves.json': Operation not permitted
bertha /home/gosgood/.config/gmic # echo "Be gone with you, then!!!" >>gmic_qt_faves.json
echo "Be gone with you, thenchown root.root gmic_qt_faves.json!" >>gmic_qt_faves.json
bash: gmic_qt_faves.json: Operation not permitted
bertha /home/gosgood/.config/gmic # cat gmic_qt_faves.json
[
    {
        "Name": "Rectangular Tiling",
        "command": "_rec_tileit",
        "defaultParameters": [
            "1",
            "5",
            "1.5",
            "1",
            "4",
            "0",
            "45",
            "0.5"
        ],
        "defaultVisibilities": [
            2,
            2,
            2,
            2,
            2,
            2,
            2,
            2
        ],
        "originalName": "Rectangular Tiling",
        "preview": "gtutor_rectangular_tiling_preview"
    }
]
bertha /home/gosgood/.config/gmic #

Might attempt a proof-of-concept this evening.

@akovia , someone else reported to have issues with Fave filters (disappearing Faves as well).
After some tests, we discovered that it is due to the fact his login name contains spaces and special characters (French ‘ç’).
Is it also your case?

Hi @David_Tschumperle,
Sorry for my ignorance, but I don’t know where to even put login details. I always had it set to update weekly, but now I do it manually to avoid any surprises. Am I missing something?

gmic-update

Could you please open a terminal and type:

cd ~/.config/gmic && echo $PWD

then tell me what is the output of this?

$ cd ~/.config/gmic && echo $PWD /home/akovia/.config/gmic

OK thanks, so that’s not related. So no more ideas right now.

Thanks for staying on top of it. If I uncover anything, I’ll be sure to post.

I think it isn’t just @akovia but no one has given a repeatable report. :person_shrugging:

Questions (maybe you addressed it above already):

Does it happen when updating the core or just filters?
Does it happen without updating anything?

I think it was happening when auto updating the filters but have nothing solid to support that yet. It would make sense if you read my original post as it happened that time while I was active working in gimp, so it wasn’t during a system/core update.

I haven’t been gimping recently with family in town, but I am ready to jump on it the next time I have an issue with this.

I just recently turned off the auto update feature and I haven’t had any troubles yet. I’ll try to update the filters soon and will report if there is any tomfoolery.