From owner-freebsd-questions@FreeBSD.ORG Sun Aug 8 00:34:00 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 152F61065676 for ; Sun, 8 Aug 2010 00:34:00 +0000 (UTC) (envelope-from olivares14031@gmail.com) Received: from mail-wy0-f182.google.com (mail-wy0-f182.google.com [74.125.82.182]) by mx1.freebsd.org (Postfix) with ESMTP id 99EBA8FC1B for ; Sun, 8 Aug 2010 00:33:59 +0000 (UTC) Received: by wyj26 with SMTP id 26so11207987wyj.13 for ; Sat, 07 Aug 2010 17:33:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=dY/16WDksS+i0lZH4J1ccEQhEyK/lmuypGrKsfP/eBY=; b=AZ2ltcYApTeUNpWnCB05rUmENmnY8d7APNSgFV2rNm+3rGMMOafZac3wdAXit76sRp 45cFqJSHEn2KklsCPf0QEgOK5u4u4M+Lv1U/x5mHiz7A8P1NI1FFFvMlYoG6CQelZMsf T+SD7UqZcKsS5cZ4rMSeVZOAaOWUT9fM2IIOA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=VfHJCyTs6xoo53WPZh8LT2WiCJCp9bQG/BOMnC12L5QBLWY+OdvbGnRr2lj2DwaaHA PeeoZbu8v/1VpQAkr630j1xFwLf3yAwZZogx9kFUYIcHL284RJlhGmHgrn/YuZivaySF Q7p6OseJoTvNP6+roKHJPXce3E2nxsPelCdUU= MIME-Version: 1.0 Received: by 10.216.234.93 with SMTP id r71mr1043571weq.104.1281227638507; Sat, 07 Aug 2010 17:33:58 -0700 (PDT) Received: by 10.216.69.70 with HTTP; Sat, 7 Aug 2010 17:33:58 -0700 (PDT) In-Reply-To: <20100807214737.75ebc397.freebsd@edvax.de> References: <4C566252.6010605@otenet.gr> <4C5CFEE0.5060000@speakeasy.net> <201008071157.00180.eliaschr@cha.forthnet.gr> <20100807214737.75ebc397.freebsd@edvax.de> Date: Sat, 7 Aug 2010 19:33:58 -0500 Message-ID: From: Antonio Olivares To: Polytropon Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Aug 2010 00:34:00 -0000 On Sat, Aug 7, 2010 at 2:47 PM, Polytropon wrote: > Just an addition: My solution works in the same way (modification > of /etc/ttys and /etc/gettytab), but I avoid this step: > > On Sat, 7 Aug 2010 04:49:00 -0500, Antonio Olivares wrote: >> Then created file /etc/rc.local >> with >> su - user_to_be_logged_in -c startx > > In fact, I use the autologin-user's ~/.login script (which is > executed after login) to contain a line to check for X's lock > file and then run startx. This gives the possibility to the > specific user to NOT have to need root permissions to change > the behaviour after autologin. The simple line in ~/.login is > this one: > > =A0 =A0 =A0 =A0[ -f /tmp/.X0-lock ] && startx > > Depending on requirements, this can be seen as an advantage > or disadvantage (usually in considerations about security); > it's also possible to create a "loop" that an accidental > logout won't drop the user to "DOS". :-) > > > > > -- 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? I will try it out and thank you for the suggestion. I was going to try the autologin.c file and compile it, a similar solution is done for slackware. Regards, Antonio