Running Scripts on your Nokia N9/N950 with MyMoves

Oct 13, 2011


In case you use MyMoves, here’s a fun thing to play with: running Python & shell scripts with gestures :)

For this you will need to have the developer mode enabled. I’m also going to assume you’ve already got Python for Harmattan already installed.

Running shell scripts with MyMoves
Say, you’ve got a useful shell script at /home/user/MyDocs/ Let’s run that using MyMoves gestures:

1. Edit /home/user/.config/mymoves.conf
2. Replace the line of the gesture of your choice. I’m going to use the ‘swipe up with two fingers’ gesture for this example, which is the row beginning with d0 in mymoves.conf

Put this into that line:
d0###MyScript###/usr/bin/aegis-exec -s -u user -l ‘/usr/bin/meego-terminal -n -e sh /home/user/MyDocs/’

3. Make sure to edit and insert a pausing row to the end of the script, so the Terminal window won’t just close immediately:

read -p ‘Press a key to continue…’

4. Go to MyMoves configuration UI, press ‘Stop Observing’ and after that ‘Start observing’, so the updated mymoves.conf is loaded.
5. Swipe!

Running Python scripts with MyMoves
Python scripts work exactly the same way, except you pass the -i parameter to the Python shell so it won’t close the Terminal window after the script is run.

So, for e.g. a script in /home/user/MyDocs/, do the mymoves.conf editing as above, but add a line like this:

d0###MyPythonScript###/usr/bin/aegis-exec -s -u user -l ‘/usr/bin/meego-terminal -e /usr/bin/python -i /home/user/MyDocs/’

Then just press ‘Stop Observing’ and ‘Start Observing’ in the MyMoves UI, and you’re ready to use the script.

Source Expr3ss yourself


About us

IoT Gadgets is dedicated to bring you all the Internet of Things IoT news that pertains to gadgets. Simple. We love for you to join us on this journey.

Contact us: [email protected]


linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram