Share this:

Like this:

I have already written in the past a post regarding how to create a custom unity launcher.
Yesterday, I’ve come across an issue. I’ve downloaded Pentaho’s Data Integration tool Kettle, and the executable is a shell script. Meaning that it needs to be called from a terminal in order to run. Now, even though I’ve added the shell script into a Unity Launcher, the software didn’t start after pressing the icon in the dash.
So, I figured out that I need to create another shell script which calls the gnome-terminal and passes the call to the kettle shell script.
In order to achieve this, I used expect (install)

So, I’ve created a script called call_tool.sh:

#!/usr/bin/expect -f
# Get a Bash shell
spawn -noecho bash
# Wait for a prompt
expect "$ "
# Send the dir to kettle and then send the command for spoon.
send "cd /path to script\n"
send "./spoon.sh\n"
# Hand over control to the user
interact

The \n character is needed for the enter.

After that I’ve made the script executable:

sudo chmod +x call_tool.sh

Then pointed my Unity launcher to call_tool.sh, and that’s it. It works.

Because Guake is not yet Unity ready, the lower right corner of the terminal is not visible, hence you can not drag it to re-size the width.

Because there is no option for setting the width, the solution is to edit the python script, and manually set the desired init width. As soon as the lower right corner is visible, you can re-size with the mouse as much as you like.

Back-up /usr/lib/guake/guake.py

Because you need to be root to edit this script, run:

gksu gedit /usr/lib/guake/guake.py

Then, go line 817 (that’s valid for Ubuntu 11.10 at least), where you see the following code:

Share this:

Like this:

There are quite a few applications, which don’t integrate directly with Ubuntu’s Unity shell by default. They either won’t get kept in the launcher or their icon is not displayed.

Solution

gksudo gedit /usr/share/applications/<name of application>.desktop

After entering the password, gedit will open in root mode.
Paste the following into the file:

[Desktop Entry]
Version=1.0 #or whatever version the software is
Type=Application
Terminal=false
StartupNotify=true
Icon=<> # fill in path to logo
Name=<name of the application>
Comment=<> # any description
Exec=env UBUNTU_MENUPROXY=0 <> # fill in path to the executable
Categories=Application; # add as many categories as you see fit

After filling in the required data in the file, save it and close it.

Next time you search for the application in the dash, it will be found with logo and all. You can drag&drop it on the launcher, or start it and right click then ‘Keep in launcher’.