Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Jul 2011 06:01:50 +0200
From:      Polytropon <freebsd@edvax.de>
To:        Aryeh Friedman <aryeh.friedman@gmail.com>
Cc:        FreeBSD Mailing List <freebsd-questions@freebsd.org>
Subject:   Re: boting straight into firefox
Message-ID:  <20110715060150.4b245fd6.freebsd@edvax.de>
In-Reply-To: <CAGBxaXnbenRFSP5yNVuQSi71NCE7-fkShQGp=A9s_OFeRRAm=Q@mail.gmail.com>
References:  <CAGBxaXnbenRFSP5yNVuQSi71NCE7-fkShQGp=A9s_OFeRRAm=Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 14 Jul 2011 23:00:31 -0400, Aryeh Friedman wrote:
> I am setting a read only kiosk (it displays various web pages
> progmatically and has *NO OTHER* function) and security is not a
> concern because the hardware is locked away and need to find the most
> hands free way method of going from power on to full screen
> www/firefox.... is it sufficent to have a su to a non-root user and
> then run startx in /etc/rc(.local) [I have a custom /etc/rc so I do
> not need rc.local)

Automated login for that user, then ~/xinitrc with no window
manager, but exec as firefox (parameterized into fullscreen),
and in case the the program crashes (and therefore quits X),
re-execution of the whole process could be a way to do that.

You don't need to start X in rc.local as this can be done
by the "display" user (allow me to call it that way).

For example, you put the following into /etc/ttys:

	ttyv0  "/usr/libexec/getty autodisplay"  cons25  on  secure

The name "autodisplay" will now be used for the "TTY profile"
will be used to allow auto-login for a specific user.

Then you add the following to /etc/gettytab:

	autodisplay:\
	        :al=ffdisplay:tc=Pc:

Put it after the "default" section. In this example "ffdisplay"
(Firefox display user) is the name of the user that should be
performing the functionality you want.

Add the user "ffdisplay", and add to his ~/.login:

	[ ! -f /tmp/.X0-lock ] && startx

This will perform the "startx" command, which reads its
initialization from ~/.xinitrc:

	exec firefox --geometry <as needed> -other -switches

Maybe you can check "firefox -help" for parameters that
can help here.

To put the "error loop" into this construct - which would
in case of a Firefox crash return to the command line! -,
you can easily construct a loop in the .login file around
the "extended" startx command.



-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110715060150.4b245fd6.freebsd>