Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Using Epiphany in GNOME 3.2 I've saved Google Docs as a web application. I have a script set-up that will either switch to an app (using wmctrl) or launch it if it's not open - I then xbindkeys to launch that script for different applications, pointing it at a different .desktop file for different apps.

This all works well except for my Google Docs app. When launched from Activities, or from the CLI using the Exec line from the .desktop file all is well, but when launched via my script Epiphany doesn't use Web Application Mode, which means I get all the browser chrome.

The script is simple - it just uses grep and sed to extract the Exec line from the .desktop file and execute it. Using echo I can see that it's doing that correctly and, in fact, if I run what it echos myself from the CLI then Epiphany does use Web Application Mode.

Does anyone have an idea what the missing piece of this puzzle is? Here's the script:

$ cat ~/bin/desktop-open 
    NAME=`grep '^Name=' $1 | head -n1 | sed 's/^Name=//' | sed 's/%.//'`
    EXEC=`grep '^Exec=' $1 | head -n1 | sed 's/^Exec=//' | sed 's/%.//'`
    wmctrl -xa $NAME || $EXEC &
share|improve this question

closed as too localized by Luis Alvarado Mar 14 '13 at 16:09

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.

Browse other questions tagged or ask your own question.