When double clicking an executable bash script in file manager, it opens in gedit rather than executing

Bug #1433774 reported by Lee Revell
98
This bug affects 23 people
Affects Status Importance Assigned to Milestone
nautilus (Ubuntu)
Triaged
Low
Unassigned

Bug Description

Download https://www.torproject.org/dist/torbrowser/4.0.4/tor-browser-linux64-4.0.4_en-US.tar.xz and extract it to a folder.

Navigate to that folder in the GNOME file manager.

Double click "start-tor-browser".

Expected result: The script executes and launches the browser.

Actual result: The script opens in gedit. Even when right clicking it, "Run" is not listed as an option anywhere. It's not even an option under "Open With... -> Other Application". The only way to run it is from a terminal.

ProblemType: Bug
DistroRelease: Ubuntu 14.04
Package: nautilus 1:3.10.1-0ubuntu9.7
ProcVersionSignature: Ubuntu 3.16.0-31.43~14.04.1-generic 3.16.7-ckt5
Uname: Linux 3.16.0-31-generic x86_64
ApportVersion: 2.14.1-0ubuntu3.7
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Mar 18 16:00:48 2015
GsettingsChanges:

InstallationDate: Installed on 2015-03-06 (12 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
SourcePackage: nautilus
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Lee Revell (rlrevell-k) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nautilus (Ubuntu):
status: New → Confirmed
Revision history for this message
aaronfranke (arnfranke) wrote :

Executing should be the default behavior. The fact that it's not possible to execute at all except by opening the Terminal is insane.

Revision history for this message
aaronfranke (arnfranke) wrote :

Affects Ubuntu 16.04 as well.

Revision history for this message
Mark O'Donovan (shiftee) wrote :

And Ubuntu 17.10

Revision history for this message
Luke (cajuncoder) wrote :

This is a horrible UX issue that will only trip up new users and should be addressed. Sane defaults, please!

Revision history for this message
PabloAB (pabloab777) wrote :

As I said on [this][1] probable upstream issue this bug seems to be reduced just to have by default 'ask' or 'launch' as the default value for key `executable-text-activation` (on org.gnome.nautilus.preferences), or I'm missing something?

  [1]: https://gitlab.gnome.org/GNOME/nautilus/issues/443#note_497621

Changed in nautilus (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → Low
Revision history for this message
Michel-Ekimia (michel.ekimia) wrote :

IN our Setup script we do :

gsettings set org.gnome.nautilus.preferences executable-text-activation ask
So the user can decide if he wants to execute it .

This should be the default behaviour.

if security risk is too high, then we should create a default "script executor" that would warn the user harder like on Windows 10.

Revision history for this message
Dan Dascalescu (ddascalescu+launchpad) wrote :

Still an annoying problem in Ubuntu 20.

Revision history for this message
Major Johnson (draco18s) wrote :

And with Ubuntu 21.10, it's gotten worse.

The "Executable Text Files" preferences is gone. The dconfg property executable-text-activation is gone. Double clicking still opens the file in gedit.

But at least "run as a program" was added to the right-click menu, so that's good, I guess?

Revision history for this message
GLehnhoff (glehnhoff) wrote :

Still not working with Ubuntu 22.04. KDE can do that.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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