> For the complete documentation index, see [llms.txt](https://guru-1.gitbook.io/bq-aquaris-e-4-5-ubuntu-phone/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://guru-1.gitbook.io/bq-aquaris-e-4-5-ubuntu-phone/es/chapter11.md).

# Lanzar apps desde la línea de comandos del usuario phablet(shell)

Hay un comando para arrancar apps, **ubuntu-app-launch** que puedes lanzar de la siguiente forma:

```

$ ubuntu-app-launch mediaplayer-app http://stream.dradio.de/7/251/142684/v1/gnl.akacast.akamaistream.net/dradio_mp3_dlf_s
```

o también para escuchar un mensaje o archivo MP3:

```

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

Yo empleo un pequeño script en **\~phablet/pl.sh** que contiene lo siguiente:

```

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

y para usarlo:

```

$ sh pl.sh VoiceMessage.wav
```

Otro ejemplo es preguntar al diccionario **DRAE**(que necesita las palabras codificadas en ISO 8859-1) a través del navegador con un script **rae**:

```

#!/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"
```

Última actualización: jueves, 19 de noviembre de 2015, 20:44:29 CET
