Tuesday, June 5, 2012

Ubuntu Tip 01: Octave on Guake Terminal at Startup

UPDATE: I recommend using Screen to manage multiple applications in a terminal, you can use it with Guake as well. Check this post.

The Guake Terminal


Are you heavy user of the Command Line Interface (CLI)? Yes? Have you heard of guake? No? Well, guake is a nice program that allows you to invoke and hide the gnome terminal with one key stroke.

Using guake saves time on launching/closing the gnome terminal multiple times, because guake always uses the same instance of the gnome terminal.

Installing guake is easy, it's in the ubuntu universe repository, only type the following command in your terminal.

sudo apt-get install guake

You can now launch guake via dash (super key) or via command (Alt + F2).


Guake is now running, you can show/hide it using the F12 key. Other useful shortcuts are (Ctrl + Shift + T) which opens a new tab in the terminal, (Ctrl + PgUp/PgDown) which cycles through the tabs and F11 which toggles on/off the full-screen mode.

OK, time to do some customization, launch guake preferences (via dash), you can modify various settings like background color, font color, transparency, windows height, etc. Be creative!


In case you are wondering, the default background color of the gnome terminal (which I'm using) is #300A24.

Let's move to octave now!

Octave


GNU Octave is a high-level language, very useful for numerical computations in engineering and science. If you have used MATLAB before, Octave is pretty much the same, only that it's open source.

You can get octave (version 3.2, which is kind of old) from the universe repository, using the following command.

sudo apt-get install octave

Octave runs from the Command Line, so let's call it from the guake terminal.


Now we have an easy access to a powerful calculator, let's make a script that launches guake with octave inside it at startup.

Putting them together at startup


Type the following commands in the gnome terminal.

cd ~
mkdir scripts
cd scripts
gedit guake-octave.sh

On the text editor that popped paste the following code (don't copy the line numbers):

Save the .sh file, and let's make it executable using the following command.

cd ~/scripts
chmod 755 guake-octave.sh

Let's add this script to the startup applications. Launch startup applications from dash.


Click on the add button, add some description and browse to the script file.


We're done. Reboot and start using octave as a calculator, plotter, etc.


MUST SEE: How to augment Octave capabilities using Vim.

No comments:

Post a Comment