Page 1 of 1

[SOLVED] Invalid format for .desktop file

Posted: 20 Feb 2014, 19:19
by RamonTavarez
Hi.

Some time ago I prepared Blender 2.69 (http://forum.porteus.org/viewtopic.php?f=51&t=2820). This module worked fine on Porteus 2.0, but on Porteus 2.1 it doesn't start from the icon on the start menu, and now I have to start from the command line on a terminal.

Something weird for me is that the icon on the star menu appears but the app doesn't start. The system says that the failure is due to an invalid format of the blender.desktop file.

The content of the referred file is:

Code: Select all

[Desktop Entry]
Version=1.0
Terminal=false
Icon=blender
Type=Application
Categories=Graphics;GTK ;
TryExec=blender
Exec=blender
Name=Blender
Comment=3D Content Renderer

Can anybody help me with this file? What is missing ? what is wrong?

Thanks for your help.

Re: Invalid format for .desktop file

Posted: 20 Feb 2014, 20:49
by tome
invalid format of the blender.desktop file - maybe wrong permissions for this file for guest account.

Re: [SOLVED] Invalid format for .desktop file

Posted: 21 Feb 2014, 12:15
by RamonTavarez
@tome

1.- I allways log as root.

2.- The "same" file started the applications before P2.1

Re: Invalid format for .desktop file

Posted: 21 Feb 2014, 20:24
by brokenman
The only anomoly I see is a space before the trailing ";" but you said it still shows in the menu.

Does it also happen after booting into fresh mode and activating this module only? Permission on the file should be 644.

Re: Invalid format for .desktop file

Posted: 22 Feb 2014, 12:44
by RamonTavarez
@phantom:

I login as root on "always fresh" 90% of times.
I've corrected the space before ";", but the message is the same! :shock:

@phhpro:

The answer to the procedure is:
root@porteus:/usr/share/applications# file blender.desktop
blender.desktop: ASCII text
root@porteus:/usr/share/applications#
As far as I can see it's Ok.

Then I still ask myself:
What can be wrong that makes the Plasma Desktop Shell report the file as malformatted? :wall: , or Is this a personal matter between Plasma Desktop and me? :cry:

Re: Invalid format for .desktop file

Posted: 22 Feb 2014, 18:22
by brokenman
Perhaps you edited the file in a text editor that left the file as ascii when it should be utf8.

Try converting it:

Code: Select all

iconv -f US-ASCII -t UTF-8 blender.desktop > blender.desktop.new
mv  blender.desktop.new  blender.desktop

Re: Invalid format for .desktop file

Posted: 25 Feb 2014, 12:30
by RamonTavarez
@brokenman & @phhpro

I've converted using iconv and krite, but the file is still reported as ASCII, included the file blender.destop.new.

Something wierd is that when the file is opened with krite the encoding is reported by krite as UTF-8, once saved the same file is reported as ASCII.

What else can I do to convert that file?
Is there any software dedicated to work text files just as UTF?

.....

Re: Invalid format for .desktop file

Posted: 25 Feb 2014, 17:01
by brokenman
Try this file

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Name=Blender
Comment=3D Content Renderer
GenericName=Blender
Exec=/opt/blender/blender
Terminal=false
X-MultipleArgs=false
Type=Application
Icon=blender
Categories=Graphics;GTK;AudioVideo;Audio;Video;
You should also remove the blank /usr/share/applications/mimeinfo.cache from your module

Don't be concerned with 'file' picking the file up as ASCII. The concern is probably more with the absolute path to the executable in /opt. This is working for me on Porteus-v3.0rc2.

Re: Invalid format for .desktop file

Posted: 26 Feb 2014, 12:16
by RamonTavarez
@brokenman:

Thanks! :Yahoo!:

Blender is starting now from the icon at the start menu. :good:

I can see that boot as root don't make me a super user as you are, I'll try the underpants outside with a cape and evaluate the results! :wink:

Best regards.

Re: Invalid format for .desktop file

Posted: 28 Feb 2014, 22:08
by brokenman
Be sure to close the window. These days, everybody has a digital camera, and a facebook page.

Re: Invalid format for .desktop file

Posted: 03 Mar 2014, 02:12
by wread
@Ramon
Don't forget to add [SOLVED] to9 your post!

Regards!

Re: [SOLVED] Invalid format for .desktop file

Posted: 04 Mar 2014, 12:25
by RamonTavarez
@WRead:

1.- Gracias por el recordatorio.
2.- Hecho.