[Server-devel] epiphany browser trick to force same URL every time :)

Adam Holt holt at laptop.org
Thu Nov 19 11:46:37 EST 2015


I know in theory one doesn't run browsers on servers, but yeah this hack
below works to circumvent epiphany browser's default behavior of retaining
last URL.  Also it avoids stuffing too many tabs into the face of the next
session, since "epiphany <my-favorite-start-url>" accumulates too many tabs
in a very inflationary way:

1. Create /bin/xs-epiphany containing:

#!/bin/bash
rm /home/olpc/.config/epiphany/session_state.xml
epiphany file:///library/index.html

2. Edit /usr/share/applications/epiphany.desktop so that this line...

Exec=epiphany %U

Becomes...

Exec=xs-epiphany %U

Works!  Since epiphany.desktop does not seem to run 2 commands in sequence,
a la:

Exec=rm /home/olpc/.config/epiphany/session_state.xml; epiphany
file:///library/index.html

PS sadly I have no clue what %U actually does (since Gnome's pull-down
Applications menu is for clicking, not specifying paramters ;) but ah well
it works!  FYI the %U %u %F %f parameters are defined here if someone knows
far more than I:

https://developer.gnome.org/integration-guide/stable/desktop-files.html.en#commandline

--
Unsung Heroes of OLPC, interviewed live @ http://unleashkids.org !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.laptop.org/pipermail/server-devel/attachments/20151119/7463e854/attachment.html>


More information about the Server-devel mailing list