LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Gimp 2.2: unable to open a test swap file. (https://www.linuxquestions.org/questions/slackware-14/gimp-2-2-unable-to-open-a-test-swap-file-4175423349/)

stf92 08-22-2012 12:40 AM

Gimp 2.2: unable to open a test swap file.
 
Hi:

When I start gimp a notification says:
Quote:

Unable to open a test swap file. To avoid data loss please check the location and permissions of the swap directory defined in your Preferences (currently "/tmp/.gimp-2.2").
ls gives
Code:

semoi@darkstar:~$ ls -ld /tmp
drwxrwxrwt 12 root root 8192 2012-08-22 02:09 /tmp/

The only problem that there could be is, perhaps, the sticky bit, whose meaning I never fully realized. But no cli program or GUI program has ever had an issue with the /tmp directory. If, in File>Preferences>Folders I change the swap path to ~/.gimp-2.2/swap and create that directory then gimp does not complain at start up. Can somebody explain?

wildwizard 08-22-2012 03:01 AM

1. You need to go into your tmp (as root) and remove the old directory, there will be one and it wont be owned by your user account.
2. The sticky bit on the tmp directory means that whoever creates a file or directory can delete it but no one else can touch it (hence it's usage on tmp and your current problem)
3. The usage of /tmp/program-version is a bad idea for what gimp is trying to do so your better off changing it to your home directory.

John VV 08-22-2012 04:24 AM

the gimp "swap" & tmp should be in your $HOME folder

gimp2.2 ??
am i right in guessing that this is RHEL 5.8 ( or one of any of the 5 rebuilds)

if you run gimp as a normal user FOR THE VERY FIRST TIME
it will auto set up the ~/.Gimp-2.2 folder

you might want to rename that folder in your normal user home folder

then restart gimp . to recreate it .

stf92 08-22-2012 11:48 AM

Gimp needs two directories, a temporary directory and a swap directory, as I see. Up to now those dirs were ~/.gimp-2.2/tmp and /tmp/.gimp-2.2. I mkdired ~/.gimp-2.2/swap and told gimp to use this dir as swap dir.

@John VV: No, this is slackware 12.0. When I ran gimp for the first time I was a regular user, not root, and however it setup the swap dir to /tmp/.gimp-2.2.

@wildwizard:
Quote:

1. You need to go into your tmp (as root) and remove the old directory, there will be one and it wont be owned by your user account.
If I remove /tmp and recreate it as root, it will be owned by root.
Quote:

2. The sticky bit on the tmp directory means that whoever creates a file or directory can delete it but no one else can touch it (hence it's usage on tmp and your current problem)
Thanks for this explanation. But then, why couldn't gimp create its swap dir in /tmp/, when it has write permissions for everybody? And why is it a bad idea to use /tmp for the swap dir?

John VV 08-22-2012 01:45 PM

the reason i thought that it was a old version of RHEL5 ( or a os like it)
is that Gimp2.2 is old , VERY OLD .
and 2.2 is in the old rhel5 repo

the current version is gimp-2.8

so Slackware
how did you install the old 2.2 version ?
if from source , then it will not build in gcc 4.7 ( the old libpng issue with png12 )
gcc 3.4 ( or 4.1 - with some hacking) is going to be needed

or
is this a old slack prebuilt binary on the current Slack?


PS.
most ( almost ALL) new plugins for ginp 2.4 ,2.6 , and 2.8 will not run on 2.2 .

A thought ?
is /tmp it's OWN partition????
if so that might be a issue with the read / write
if so , then
edit HOW the partition is mounted

even on Slack there IS going to be a hidden "." dot folder in your user home folder
gimptool INSTALLS plugins there when you run "make install" AS A NORMAL user
( one of the exceptions for "make" as root)
gimptool can install to just you
or
system wide

T3slider 08-22-2012 01:57 PM

Quote:

Originally Posted by stf92 (Post 4761277)
If I remove /tmp and recreate it as root, it will be owned by root.

I think wildwizard meant for you to remove the /tmp/.gimp-2.2 directory if it exists, in case it was owned by another user -- do not remove /tmp itself.

stf92 08-22-2012 02:42 PM

Quote:

Originally Posted by T3slider (Post 4761384)
I think wildwizard meant for you to remove the /tmp/.gimp-2.2 directory if it exists, in case it was owned by another user -- do not remove /tmp itself.

Ahhh... /tmp/.gimp-2.2 never existed, because gimp cannot create it, for some unknown reason. The /tmp directory has these permissions:

Code:

drwxrwxrwt 12 root root 8192 2012-08-22 02:09 /tmp/
Anyways, after having set ~/.gimp-2.2/swap as the gimp swap directory, I have had no more problems. One thing, however, although a little off topic, is that, in spite of having 256MB of RAM, a mere 1.2MB .jpeg file takes over 15 secs in being displayed. Instead Nero, under windows xp, displays it almost instantly.

John VV 08-22-2012 03:03 PM

gimp2.2 is OLD ,very old
gtk is also a KNOWN roadblock in loading images
it is SINGLE threaded
the old gimp 2.2 also can only use ONE cpu ( single threaded)
gimp2.6 and 2.8 can use ALL of your CPU's

so gimp2.2 IS going to be DEAD slow ,it always was very slow
this issue has been fixed in newer versions

stf92 08-22-2012 03:17 PM

Thanks for the explanation, John VV .

thethakuri 05-18-2014 03:00 AM

I am using Gimp ver. 2.8. After recently updating my Ubuntu to 14.04, I started getting the permission denied message whenever I tried to edit pictures using GIMP. The problem was .gimp-2.8 folder located inside home folder was owned by root. So, I changed the owner and group of the folder to respective user and it worked.


All times are GMT -5. The time now is 06:24 PM.