[Server-devel] epiphany browser trick to force same URL every time :)
James Cameron
quozl at laptop.org
Thu Nov 19 15:45:50 EST 2015
What you suggest seems a bit complex.
You may find it easier to change the browser settings;
gsettings set org.gnome.Epiphany restore-session-policy never
which never restores the session, or;
gsettings set org.gnome.Epiphany restore-session-policy crashed
which only restores the session if the previous session crashed the
browser; in other words recovering after a browser failure.
The default is "always". For shared computers, not good.
Tested with 13.2.6 on an XO-1.
A pity this feature isn't exposed to the user more clearly. There are
59 other settings. They can be shown with;
gsettings list-recursively org.gnome.Epiphany
Some of them should make the browser faster on an XO-1, but I've not
tested.
On Thu, Nov 19, 2015 at 11:46:37AM -0500, Adam Holt wrote:
> 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:
>
> [1]https://developer.gnome.org/integration-guide/stable/desktop-files.html.en#
> commandline
>
> --
> Unsung Heroes of OLPC, interviewed live @ [2]http://unleashkids.org !
>
> References:
>
> [1] https://developer.gnome.org/integration-guide/stable/desktop-files.html.en#commandline
> [2] http://unleashkids.org/
--
James Cameron
http://quozl.linux.org.au/
More information about the Server-devel
mailing list