Dash opens desktop files in gedit instead of running them

Bug #975427 reported by Colin Law
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Unity
Confirmed
Undecided
Unassigned
unity-lens-files
Confirmed
Undecided
Unassigned
unity (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

To replicate, place a .desktop file in Desktop folder. Open the Dash and enter start of filename. The Dash shows the file under Files and Folders. Select the file and it is opened in gedit instead of being run.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in unity-2d (Ubuntu):
status: New → Confirmed
Revision history for this message
Aditya V (kroq-gar78) wrote :

This also affects me on Ubuntu 12.04 Beta 2 w/ Unity 3D. Also, setting the file's executable bit to true doesn't do the trick for Unity. It still tries to open it through gedit (for me).

Revision history for this message
Aditya V (kroq-gar78) wrote :

Also, is it possible that it's actually the files' lens's problem and not Unity's?

Revision history for this message
Albert Astals Cid (aacid) wrote :

Adding unity-lens-files here since after having a look at the unity-2d code all i see is that we just call activate on the item so it's up to the lens to decide what to do with it

OTOH i think this is more a wish than a bug

Changed in unity-2d:
status: New → Invalid
Revision history for this message
Colin Law (colin-law) wrote :

With regard to whether this is a wish or a bug I assumed that the action in the dash would be the same as the default open action for a file. Since the default action for a .desktop file is to run it then logically this is what should happen.

Omer Akram (om26er)
no longer affects: unity-2d
no longer affects: unity-2d (Ubuntu)
Revision history for this message
Bilal Akhtar (bilalakhtar) wrote :

Is the desktop file set to execute (+x permission)? The file lens uses xdg-open and it should execute the desktop file if the execute permission is set.

Changed in unity:
status: New → Incomplete
Changed in unity-lens-files:
status: New → Incomplete
Revision history for this message
Colin Law (colin-law) wrote :

Yes the .desktop file has execute permission, and when I double click it (or right click open) on the desktop it runs. However if, in a terminal, I do
xdg-open <name>.desktop
it opens in gedit.
I think we are getting to the crux of the problem.

Changed in unity:
status: Incomplete → Confirmed
Changed in unity-lens-files:
status: Incomplete → Confirmed
Revision history for this message
Aditya V (kroq-gar78) wrote : Re: [Bug 975427] Re: Dash opens desktop files in gedit instead of running them

So it's an xdg-open problem then?

Revision history for this message
Colin Law (colin-law) wrote :

Apparently so. See bug #378783. It does not seem correct to mark this as a dup of that though as the symptom is different. I have added a comment to that bug.

Revision history for this message
Julian Stecklina (js-alien8) wrote :

Still happens to me using xdg-open 1.1.0 rc1 on Fedora 18. Is there a straight forward way to debug this?

Changed in unity (Ubuntu):
status: New → Confirmed
Revision history for this message
Alex Baggott (alex-baggott) wrote :

As part of the big bug review for 16.04 LTS, I have tested this on 15.10 and the bug is still there.

tags: added: desktop-bugscrub-triaged
tags: added: rls-w-incoming
tags: removed: rls-w-incoming
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.