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 #!/bin/bash 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 &