From owner-freebsd-questions@FreeBSD.ORG Sun Aug 8 10:08:39 2010 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 1C0221065675 for ; Sun, 8 Aug 2010 10:08:39 +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 CD7AD8FC14 for ; Sun, 8 Aug 2010 10:08:38 +0000 (UTC) Received: from r55.edvax.de (port-92-195-116-86.dynamic.qsc.de [92.195.116.86]) by mx01.qsc.de (Postfix) with ESMTP id 1F17E3D671; Sun, 8 Aug 2010 12:08:16 +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 o78A8GeY001502; Sun, 8 Aug 2010 12:08:16 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Sun, 8 Aug 2010 12:08:16 +0200 From: Polytropon To: Antonio Olivares Message-Id: <20100808120816.b6b1f54a.freebsd@edvax.de> In-Reply-To: References: <4C566252.6010605@otenet.gr> <4C5CFEE0.5060000@speakeasy.net> <201008071157.00180.eliaschr@cha.forthnet.gr> <20100807214737.75ebc397.freebsd@edvax.de> 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-questions@freebsd.org Subject: Re: ANNOUNCE: Custom 64bit FreeBSD 8.1-RELEASE with XFCE packages released 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: Sun, 08 Aug 2010 10:08:39 -0000 On Sat, 7 Aug 2010 19:33:58 -0500, Antonio Olivares wrote: > Polytropon, > > So if I delete the file /etc/rc.local and make a file ~/.login, make > it executable (chmod +x ~/.login), and add the line > > > [ -f /tmp/.X0-lock ] && startx > in that file and I will have the same result but without loggin in as > root? Correct. The user specified by the autologin directive will be the user who runs the "startx" command, so no need for using "su". Here's an example from a working FreeBSD 5 system: /etc/ttys: ttyv0 "/usr/libexec/getty autologin" cons25l1 on secure Intead of "Pc", the profile to be used is named "autologin". /etc/gettytab: autologin:\ :al=praxis:tc=Pc: The name "praxis" is the user's account name for the user to be logged in automatically. All capabilities defined in "Pc" will also be incorporated. /home/praxis/.login: mesg y [ ! -f /tmp/.X0-lock ] && startx This makes sure the same username can be used for an SSH login (and it WON'T try to start another X then), or it can be used to log in via text mode console. When X is shut down, the user will be dropped to the text mode CLI. If you don't want to do that, add "logout" as the next line in ~/.login, or enclose the whole "startx" line in a loop. But this can lead to problems when X is not working properly. -- Polytropon Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...