my own .desktop file not working

Asked by Jacques Malaprade

Hi,
I have tried various searches to get to the bottom of this. I have created a envi.desktop file as per instructions on many sites and placed it in /usr/share/applications. The file content :

[Desktop Entry]
Name=ENVI
Exec=envi_rt
Icon=/usr/local/itt/idl/idl/help/online_help/IDL/Data/SkinIDL_Blue_icons/Logo_blue
Terminal=false
Type:Application
Categories=Science

If I run envi_rt in the terminal it works. The application GUI opens. Somehow the envi.desktop file does not display the icon and does nothing when I double click it.
The listing of the file is:

-rw-r--r-- 1 root root 173 2011-11-05 12:24 envi.desktop

Which is exactly the same as the others in the directory.

Baffled really.... ;\ Why won't it work? I have even logged off and on again.

Jacques

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu unity Edit question
Assignee:
No assignee Edit question
Solved by:
Jacques Malaprade
Solved:
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

Do you have read permission on the icon?

Does the envi_rt binary have execute permission for non root users? Is it in a path where a normal user will pick it up in $PATH ?

eg:

ls -l `which envi_rt`

Revision history for this message
mycae (mycae) said :
#2

Also, you have written:
Type:Application

This should be
Type=Application

You should also specify
Version=1.0

Revision history for this message
Jacques Malaprade (malapradej) said :
#3

Thanks mcrae,

That did the trick. How I could have missed it! Also the icon file needs
the extension included. I read somewhere that it should not be included.
But it doesn't work if you don't.

Thanks,

Jacques

On Sat, 2011-11-05 at 13:10 +0000, mycae wrote:
> Your question #177648 on unity in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/unity/+question/177648
>
> Status: Needs information => Answered
>
> mycae proposed the following answer:
> Also, you have written:
> Type:Application
>
> This should be
> Type=Application
>
> You should also specify
> Version=1.0
>

Revision history for this message
mycae (mycae) said :
#4

You can leave the extension off, however i suspect (don't actually know) you will need to register the icon with the desktop icon cache,

eg

gtk-update-icon-cache-(version)

which means you need to place the icon in

/usr/share/icons/(something)

Revision history for this message
Jacques Malaprade (malapradej) said :
#5

It seemed to take care of this without my intervention.
I tried to look in the /usr/share/icons directory and could not find the
icon (searched by -name) anywhere. So I assume it has another way of
registering the icon.

Cheers,

J

On Sun, 2011-11-06 at 12:21 +0000, mycae wrote:
> Your question #177648 on unity in Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+source/unity/+question/177648
>
> Status: Open => Answered
>
> mycae proposed the following answer:
> You can leave the extension off, however i suspect (don't actually know)
> you will need to register the icon with the desktop icon cache,
>
> eg
>
> gtk-update-icon-cache-(version)
>
> which means you need to place the icon in
>
> /usr/share/icons/(something)
>

Revision history for this message
Jacques Malaprade (malapradej) said :
#6

Thanks mcrae.
I'll set it as closed for now.
Cheers,