Cuttlefish: Set Up Actions And Reactions To Automate Ubuntu

Automate things you’re currently doing yourself. Cuttlefish is a new Ubuntu program that allows you to set simple rules that can save you time. It’s kind of like ifttt, which automates your web apps, but works entirely on your Ubuntu desktop.

You’ve heard it said: every action has an equal and opposite reaction. Cuttlefish isn’t built on that principle exactly, but it is built around stimuli that trigger actions. You can pick a stimulus – for example, connecting to a certain wireless network – and assign a reaction to it – for example, opening your web browser. These pairings are called reflexes, and with some creativity they can save you a lot of time. There’s no limit to the number of actions a reflex can have, meaning any one stimulus can trigger several simultaneous actions.

You don’t even need an action to react to: groups of commands can be launched manually from the menu.

Confused? Don’t be; it’s actually very easy to use, and no programming skills are required to use this GUI-based tool.

Getting Started

The best way to explain Cuttlefish is to try a few things. When I connect to the Internet the first thing I want to do is open a web browser, so why not use Cuttlefish to automate the process? I start Cuttlefish and create a new reflex. I turn on activation by stimulus and pick my stimulus:

In this case my stimulus will be connecting to Wifi, but there are serveral options. Once you’ve picked your stimulus you might be able to configure more details. In my case, I can pick a particular wireless network to connect to:

I’ve decided to trigger the action only when connecting to my personal network. So now I’ve set my stimulus. This means it’s time to set my reaction. Again, there are several options:

I’m interested in launching a program, so I choose that action. When I do I’m free to pick my program from a simple menu, and I’ve set up my reaction.

List of Stimuli and Actions

So what kind of triggers can you set up? Anything that combines the stimuli and actions defined below:

Stimuli

Application starts

Application stops

Bluetooth activated

Bluetooth deactivated

Bluetooth device connects

Bluetooth device disconnects

Connect to WLAN

Disconnect from WLAN/LAN

Power cable plugged in

Power cable unplugged

Screen is locked

Screen is unlocked

USB device plugged in

USB device unplugged

Actions

Activate Bluetooth

Activate reflex

Activate WLAN

Change default printer

Change desktop background

Change pidgin status

Change proxy mode

Change volume

Deactivate Bluetooth

Deactivate reflex

Deactivate WLAN

Hibernate

Lock screen

Reboot

Shutdown

Start application

Start application (advanced mode)

Stop an application

Suspend

Unlock screen

Wait

Of course this list will change; more stimuli and actions will be added. Install the software for a complete list, because I cannot currently find one online to link to.

Think of Ideas!

What Cuttlefish can do for you depends entirely on your imagination. I thought of a few things, including shutting down Dropbox when I’m offline and giving myself one link to launch my IM and Twitter clients at the same time.

Spend some time playing with the software and figure out what it can do, then come back here and share your ideas below so everyone else can benefit.

Installing Cuttlefish

Cuttlefish will be in the Ubuntu Software Center soon, so check there first. If you can’t find it, don’t panic: there’s a Cuttlefish PPA. Use these commands to add the PPA to your system and install Cuttlefish:

Get the best tips from MakeUseOf in your inbox, free!

Joe Johaneman

July 26, 2012

I’ve been using Debian for a few weeks now. While this looks like Ubuntu only, it’ll probably work in Debian. There is a tarred gzip that can be downloaded from Launchpad. It might be possible to make it work with other varieties of linux. It’s written in python. I’m on my Mac now, not my Debian box, so I can’t text it. But you can download it here: https://launchpad.net/cuttlefish

Then extract it: tar -xvzf cuttlefish*.tar.gz

cd into the newly created directory and type

sudo python setup.py

And see if it works!

Justin Pot

July 27, 2012

Let me know if it works for you; it seems like it’s mostly being built for Ubuntu for now.