From owner-freebsd-questions@FreeBSD.ORG Wed Jul 2 08:00:20 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 A5AAA106568B for ; Wed, 2 Jul 2008 08:00:20 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from mail.pica.nl (mail.pica.nl [192.87.44.30]) by mx1.freebsd.org (Postfix) with ESMTP id 500568FC15 for ; Wed, 2 Jul 2008 08:00:17 +0000 (UTC) (envelope-from Matthias.Apitz@oclc.org) Received: from rebelion.Sisis.de ([193.31.10.34]) by mail.pica.nl with Microsoft SMTPSVC(6.0.3790.3959); Wed, 2 Jul 2008 10:00:16 +0200 Received: (from guru@localhost) by rebelion.Sisis.de (8.14.2/8.13.8/Submit) id m6280DIh003201; Wed, 2 Jul 2008 10:00:13 +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: Wed, 2 Jul 2008 10:00:13 +0200 From: Matthias Apitz To: ronggui Message-ID: <20080702080013.GA2989@rebelion.Sisis.de> References: <38b9f0350807020011y35080e75ge2d8d083635be72a@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: <38b9f0350807020011y35080e75ge2d8d083635be72a@mail.gmail.com> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.0-RELEASE (i386) X-OriginalArrivalTime: 02 Jul 2008 08:00:16.0240 (UTC) FILETIME=[A9E04700:01C8DC19] Cc: User Questions 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: Wed, 02 Jul 2008 08:00:20 -0000 El día Wednesday, July 02, 2008 a las 03:11:45PM +0800, ronggui escribió: > I would like to execute "xmodmap ~/.xmodmaprc" whenever login or start > the Xorg. I try to put the command to ~/.login_conf or ~/.xinit, but > it doesn't take effects. > > What should I do? Thanks. You could launch it from ~/.xinitrc for example as: xmodmap.sh exec startkde and in xmodmap.sh you must take care that you set the $DISPLAY accordingly, for example as 'setenv DISPLAY :0.0' and make sure that you let first come up the Xorg and the desktop too, before launching the xmodmap commands; if you use KDE as desktop, like I do, it is more simple to just put your script into the ~/.kde/Autostart/ directory; 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