Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I'm using Gnome-Do with the "Files and Folders v2.5" plugin. I set it to read my .scripts folder, so that I might run my personal scripts from Gnome-Do. The only problem is that Gnome-Do's standard action for shell scripts is to open them instead of running them. That forces me to Tab and scroll-down every time. How can I change Gnome-Do's standard action?

An example for clarity:
I have a foo.sh executable file inside my .scripts folder. When I type foo inside Gnome-Do, it correctly selects the file and offers the Open action. I then have to Tab, press Down, and hit Enter to select the Run action instead. I would the Run action to be first on the list.

Alternatively, a more appropriate way to integrate Gnome-Do with personal scripts would be fine as well.

share|improve this question

1 Answer 1

up vote 4 down vote accepted

This is not directly possible in Do, but it does have a capability to learn what you mean. The default action for any item is always the action you've used most frequently out of the possible actions for that item.

So, one way of getting what you want would be to just use the run action a lot from Do.

Another way would be to inform Do that your script is an “application” that's runnable, like Firefox or Evolution or such. Do determines the list of applications by searching for .desktop files in the standard locations. One of these locations is ~/.local/share/applications. So, if you create a foo.desktop file looking something like:

[Desktop Entry]
Version=1.0
Name=Foo desktop frobinator
GenericName=Desktop frobinator
Comment=Awesomeate your desktop!
Exec=/home/raof/.scripts/foo.sh
Icon=shotwell
Terminal=true
Type=Application
Categories=Graphics;Photography;GNOME;GTK;

you'll get a “Foo desktop frobinator” runnable item in Do.

share|improve this answer
    
I'm not so sure about the first part. I've tried running my script over a dozen times and gnome-do still offers to open it for me by default, even though I only opened it once or twice. –  Bruce Connor Nov 10 '10 at 12:26
    
I really like the second option, though it'll be annoying to do that for each of the scripts, I think I'll go with it. –  Bruce Connor Nov 10 '10 at 12:27
    
The “default action” code is a bit limited. It's not how many times you've selected “run” vs “open” on the “foo” item, it's how many times you've selected “open” vs “run”, regardless of the item. It's one of the remaining areas of significant suck in Do. –  RAOF Nov 11 '10 at 5:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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