PDA

View Full Version : [ubuntu] [SOLVED] Can I run a script by clicking on it without being asked if I want to displa



MiniMe
June 6th, 2008, 03:03 AM
Hello,

I've written a very small script.

I gave it execute permissions under the file properties -> permissions tab. Whenever I click on the file I'm prompted "Do you want to run "filename", or display its contents?" I'd like to always run the file. Is there a way I can avoid clicking "run" when prompted and have the file always run when I click it?

I doubt the specifics of the script matters just in case: I created the script to kill wineserver because sometimes it consumes 100% of my cpu.
https://bugs.launchpad.net/ubuntu/+source/wine/+bug/205895

The file contains:

#!/bin/bash
kill -9 `pidof wineserver`
kill -9 `pidof IEXPLORE.EXE`

Any help would be appreciated. Thank you in advance.

utsuprainfra
June 6th, 2008, 03:07 AM
you could create a launcher by right clicking on the desktop and specifying

/bin/bash /path/to/script

as the command.

iaculallad
June 6th, 2008, 03:09 AM
In nautilus window go to edit->preferences, under the "behavior" tab, there are options for "Executable text files".

jpeddicord
June 6th, 2008, 03:10 AM
In nautilus window go to edit->preferences, under the "behavior" tab, there are options for "Executable text files".

More specifically, you want Run executable text files when they are opened.

MiniMe
June 6th, 2008, 03:17 AM
Thanks all! Much appreciated.