Message Boards Message Boards


"Invalid desktop entry file" error when I launch from Pi desktop icon

Posted 5 years ago
3 Replies
0 Total Likes

I believe that this error occurred upon upgrade to 10.3.1 on Jessie, but I am not sure about that. It appears that the desktop file in raspi-ui-overrides was not updated and still referrs to 10.0. My fix is to run in Terminal:

sudo cp /usr/share/applications/wolfram-mathematica.desktop /usr/share/raspi-ui-overrides/applications/wolfram-mathematica.desktop

As always before executing a sudo command, make a backup of the file to be overwritten before executing.

Posted here because no solution came up in a web search, so I though this should be documented somewhere.

3 Replies


The suggestion above, "nanoing these lines to "10.3" and a reboot fixed the failure to launch", didn't work for me.

I tried:

"sudo apt-get update" "sudo apt-get dist-upgrade"

and it worked.

Then, I fixed the issue using "sudo apt-get install libgl1-mesa-swx11" as suggested there.

My 2016-03-08

 `sudo apt-get install wolfram-engine

`got me an installation in which trying to launch Mathematica from the RPi GUI got me an error box with a message, complaining about an invalid file


As described in this thread, the offending file has pointers to "10.0" nonexistent directories in the lines headed "Exec" and TryExec"

nanoing these lines to "10.3" and a reboot fixed the failure to launch.

Is this the preferred fix, and are there other, maybe worse things lurking?


Exec=Mathematica %F



Fred Klingener

Posted 5 years ago

Hi Daniel,

I experienced a similar problem bringing up a RPI2 for a friend; the toolbar 'Mathematica' button stopped working after updating and upgrading an Element 14 Noobs + Recovery micro SD card (SK 40522 71053). Curiously, my own RPI2 SD card, derived from a 'raspian-jesse' image download dated 2015-11-21, worked fine after the update/upgrade.

Inspecting the file "/usr/share/raspi-ui-overrides/applications/wolfram-mathematica.desktop" from both RPI2's suggested the following fix, which solved the my problem:

Contents NOOBS/RECOVERY "/usr/share/raspi-ui-overrides/applications/wolfram-mathematica.desktop"

[Desktop Entry]
Comment=Technical Computing System
Exec=/opt/Wolfram/WolframEngine/10.0/Executables/Mathematica %F

Change following lines to match the file contents seen after the "raspian-jesse" SD card update/upgrade:

Exec=Mathematica %F

The changes were made from a command line terminal using the 'nano' editor:

cd /usr/share/raspi-ui-overrides/applications
sudo nano wolfram-mathematica.desktop

One could also use "sudo startx" at the command line interface prompt to run the GUI with root privileges, then navigate to "wolfram-mathematica.desktop" using the file manager, then make the required changes using the text editor. To revoke root privileges, exit to the CLI and restart the GUI using the regular 'startx' command.

Best Regards,

Layne Wright

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract