After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 142496 - scripts don't show up in menu if application/x-shellscript mime-type registered to open with gedit
scripts don't show up in menu if application/x-shellscript mime-type register...
Status: RESOLVED FIXED
Product: nautilus
Classification: Core
Component: Scripts facilities
2.6.x
Other Linux
: Normal normal
: ---
Assigned To: Nautilus Maintainers
Nautilus Maintainers
: 142779 147473 150536 152373 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-05-13 20:57 UTC by Eugenia Loli-Queru
Modified: 2005-04-06 18:07 UTC
See Also:
GNOME target: ---
GNOME version: 2.5/2.6


Attachments
Terminal Here script (352 bytes, application/octet-stream)
2005-01-25 18:59 UTC, Jaap A. Haitsma
Details

Description Eugenia Loli-Queru 2004-05-13 20:57:11 UTC
I lost my script facilities when I upgraded my 2.4.2 to Gnome 2.6.
The *first* time I logged in to the new gnome, the scripts *were* showing in 
the context menu. But any subsequent relogin to the new gnome would show no 
sign of the scripts menu. Please check the screenshot here:
 http://img.osnews.com/img/7002/nautilus.png
The script lives in the right place as always did, the permissions are right, 
and yet, no sign of it in the context menu.
Comment 1 Eugenia Loli-Queru 2004-05-18 07:57:44 UTC
I found out what happened.

So, at some point I want to *view* a shell script instead of running it (for 
some reason Nautilus 2.6 doesn't ask me if I want to view a script or run it 
as it used to on 2.4.2). So, I right click and tell it to open it with "an 
application". I chose gedit.

From that point on, *all* application/x-scripts mime stuff were not considered 
executable anymore. I never said that I wanted gedit to open all my scripts, 
but that's what happened. And that's how I lost the Nautilus scripts and none 
of the other scripts would run via the file manager anymore.

To fix it, I had to go to gnome's preferences/file associations/ and under 
the "misc" category remove the application/x-shellscript (or something like 
it) mime type which was binded to gedit at that point.

When I did that, I had my Nautilus scripts back (however Nautilus 2.6.1 still 
doesn't ask me if I want to run a script or open it with a text editor).

I believe that the whole MIME way on gnome/nautilus is just too easy to break, 
too easy to freak up, and there is not a clear way how to go back to how it 
was.. I hope the whole mime situation is going to be completely redesigned 
soon.
Comment 2 Eugenia Loli-Queru 2004-05-18 07:59:48 UTC
Is this situation going to be fixed on a dot release or a whole redesign is 
due before we have something sane?
Comment 3 Matthew Gatto 2004-05-18 21:22:00 UTC
I can confirm this. If you have gedit setup to open shell-scripts by default,
only after deleting the application/x-shellscript from the "File types and
programs" dialog will the scripts show up in the context menu.

Alot of people on IRC have been reporting the same problem. Thanks for finding
out the cause.
Comment 4 Isak Savo 2004-05-23 15:25:07 UTC
This also happens when autopackage registers itself as a handler to
application/x-shellscript

Wouldn't it be better if nautilus would show the scripts regardless of what
action is performed when I double click scripts?

I mean, it could be that some people *always* want to open shell scripts with
emacs when opening them from nautilus, but that doesn't mean that they don't
want nautilus scripts to go away? 

My two cents..
Comment 5 Mike Hearn 2004-05-23 15:38:51 UTC
I think this is a known problem with the move to shared-mime-info. The type of
shellscripts changed, and Nautilus' internal list of shell script mime types is
out of date. A patch has been written and posted to the list, but neither Alex
nor Dave replied to it so I assume it's still pending review.

This bug is probably a dupe.
Comment 6 Greg 2004-07-14 22:23:45 UTC
*** Bug 147473 has been marked as a duplicate of this bug. ***
Comment 7 David Gómez 2004-07-17 17:11:57 UTC
Wouldn't it be a good Idea to have three possible operations on the filesystem?

I suggest 3, plus the custom scripts menu entry

1. View
2. Execute
3. Edit

All three for every kind of file. 
View could be a nautilus embeded viewer.
Execute would do different things deppending on the file MIME. If its a shell,
maybe run it on a screen (as in the screen program), such that it could be
(de)attached in terminals, and some way to check for finished vs still running
screens.
Edit would open it on a program to edit it.

As an example, I could open a series of pictures with Execute on gqview, and
with Edit on The Gimp, or in the case of a shell, Execute would run it on a
screen which could be reattached on a terminal, and Edit would open it with a
custom editor.
View would display it, if possible, on a new window.
Comment 8 Martin Wehner 2004-08-21 14:36:53 UTC
*** Bug 150536 has been marked as a duplicate of this bug. ***
Comment 9 Martin Wehner 2004-08-21 14:37:46 UTC
*** Bug 142779 has been marked as a duplicate of this bug. ***
Comment 10 Martin Wehner 2004-08-21 14:42:28 UTC
This does seem to work again with the new mime system - I just tried to
reproduce it with 2.9.71 (HEAD as of yesterday). Please re-open if you can still
reproduce it with a later version.
Comment 11 Martin Wehner 2004-09-11 17:24:15 UTC
*** Bug 152373 has been marked as a duplicate of this bug. ***
Comment 12 Sebastien Bacher 2004-09-25 11:27:55 UTC
for the record it's fixed by shared-mime-info 0.15 (and broken with 0.14)
Comment 13 Luis Villa 2005-01-25 13:34:25 UTC
Dumb question, but can someone provide a script and quickie instructions on how
to install it so I can test this myself? I've forgotten where they go, and most
of the ones I can find online appear to depend on gdialog. Thanks...
Comment 14 Jaap A. Haitsma 2005-01-25 18:59:30 UTC
Created attachment 36514 [details]
Terminal Here script


Save as ~/.gnome2/nautilus-scripts/Terminal Here 
and make it executable
Comment 15 Raul Acevedo 2005-04-06 18:07:29 UTC
I've upgraded to shared-mime-info 0.15 and I get the same problem.

In fact, when I go to Preferences -> File Types and Programs, I only see one
category: Internet Services.  Isn't there supposed to be a ton of other stuff
there too?