Clicking on an application won't launch it

I use a third-party application (gnome-latex) which will only launch if I run it from the Terminal (just running ‘gnome-latex’) or if I click ‘Launch’ within ‘Add/Remove Software’. Clicking on the application from ‘Show Applications’, or by searching for it in Activities, or from the dock, doesn’t work.

I’m not sure why clicking ‘Launch’ from within Add/Remove Software would be any different to clicking on the application’s icon on my dock or having searched for it in Activities. I’d be grateful for any advice to get the app running by just clicking on it!

Is there any output lauching the program in console ?

Launching in the console there is no output, the application works as expected, and on closing the application, the return code is 0.

Wrong command in the launcher maybe?

Do you know how I can change (or even just find out) the command in the launcher?

Check the Exec line in the desktop file:

cat /usr/share/applications/org.gnome.gnome-latex.desktop

You can also check the programs name with whereis gnome-latex or similar.

or

find / -name "latex".

In the desktop file, the Exec line under the [Desktop Entry] is: Exec=gnome-latex %U

I’m not sure what %U refers to, but removing it makes no difference, and the application still won’t launch by clicking on the application icon.

Changing the Exec line to point specifically to /usr/bin/gnome-latex (where whereis tells me it’s located) doesn’t work either.

Thanks all for your suggestions so far.

I’ve been playing around with the desktop file. There’s an entry Actions=new-window;new-document;, with two sections underneath ([Desktop Action new-window] and [Desktop Action new-document]). Removing these sections and Actions, the application launches.

I’m not sure why it wouldn’t launch with those two sections (running desktop-file-validate over the original file gave no errors or warnings) but happy I can now launch the application by clicking on it.

I’ve one last question - will the desktop file likely be overwritten next time I update the application?

You should put your modified and custom .desktop files in ~/.local/share/applications so they won’t be modified by any updates, and these files will always be preferentially used by your user profile over system versions with the same names in /usr/share/applications.

Perfect, thank you.

:wink:

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.