0

I have some bash scripts in my ~/bin folder. I have added this folder to my PATH variable in ~/.bashrc, so I can run them from terminal easily. But I want to run them by simply typing them in the "Run Application" launcher (Alt + F2).

I am not looking for adding a launcher for a single script. I want to put my scripts in a folder and run it using the "Run Application" dialog by typing script name.

"Run Application" dialog image:

enter image description here

Thanks!

1 Answer 1

1

Scripts you put in your ~/bin folder should run by simply typing their name, pressing AltF2however:

  • If the image is from your computer (which I doubt, it seems an old one): simply type the scriptname, not necessary to include the path (which would be wrong in this example, since the script is in ~/bin, not in /usr/sbin, like in your image.
  • Make sure the script is executable
  • if you (need to) run the script with sudo privileges, you should install gksu first:

    sudo apt-get install gksu
    

    and the run them with the command:

    gksu <scriptname>
    

    (As mentioned: I assume the image is not from your computer)

    Explanation:

    Since you do not run the script in a terminal, you should give Ubuntu another way to ask for your password, like gksu.

3
  • Thanks for answering. The image is not from my computer. I didn't type the complete script name yesterday, but when I was typing the name it was not auto completing. It was, may be, because I updated the PATH variable to include ~/bin in my ~/.bashrc but did not logout or restart. Today (I had restarted the PC), I typed and it was autocompleting :) Sep 27, 2014 at 20:39
  • There is one more issue. Say my script name is "mountWindowPartition". When I type "mount", it does not autocomplete, probably because there is another binary "mount" in the system. It doesn't even show the list of options related to "mount" in the window (expanded after click "Show list of know applications"). So, basically I need to remember/type the name of script. Is there any way to get around this problem? Sep 27, 2014 at 20:45
  • @ParveenKumar what I would do is rename the script to mount_WindowPartition. The moment you typed mount_, you can autocomplete :) however, the same goes for mountW. Sep 27, 2014 at 21:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .