How to lauch apps from the phablet's cmd line

There is a common app-launcher 'ubuntu-app-launch' and you may run:

$ ubuntu-app-launch mediaplayer-app

or to play files in the phone:

$ ubuntu-app-launch mediaplayer-app file:///home/phablet/Music/VoiceMessage.wav
$ ubuntu-app-launch mediaplayer-app file:///home/phablet/Music/mutti.mp3

I have a small script in ~phablet/

$ cat
ubuntu-app-launch mediaplayer-app $1

and use just something like

$ sh VoiceMessage.wav

Here is another example how to feed the Spanish Dictionara DRAE from the shell, the script '' sends the word is ISO coded to the server using the browser:

# the server only understands ISO 8859-1 coded words
# but we have to send them via the 'ubuntu-app-launch' either in ASCII or in UTF-8,
# so we rewrite the spanish tilded chars in ISO coding, but as %xx values
iso=`echo $1 | sed 's/ñ/%f1/g' |\
sed 's/á/%e1/g' |\
sed 's/é/%e9/g' |\
sed 's/í/%ed/g' |\
sed 's/ó/%f3/g' |\
sed 's/ú/%fa/g' |\
sed 's/ü/%fc/g'`
# ubuntu-app-launch webbrowser-app "$iso"
ubuntu-app-launch webbrowser-app "$iso"

Last updated: Sat Oct 17 15:35:27 CEST 2015