From owner-freebsd-questions@FreeBSD.ORG Fri Jul 15 04:01:52 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ECDA5106564A for ; Fri, 15 Jul 2011 04:01:52 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id B14438FC0A for ; Fri, 15 Jul 2011 04:01:52 +0000 (UTC) Received: from r55.edvax.de (port-92-195-180-180.dynamic.qsc.de [92.195.180.180]) by mx01.qsc.de (Postfix) with ESMTP id 299643CE71; Fri, 15 Jul 2011 06:01:51 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id p6F41oBr004396; Fri, 15 Jul 2011 06:01:50 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Fri, 15 Jul 2011 06:01:50 +0200 From: Polytropon To: Aryeh Friedman Message-Id: <20110715060150.4b245fd6.freebsd@edvax.de> In-Reply-To: References: Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: FreeBSD Mailing List Subject: Re: boting straight into firefox X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jul 2011 04:01:53 -0000 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 -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, ...