GNOME Bugzilla – Bug 142496
scripts don't show up in menu if application/x-shellscript mime-type registered to open with gedit
Last modified: 2005-04-06 18:07:29 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.
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.
Is this situation going to be fixed on a dot release or a whole redesign is due before we have something sane?
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.
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..
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.
*** Bug 147473 has been marked as a duplicate of this bug. ***
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.
*** Bug 150536 has been marked as a duplicate of this bug. ***
*** Bug 142779 has been marked as a duplicate of this bug. ***
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.
*** Bug 152373 has been marked as a duplicate of this bug. ***
for the record it's fixed by shared-mime-info 0.15 (and broken with 0.14)
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...
Created attachment 36514 [details] Terminal Here script Save as ~/.gnome2/nautilus-scripts/Terminal Here and make it executable
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?