1

I want to make a launcher which opens a random application. So I looked it up on this site and I found this:

But I have a right-click menu on my desktop that looks like this:

https://drive.google.com/file/d/0Bz7e6pVd-HaLM2lVQ0ZFbllBZWs/edit?usp=sharing

So now I still don't know how to create launchers. Does anyone know a way for dummies?

1 Answers1

1

Starting with Ubuntu 11.10, this is the fastest way (at least for me) to create a new launcher on your desktop.

That being said, let's make a script called random_app which will open a random application:

#!/bin/bash

apps_path="/usr/share/applications/"

random_app=$(grep -m 1 "^Exec" "$apps_path$(ls $apps_path | shuf -n 1)" | \
           awk -F'[=| ]' '{ print $2 }')

$random_app

Save the script in your ~/bin directory and make it executable using the following command in terminal:

chmod +x ~/bin/random_app

Now, you can create a launcher on your desktop as it is explained here for the script random_app:

create launcher

Radu Rădeanu
  • 174,089
  • 51
  • 332
  • 407