Announcement

Collapse
No announcement yet.

[SOLVED] Why doesn't my program shortcut work?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Why doesn't my program shortcut work?

    I've got a bit of a short cut problem, it's a bit of a funny one: I've installed GIMP 2.6.7 from the opt folder, I've updated my menu shortcut but whenever I click it, it tries to load the wrong version of GIMP (the old 2.6.6 version). Wouldn't be a problem but I can't get it to load the correct version of GIMP (the new 2.6.7 one) and the old version no longer works because of incompatibilities ( The error message I get is: "The GIMP binary cannot run with a libgimp version other than its own. This is GIMP 2.6.6, but the libgimp version is 2.6.7").

    I can load the the new version of GIMP (2.6.7) if I use the command line and navigate to /usr/bin then type gimp; and this is where it gets funny:

    when I type gimp (in Terminal) from any other directory, say home or root, it tries to load up the old version,
    when I use Dolphin to navigate to /usr/bin/ and click on the gimp binary it tries to load the old version, and
    when I type (in Terminal) /usr/bin/gimp it tries to load the old version, but
    when I use Terminal to navigate to /usr/bin/ first and then type gimp (as a second instruction) it loads the new (correct) version of gimp.

    The only two references to gimp that I can see in /usr/bin/ (hidden files are visible) are a shortcut labeled gimp (which points to gimp-2.6) and the binary gimp-2.6. I've tried changing my Kicker Menu shortcut to gimp, gimp-2.6, gimp-2.6.7 and I've changed the directory path to /usr/bin/ and /usr/bin/gimp but non of those changes get it to load gimp-2.6.7.

    Does anyone know what's happening? Why can I only load gimp 2.6.7 by using the terminal to navigate to /usr/bin/ before I issue the command to run gimp?

    #2
    Re: Why doesn't my program shortcut work?

    I don't understand what you did when you say
    I've installed GIMP 2.6.7 from the opt folder.
    but I think I know what went wrong.

    The version of the gimp package in the Ubuntu repositories is 2.6.6. This version of gimp was built and tested under the assumption that appropriate versions of certain libraries that gimp relies upon would be available (from OTHER packages). This is the basis of the entire packaging system that Kubuntu depends on. Part of a ".deb" package is a set of "pre" and "post" install scripts that do things like cleaning up links so that you can point at the right binaries. Similarly, when you remove software (like the old version of gimp) it erases the links to the binary that you are removing. If you installed gimp 2.6.7 without removing 2.6.6 using the package manager, or without changing all the appropriate links you will have to do so by hand.

    Because I didn't understand your message, this is just a guess.

    Comment


      #3
      Re: Why doesn't my program shortcut work?

      By "from the opt folder" I mean I unzipped the package in (root) /opt/ then ran ./configure, make, make install.

      I think you understood me, though.

      I'll uninstall GIMP 2.6.6 with the package manager then re-install GIMP 2.6.7 to ensure everything is where it should be. I didn't want to do this because the package manger uninstall's a lot of other components too and it took ages to get GIMP 2.6.7 to install (had to install a lot of libraries and re-install g++, cpp, libc6 and build-essential) so I was looking for an alternative to uninstalling it.

      I'll let you know how I get on.

      Comment


        #4
        Re: Why doesn't my program shortcut work?

        It's solved. I uninstalled GIMP 2.6.6 and re-installed gimp 2.6.7. Thanks for your help.

        Comment


          #5
          Re: Why doesn't my program shortcut work?

          when I type gimp (in Terminal) from any other directory, say home or root, it tries to load up the old version,
          The reason it's doing this is that when you type in a command, it searches your path for the first match, and then executes whatever it finds.

          Code:
          greenman@Wolfenstein:~$ echo $PATH
          /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
          So in this case, it looks first in /usr/local/bin, etc. It eventually finds the symbolic link in /usr/bin to gimp, which it executes.
          Code:
          greenman@Wolfenstein:~$ ls -al /usr/bin/gimp*
          lrwxrwxrwx 1 root root    8 2009-08-31 12:07 /usr/bin/gimp -> gimp-2.6
          -rwxr-xr-x 1 root root 4697712 2009-08-31 02:13 /usr/bin/gimp-2.6
          lrwxrwxrwx 1 root root   16 2009-08-31 12:07 /usr/bin/gimp-console -> gimp-console-2.6
          -rwxr-xr-x 1 root root 2303928 2009-08-31 02:13 /usr/bin/gimp-console-2.6
          -rwxr-xr-x 1 root root  18672 2009-08-31 02:13 /usr/bin/gimptool-2.0
          Typing in "gimp" at the command line, or running it through an icon, will therefore hit the symlink in /usr/bin/gimp, and proceed to execute /usr/bin/gimp-2.6, which is the version installed by the package manager.

          The solution is simple. If your executable is installed in /opt/gimp/gimp, then you would do the following:

          Code:
          cd /usr/bin
          sudo rm gimp
          sudo ln -s /opt/gimp/gimp gimp
          This will place a symbolic link in /usr/bin that points to your new program.

          We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

          Comment


            #6
            Re: [SOLVED] Why doesn't my program shortcut work?

            Doctordruidphd, your answer is the type of answer I needed. I've made a note of it for future reference.

            Now all I need do is find better PNG and gif codecs

            Comment

            Working...
            X