Home Running Scripts on your Nokia N9/N950 with MyMoves

Running Scripts on your Nokia N9/N950 with MyMoves

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/myscript.sh. 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/myscript.sh’
3. Make sure to edit myscript.sh 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/myscript.py, 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/myscript.py’

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

About ReadWrite’s Editorial Process

The ReadWrite Editorial policy involves closely monitoring the tech industry for major developments, new product launches, AI breakthroughs, video game releases and other newsworthy events. Editors assign relevant stories to staff writers or freelance contributors with expertise in each particular topic area. Before publication, articles go through a rigorous round of editing for accuracy, clarity, and to ensure adherence to ReadWrite's style guidelines.

Get the biggest tech headlines of the day delivered to your inbox

    By signing up, you agree to our Terms and Privacy Policy. Unsubscribe anytime.

    Tech News

    Explore the latest in tech with our Tech News. We cut through the noise for concise, relevant updates, keeping you informed about the rapidly evolving tech landscape with curated content that separates signal from noise.

    In-Depth Tech Stories

    Explore tech impact in In-Depth Stories. Narrative data journalism offers comprehensive analyses, revealing stories behind data. Understand industry trends for a deeper perspective on tech's intricate relationships with society.

    Expert Reviews

    Empower decisions with Expert Reviews, merging industry expertise and insightful analysis. Delve into tech intricacies, get the best deals, and stay ahead with our trustworthy guide to navigating the ever-changing tech market.