You are here

Autosave

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0
Rate this item!

Periodically saves any open files in the current GIMP instance.

I got tired of searching for GIMP autosave and coming across developer discussions stating, in essence why autosave won't be implemented.

Installs a menu under <Image>/File/Autosave, containing "Enable", "Disable" and "Settings". From the settings dialog, you can enable/disable autosave globally, set the interval in minutes, and configure the location and pattern for autosave files of new and saved files individually. You can also edit the "autosave.conf" file in the same directory as the plugin script. Requires libgimp-perl and gtk2-perl. There is the standard version (autosave.pl), and one that prints debug messages on almost every operation (autosave.dbg.pl).

To use, simply download either the standard or debug version of the script to your plug-in directory (.gimp-$version/plug-ins on linux, don't know about other OSes)

There are some considerations:

  • Currently, only one running instance is supported (that is, enabling/disabling autosave will enable/disable it for all GIMP processes).
  • Per-image enable/disable is not currently incorporated
  • I've only tested it on GIMP 2.6.7 and 2.7 on linux. I'd appreciate it, if anyone used this on any other version/OS, if you'd let me know if i works as advertised
  • I could find no reliable way for it to start working automatically, i.e., without you having to do extra, so you have to do one of three things:
    • Whenever you start gimp, click File/Autosave/Enable
    • Start gimp from the command line, or write a small wrapper script with the command gimp -b "(autosave 1)"
    • Find gimp.desktop application file that your Desktop Environment use, and change the Exec=gimp %F (or gimp %U) line to Exec=gimp -b "(autosave 1)" %F (or gimp -b "(autosave 1)" %U)

Feedback/Suggestions are welcome.

Edit: It somehow slipped me that all distros are not equal. If you can't find the perl gimp package on your installation, install the Gimp package using CPAN. From the command line I believe that goes cpan install Gimp, or just browse to the module page and follow the install instructions there. You'll need to make sure that the location it installs to is in perl's @INC variable (like $PATH for perl), or move it to a directory that is in @INC. You can find out which directories are searched by typing at the command line perl -e 'print join "\n", @INC'.

Again, if anyone has any problems using this please feel free to ask, and I'll do what I can to assist. I'm especially interested to know how this works (if at all) on non-linux OSes.

AttachmentSize
autosave.pl13.26 KB
autosave.dbg_.pl14.89 KB
GIMP Version: 
Code License: 

Comments

Glad to see some interest in this plug-in, hope it proves useful. In debian, the package is libgimp-perl. I did a quick search and I think the package you want is gimp-perl. Let me know If you get it to work.

Thank you, Mesach, for your help in getting the plug-in working... VERY much appreciated!

For the record, the problem with with my installation of GIMP and Gimp.pm, NOT Mesach's script. He spent a great deal of time with me on MSN IM diagnosing the problem and getting it fixed. The script now works flawlessly, and I *love* it!

Regards, Chris

No problem at all, Chris. Glad to hear it helps you. One of the things that made me really appreciate having done this was that I could download the bleeding edge gimp from git and use that instead. There are a few things that make it unlikely I'll go back to gimp-2.6. So give it a whirl (instructions: http://www.shallowsky.com/linux/gimpbuild.html). A few times it crashed and I literally laughed out loud because I didn't lose more than a couple minutes' work and I felt like I beat it somehow.

rain

Thanks for the reply, rain. After much fumbling and gnashing of teeth, I did manage to *finally* install Gimp.pm using CPAN. Now, the original error message has disappeared... WOO HOO! However, we're not out of the woods yet, as I'm now getting *this* error message:

[root@localhost /usr/src/Gimp-2.0]# gimp -b "(autosave 1)"
Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
batch command experienced an execution error

I do notice that I'm getting the "Did not receive a reply..." error when I run GIMP without loading autosave (e.g. typing "/usr/bin/gimp" on the command line, so what we're dealing with here is the "batch command experienced an execution error" message.

Any ideas how to fix this???

Btw, I removed the original autosave_4.pl file, downloaded the autosave.dbg__6.pl file and saved it to the plug-ins directory under the name autosave.pl but that didn't fix anything nor did I get any debugging info. Am I doing something wrong? (I'm hoping to get you more info than "batch command experienced an execution error." ;)

Edit: After some further research, I noticed that "autosave.pl" isn't in my pluginrc file. So, I deleted the file and ran gimp to rebuild it. The script *still* isn't in the pluginrc file, even though it did recognize all the Python scripts (i.e. (*.py). Is there something I need to do to get gimp to recognize Perl scripts?

Regards, Chris

P.S. Sorry for the lengthy delay in responding to your reply... I had problems logging into the Registry.

Great feature

How to use these scripts for auto save?
Please specify anyone......please........
Please step by step guide lines anyone.........here.......I am not the Computer Insect I mean I don't have enough information to use these scripts?

Sorry for leaving that bit out. Just copy the script to your plug-ins directory. You'll need the PerlServer extension (comes bundled with gimp in debian/linux in general, but I'm not sure about any other env). HTH.

Has anyone got this to work in windows yet? I got a link from a friend to dl camelbox here
http://code.google.com/p/camelbox/downloads/list

Still cant get it to work though.Do i need to change the path in the autosave_4.pl file?

Pages

Subscribe to Comments for "Autosave"