Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've downloaded from the USC an app that grabs colors with the mouse (result shows in the terminal) and I'm trying to add a unity launcher app to run that command in the gnome-terminal.

Here is the code:

[Desktop Entry]
Name=Grab Color
Exec=gnome-terminal -x grabc

The problem is that when I click the icon the terminal opens and closes. I just want it to be open in order to see the grabbed color.

Can someone help me? :(

share|improve this question
up vote 1 down vote accepted

You can create a simple shell script to grab the color and copy the output to clipboard and using that in the desktop file

Here is the shell script. I have named it as

echo ${OUT} | xclip -sel clip

Change your .desktop contents

[Desktop Entry]
Name=Grab Color
Exec= sh /home/user/

This will copy the output to clipboard. You need to have xclip installed. If its not installed. Install it using command.

sudo apt-get install xclip
share|improve this answer
Yes! It works very nice :D thank you a lot! :D – DeviDarkL Nov 26 '12 at 15:21
Glad that it helped you. – devav2 Nov 26 '12 at 15:26

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.