I created an executable .desktop file in my Desktop which should launch a GUI application along with displaying an icon in dock, but in Ubuntu 17.10 icon is not displaying in dock:

desktop with download dialog

In previous Ubuntu versions (14.04 to 17.04) I didn't face this issue.

In Ubuntu 17.10 no 3rd party applications with icons as executables are being launched by default, It's asking for trust and launch to proceed.

untrusted application dialog

How can I give the launchers default execute permission, or whatever permission is needed to avoid getting this dialog?

The executable was created by compiling in Ubuntu 14.04 to support backward compatibility.

The .desktop file created to display the icon contains:

#!/usr/bin/env/ xdg-open 
[Desktop Entry]

Is this changed in Ubuntu 17.10?

  • @pomsky workaround you suggested for that issue is not working for me even in Xorg session – Ravi Teja V Nov 2 '17 at 5:56
  • 1
    Please check two things first: 1. Does the icon file specified in the desktop file (i.e. /home/ravi/Downloads/MDM/mavldm.png) exist? If yes, 2. Click on "Activities" and search for "MDM". Does it show the icon? – pomsky Nov 2 '17 at 7:01
  • 1. Icon file specified is present 2. I clicked on Activities and searched for mavldm.png, i am seeing nothing. Same scenario i repeated in Ubuntu 16.04, i can see the icon in activities – Ravi Teja V Nov 7 '17 at 9:13
  • My use case is not to make it as favorites, after clicking on the executable icon should come in the dock directly launching a GUI application. It's is working in previous Ubuntu versions – Ravi Teja V Nov 7 '17 at 10:44
  • It is having executable permissions. Executable is working fine as expected but only icon is not displaying – Ravi Teja V Nov 7 '17 at 11:06

First right click on the .desktop file and select Properties. Then go to Permissions tab and check the "Allow executing file as program" if it's unchecked. Alternatively you may run

 chmod +x <filename.desktop>

Then double-click on the .desktop file, a window with the heading "Untrusted application launcher" should pop up (as in your second screenshot). Click on the "Trust and Launch" button. The .desktop file should be fixed now (i.e. should show correct name and icon specified inside the file) and the application will be launched.

From next time on it won't ask for any permission and launch the application straight away.

  • If this doesn't work try adding a StartupWMClass= line to the .desktop file following this answer. – pomsky Nov 7 '17 at 16:43
  • Is there any option to bypass the Untrusted application launcher through terminal commands and launch the application even for the first time. As it is showing like a text file,till we click on "trust and launch". – Ravi Teja V Nov 8 '17 at 5:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.