Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have created different scripts that I successfully used under Lubuntu/Lxde, including some made to be run by keyboard shortcut that would start firefox and search selected text on the internet.

For example, this script, if associated with a shortcut, should search selected text in google:

#! bin/sh

sh -c 'firefox "https://www.google.com/search?q='$'(xclip -o)"'  

One to translate French to English:

#! bin/sh

sh -c 'firefox "http://translate.google.com/#fr/en/$(xclip -o)"'

and so on

But in Mint/Xfce, cannot add these scripts to be run by shortcut in Settings/Keyboard/Application Shortcuts: I get an error similar to this:

enter image description here

I think some applications have to be installed to run this. But after installing xclip and git it still doesn't work.

share|improve this question
You have a wrong shebang line, is that a typo? It should be #!/bin/sh. Also,please show the output of ls -l /home/cipricus/Documents/scripts/firefox/search-google.sh. –  terdon Feb 8 '13 at 15:46
@terdon: the output:$ ls -l /home/cipricus/Documents/scripts/firefox/search-google.sh -rwxrwxr-x 1 cipricus cipricus 75 Nov 29 20:09 /home/cipricus/Documents/scripts/firefox/search-google.sh . the form of the script works fine, maybe something wrong with my copy/paste here? –  cipricus Feb 8 '13 at 15:49
And the shebang line? –  terdon Feb 8 '13 at 15:50
don't know exactly what you say it's wrong. you say: "It should be #!/bin/sh". you mean no space between ! and /? i just open my otherwise working scripts and pasted here –  cipricus Feb 8 '13 at 15:54
More importantly, I mean it should have an /. In your question you have it as #! bin/bash instead of #!/bin/bash –  terdon Feb 8 '13 at 15:54

1 Answer 1

up vote 0 down vote accepted

As requested, I am posting my comment as an answer.

It looks like you have a bad shebang line. Try


instead of

#! bin/bash

The space should not be an issue, the / before bash, however, is essential.

share|improve this answer

Your Answer


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.