[SOLVED] Invalid format for .desktop file

Post here if you are a new Porteus member and you're looking for some help.
Post Reply
User avatar
RamonTavarez
Contributor
Contributor
Posts: 81
Joined: 14 Mar 2011, 12:00
Distribution: 32 bit, KDE
Location: Dominican Republic

[SOLVED] Invalid format for .desktop file

Post#1 by RamonTavarez » 20 Feb 2014, 19:19

Hi.

Some time ago I prepared Blender 2.69 (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.
Last edited by RamonTavarez on 03 Mar 2014, 11:55, edited 1 time in total.
Ramón E. Tavárez

tome
Contributor
Contributor
Posts: 562
Joined: 26 Jun 2013, 14:03
Distribution: x64 Openbox
Location: Poland
Contact:

Re: Invalid format for .desktop file

Post#2 by tome » 20 Feb 2014, 20:49

invalid format of the blender.desktop file - maybe wrong permissions for this file for guest account.

User avatar
RamonTavarez
Contributor
Contributor
Posts: 81
Joined: 14 Mar 2011, 12:00
Distribution: 32 bit, KDE
Location: Dominican Republic

Re: [SOLVED] Invalid format for .desktop file

Post#3 by RamonTavarez » 21 Feb 2014, 12:15

@tome

1.- I allways log as root.

2.- The "same" file started the applications before P2.1
Last edited by RamonTavarez on 03 Mar 2014, 11:56, edited 1 time in total.
Ramón E. Tavárez

User avatar
brokenman
Site Admin
Site Admin
Posts: 5455
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Invalid format for .desktop file

Post#4 by brokenman » 21 Feb 2014, 20:24

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: Invalid format for .desktop file

Post#5 by phhpro » 21 Feb 2014, 20:26

...
Last edited by phhpro on 04 Feb 2016, 01:43, edited 1 time in total.

User avatar
RamonTavarez
Contributor
Contributor
Posts: 81
Joined: 14 Mar 2011, 12:00
Distribution: 32 bit, KDE
Location: Dominican Republic

Re: Invalid format for .desktop file

Post#6 by RamonTavarez » 22 Feb 2014, 12:44

@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:
Ramón E. Tavárez

User avatar
brokenman
Site Admin
Site Admin
Posts: 5455
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Invalid format for .desktop file

Post#7 by brokenman » 22 Feb 2014, 18:22

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
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
phhpro
Full of knowledge
Full of knowledge
Posts: 545
Joined: 10 Nov 2013, 20:35
Distribution: .

Re: Invalid format for .desktop file

Post#8 by phhpro » 22 Feb 2014, 22:04

...
Last edited by phhpro on 04 Feb 2016, 01:41, edited 1 time in total.

User avatar
RamonTavarez
Contributor
Contributor
Posts: 81
Joined: 14 Mar 2011, 12:00
Distribution: 32 bit, KDE
Location: Dominican Republic

Re: Invalid format for .desktop file

Post#9 by RamonTavarez » 25 Feb 2014, 12:30

@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?

.....
Ramón E. Tavárez

User avatar
brokenman
Site Admin
Site Admin
Posts: 5455
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Invalid format for .desktop file

Post#10 by brokenman » 25 Feb 2014, 17:01

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.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
RamonTavarez
Contributor
Contributor
Posts: 81
Joined: 14 Mar 2011, 12:00
Distribution: 32 bit, KDE
Location: Dominican Republic

Re: Invalid format for .desktop file

Post#11 by RamonTavarez » 26 Feb 2014, 12:16

@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.
Ramón E. Tavárez

User avatar
brokenman
Site Admin
Site Admin
Posts: 5455
Joined: 27 Dec 2010, 03:50
Distribution: Porteus v3.2rcX all desktops
Location: Brazil
Contact:

Re: Invalid format for .desktop file

Post#12 by brokenman » 28 Feb 2014, 22:08

Be sure to close the window. These days, everybody has a digital camera, and a facebook page.
How do i become super user?
Wear your underpants on the outside and put on a cape.

User avatar
wread
Module Guard
Module Guard
Posts: 1064
Joined: 09 Jan 2011, 18:48
Distribution: Porteus v3.2.5-kde5-64 bits
Location: Santo Domingo
Contact:

Re: Invalid format for .desktop file

Post#13 by wread » 03 Mar 2014, 02:12

@Ramon
Don't forget to add [SOLVED] to9 your post!

Regards!
Porteus is proud of the FASTEST KDE ever made.....(take akonadi, nepomuk and soprano out and you will have a decent OS).
The Porteus Community never sleeps!

User avatar
RamonTavarez
Contributor
Contributor
Posts: 81
Joined: 14 Mar 2011, 12:00
Distribution: 32 bit, KDE
Location: Dominican Republic

Re: [SOLVED] Invalid format for .desktop file

Post#14 by RamonTavarez » 04 Mar 2014, 12:25

@WRead:

1.- Gracias por el recordatorio.
2.- Hecho.
Ramón E. Tavárez

Post Reply