Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

The deal is that I just recently began to use Linux (Lubuntu) and I need some basic knowledge. My brightness on my Packard Bell Dot netbook is always on the highest, and the brightness control buttons aren't working. I found a command line to set the brightness level to a specific percentage. I‘d like to create three executables: 85%, 50%, 25%. My question is how do I make a file on my desktop which when clicked upon it runs a certain line of command. I don‘t want to open the terminal every single time.

Thanks.

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

Initially, you need to write a shell script. Just open a text editor and write

#!/usr/bin
your command here

Next, all you need to do is just to create a .desktop file in Ubuntu.

Open your terminal and type as

sudo -i
cd /usr/share/applications/
nano <your_scriptname.desktop>

Then, it will give you an opened file and copy & paste these lines there one by one.

[Desktop Entry]
Type=Application
Terminal=true
Name=<what script name you want write here >
Icon=<any icon you want to give that iconspath>
Exec=<place here path of your script>

Save and close with CTRL+X+Y and hit Enter. You will have that script on your desktop as an application.

Like this, you can similarly create three applications for the three scripts you made.

I hope that helps.

share|improve this answer
add comment

Your Answer

 
discard

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.