# 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 http://stream.dradio.de/7/251/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dlf_s
```

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/pl.sh:

```
$ cat pl.sh
ubuntu-app-launch mediaplayer-app $1
```

and use just something like

```
$ sh pl.sh VoiceMessage.wav
```

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

```
#!/bin/sh

# the server lema.rae.es 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 "http://lema.rae.es/drae/srv/search?val=$iso"
ubuntu-app-launch webbrowser-app "http://lema.rae.es/drae/?val=$iso"
```

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


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://guru-1.gitbook.io/bq-aquaris-e-4-5-ubuntu-phone/en/chapter11.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
