From owner-freebsd-questions@FreeBSD.ORG Thu Jul 3 05:21:15 2008 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 22BE0106566C for ; Thu, 3 Jul 2008 05:21:15 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: from hunter.Sisis.de (mail.oclc.de [193.31.11.194]) by mx1.freebsd.org (Postfix) with ESMTP id 826EC8FC1C for ; Thu, 3 Jul 2008 05:21:14 +0000 (UTC) (envelope-from matthias.apitz@oclc.org) Received: (from mail@localhost) by hunter.Sisis.de (8.8.8/8.8.8) id HAA20826; Thu, 3 Jul 2008 07:13:17 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) Received: from ppp-88-217-60-12.dynamic.mnet-online.de(88.217.60.12) by hunter.Sisis.de via smap (V2.1) id xma020795; Thu, 3 Jul 08 07:13:07 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m635KuiH003078; Thu, 3 Jul 2008 07:20:56 +0200 (CEST) (envelope-from matthias.apitz@oclc.org) X-Authentication-Warning: rebelion.Sisis.de: guru set sender to matthias.apitz@oclc.org using -f Date: Thu, 3 Jul 2008 07:20:56 +0200 From: Matthias Apitz To: ronggui Message-ID: <20080703052056.GA2774@rebelion.Sisis.de> References: <38b9f0350807020011y35080e75ge2d8d083635be72a@mail.gmail.com> <20080702080013.GA2989@rebelion.Sisis.de> <20080702154730.2dad476e@gom.home> <38b9f0350807021939m4ce0aadfyb7d2bb3e30b871ac@mail.gmail.com> <38b9f0350807022030l6748d6c2g460c2f2d0309304b@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <38b9f0350807022030l6748d6c2g460c2f2d0309304b@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) Cc: freebsd-questions@freebsd.org, prad Subject: Re: Execute the command when login X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Matthias Apitz List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 03 Jul 2008 05:21:15 -0000 El día Thursday, July 03, 2008 a las 11:30:03AM +0800, ronggui escribió: > My solution: > > add the command to ~/xinitrc > ### content of ~/.xinitrc > xmodmap ~/.xmodmaprc > exec fvwm > ### > xmodmap must come before exec fvwm, otherwise it take no effect. Of course it will not work if you put it after 'exec fvwm' because than it will get executed after fvwm dies and perhaps Xorg terminates; as I said in my post you must ensure to have a proper DISPLAY variable in your environment and X must be up in the moment you lauch any X-application; both are missing in your ~/.xinitrc above; try this: make a file xmodmap.sh with #!/bin/sh DISPLAY=:0.0 export DISPLAY sleep 10 xclock put into your ~/.xinitrc the lines: sh ~/xmodmap.sh & exec fvwm (don't miss the '&' sign!) and watch if the xclock comes up after fvwm is up; matthias -- Matthias Apitz Manager Technical Support - OCLC GmbH Gruenwalder Weg 28g - 82041 Oberhaching - Germany t +49-89-61308 351 - f +49-89-61308 399 - m +49-170-4527211 e - w http://www.oclc.org/ http://www.UnixArea.de/ b http://gurucubano.blogspot.com/ «...una sola vez, que es cuanto basta si se trata de verdades definitivas.» «...only once, which is enough if it has todo with definite truth.» José Saramago, Historia del Cerca de Lisboa