All we need is an easy explanation of the problem, so here it is.
Ubuntu 18.04.6 desktop and then
When I want to run a game (e.g. sudoku) it writes.
Invalid desktop entry file:'/usr/share/applications/gnome-sudoku.desktop
Any game isn’t working. The other applications will launch without problems.
How to solve :
I know you bored from this bug, So we are here to help you! Take a deep breath and look at the explanation of your problem. We have many solutions to this problem, But we recommend you to use the first method because it is tested & true method that will 100% work for you.
- Check if gnome-sudoku is on your path by opening a terminal and just entering
- If that worked, please try to comment out
DBusActivatable=true(or set it to false) in
/usr/share/applications/gnome-sudoku.desktopin your case) and restart your LXQT session (logoff+logon). You must be su to edit (e.g.
sudo nano ...). Launch Sudoku from the application menu.
Please tell me, if that worked.
When looking up
/usr/share/applications/org.gnome.Sudoku.desktop you will find the following line:
freedesktop.org writes in their specification:
A boolean value specifying if D-Bus activation is supported for this application. If this key is missing, the default value is false. If the value is true then implementations should ignore the Exec key and send a D-Bus message to launch the application. See D-Bus Activation for more information on how this works. Applications should still include Exec= lines in their desktop files for compatibility with implementations that do not understand the DBusActivatable key.
In short this means, Sudoku is not started by a plain command, but by sending a D-Bus message.
When deactivating the
DBusActivatable entry, the
Exec entry is used, which should work fine, though.
I strongly assume there must be an incompatibility between LXQT and Gnome regarding D-Bus and the
I tested it without installing LXQT myself by starting
dbus-monitor. With the switch set to
true I can see the following message (Sudoku started via "Acitvate" method):
method call time=1636304012.356091 sender=:1.90 -> destination=org.gnome.Sudoku serial=7 path=/org/gnome/Sudoku; interface=org.freedesktop.Application; member=Activate array [ dict entry( string "desktop-startup-id" variant string "gtk-launch-24810-harald-desktop-gnome-sudoku-0_TIME0" ) ]
With the switch commented out, this message does not appear, so the Exec command must be used directly.
As long as other Applications are running fine, I would not further invest time in figuring out what the exact reason for D-Bus mismatch between LXQT and Gnome is.
But if you have time, of course you can run
dbus-monitor and maybe you find some explanation.
I would reinstall the program. 99% of the time that will cure this particular problem.
Note: Use and implement method 1 because this method fully tested our system.
Thank you 🙂