Possible Duplicate:
Apply icons to bash scripts

I need to run " v4l2-ctl -i 2 " in Terminal, by clicking on a desktop icon. Right now, I have to manually open Terminal, type in this command, and it sets the video input of my tv card in Ubuntu. Then I can open the tv player to watch tv. For some reason, the tv card input doesn't stay set. It is a pain to have to open Terminal and run this command every time I want to watch tv. I want to just be able to click a desktop icon, and have it automatically open Terminal, and run this command, and then shut Terminal by itself. (the tv player already has an desktop icon) I've never done any kind of script before, so speak S L O W L Y....LOL -Thanks

marked as duplicate by belacqua, Panther, stephenmyall, user2405, Eliah Kagan Feb 5 '13 at 1:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Create the file
    • Right Click on the desktop
    • Create New Document -> Empty Document
    • Name it: tv or something to your taste
    • Open the file with text editor

File Contents (save it please)

    v4l2-ctl -i 2

Right click on the file

Select Properties>Permissions

Check the box following Execute: which allows the file to be executed

Double Click And Select either Run or Run In Terminal

(you can also use properties to change how the file looks) just click on the icon and then select a suitable image also you could create a custom keyboard shortcut, or an alias if you find the desktop icon unsightly.

  • After creating the script, to really make a desktop icon, a desktop file (specifying icon) should be created to run the given script: as here: askubuntu.com/a/60670/47206 – user47206 Feb 4 '13 at 9:57
  • 1
    i cant seem to put it in terminal it keeps opening in gedit – samgabbay Jun 30 '13 at 22:12

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