4

I've create a simple file.desktop from chromium but every time I click on it it prompt :

this file seems a script whatn you want to do?

Execute Execute in terminal Open Cancel

This happen with all files .desktop on the Desktop folder.

this is an example:

#!/usr/bin/env xdg-open

[Desktop Entry]
Version=1.0
Terminal=false
Type=Application
Name=PROVA
Exec=/usr/bin/chromium --profile-directory=Default --app-id=ffgolldjdihlhdjkieofmjgjikkcbjbj
Icon=chrome-ffgolldjdihlhdjkieofmjgjikkcbjbj-Default
StartupWMClass=crx_ffgolldjdihlhdjkieofmjgjikkcbjbj

How can I set all for Execution without prompt?

5 Answers 5

5

Open PCManFM, Go to Edit/Preferences/General, Check box for "Don't ask options on launch executable file"

From https://askubuntu.com/questions/333256/how-to-skip-execute-file-dialog-in-lubuntu-pcmanfm

3

The string #!/usr/bin/env xdg-open should not be in a .desktop file.

These files are simple INI files defining how to open an application, not scripts to be executed.

Delete this erroneous line and try again.

1
  • No luck, still getting the same prompt.
    – user340971
    Commented Jul 29, 2020 at 8:35
1

To remove the prompt when launching an executable file, do the following: Open File Manager Select Edit - Preferences - General Tick the option "Don't ask options on launch executable file"

0

Another workaround is to put the desktop entry in its default directory and create a link to it, like the OS does when you drag and drop a entry from the menu to desktop.

0

Q: How can I set all for Execution without prompt?

A: Answered with the PcmanFM configuration.

In Linux, a .desktop file is not meant to be directly opened like a regular text file. Instead, it is a file format used for defining application launchers and menu entries. These files contain information about an application, such as its name, icon, command to execute, and other metadata.

When you double-click a .desktop file in a file manager or launch it from the command line, the associated desktop environment or window manager interprets the file and performs the appropriate action. This typically involves launching the application specified in the Exec field of the .desktop file.

Now, there is a difference between doing it from here (PCmanfm)

enter image description here

Or from here (an 'application launch bar' or the 'applications menu')

enter image description here

In the second case, it will execute it without asking, because (I guess) it is the intended location to 'run it from'.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .