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

Adam Holt holt at laptop.org
Thu Nov 19 17:03:54 EST 2015


Thanks James!

George,

In conclusion on all similar machines we prepare, let's...

1) Run:

   gsettings set org.gnome.Epiphany restore-session-policy never

2) Within /usr/share/applications/epiphany.desktop set it to:

   Exec=epiphany file:///library/index.html %U

I followed James & Jerry's "list-recursively" suggestion but could not find
another clean way to force the home/launch/start/portal page.

We'll never know what %U does but that's fine :}

3) Manually save "Internet in a Box" (URL = file:///library/index.html or
whatever appropriate for that machine!) to epiphany's Bookmarks.
Epiphany's "Not Categorized" section is just fine, in fact perfect since
epiphany since then raises the profile of this 1 bookmark, above the 20
preloaded-with-epiphany cluttered bookmarks most end users won't care about.

4) Add the following line to /bin/xs-sysprep :

   rm -f /root/.bash_history /home/olpc/.bash_history

(But do not add the following line to /bin/xs-betaprep !)


On Thu, Nov 19, 2015 at 4:25 PM, Jerry Vonau <me at jvonau.ca> wrote:

> Thanks James for the insight, I forgot all about gsetting.
>
> Adam, there might be a knob reveled by 'list-recursively' that you could
> turn to set the homepage.
>
> Jerry
>
>
>
> > On November 19, 2015 at 2:45 PM James Cameron <quozl at laptop.org> wrote:
> >
> >
> > 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/
>
> --
> 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/db774f76/attachment.html>


More information about the Server-devel mailing list