From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?5a6L5paH5q2m?= Subject: Re: [PATCH 1/2] services: slim: Allow non-absolute path to be used as session command. Date: Fri, 13 Mar 2015 22:59:49 +0800 Message-ID: <87mw3h6ize.fsf@gmail.com> References: <1425993803-446-1-git-send-email-iyzsong@gmail.com> <87zj7i2cs7.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35344) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YWR3w-0004sk-IW for guix-devel@gnu.org; Fri, 13 Mar 2015 10:59:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YWR3s-0007hU-K7 for guix-devel@gnu.org; Fri, 13 Mar 2015 10:59:44 -0400 In-Reply-To: <87zj7i2cs7.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Court=C3=A8s writes: > =E5=AE=8B=E6=96=87=E6=AD=A6 skribis: > >> * gnu/services/xorg.scm (xinitrc)[builder]: Don't check the existence >> of COMMAND. Only run ~/.xsession when it exists. > > [...] > >> + (let* ((home (getenv "HOME")) >> + (xsession-file (string-append home "/.xsession")) >> + (session (match (command-line) >> + ((_ x) x) >> + (_ #$fallback-session)))) > > Could you align the right-hand sides of the =E2=80=98let*=E2=80=99? > >> + (if (file-exists? xsession-file) >> + ;; Run ~/.xsession when it exists. >> + (exec-from-login-shell xsession-file) > > This will fail if ~/.xsession is not executable. It could use > =E2=80=98executable-file?=E2=80=99 from (guix build utils), but OTOH it m= ay be better to > just fail in this case since it=E2=80=99s most likely a user error. I'm OK to fail here. Pushed, thanks for review! > > Thoughts? > > Thanks, > Ludo=E2=80=99.