From owner-freebsd-questions@FreeBSD.ORG Sat Sep 16 23:17:37 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D71D516A403 for ; Sat, 16 Sep 2006 23:17:37 +0000 (UTC) (envelope-from d1945@sbcglobal.net) Received: from smtp101.sbc.mail.mud.yahoo.com (smtp101.sbc.mail.mud.yahoo.com [68.142.198.200]) by mx1.FreeBSD.org (Postfix) with SMTP id 5316F43D55 for ; Sat, 16 Sep 2006 23:17:37 +0000 (GMT) (envelope-from d1945@sbcglobal.net) Received: (qmail 8314 invoked from network); 16 Sep 2006 23:17:36 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=sbcglobal.net; h=Received:Received:Date:From:To:Subject:Message-ID:Mail-Followup-To:References:Mime-Version:Content-Type:Content-Disposition:In-Reply-To:User-Agent; b=005sw2lHOgmu+c6o4xeCLeB0zsYFq8lwO98NraY6SFMfSWnkvu4X26Rw7RIpM8/P8ovIsBBQDIM+Bf0JfEKuO1mVDqfVE3CD+qnRJP/4TWa83CabOak1QbZzfU7DEDldn4tAYv4i+6nrT46s9UN8c/t86rFGqOZwVYCxiupAdYI= ; Received: from unknown (HELO home) (d1945@sbcglobal.net@69.104.191.121 with login) by smtp101.sbc.mail.mud.yahoo.com with SMTP; 16 Sep 2006 23:17:36 -0000 Received: by home (sSMTP sendmail emulation); Sat, 16 Sep 2006 16:17:35 -0700 Date: Sat, 16 Sep 2006 16:17:35 -0700 From: George Allan To: freebsd-questions@freebsd.org Message-ID: <20060916231735.GA1124@home> Mail-Followup-To: freebsd-questions@freebsd.org References: <89ce7f740609161430w9a525ebq3f88870141683b92@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <89ce7f740609161430w9a525ebq3f88870141683b92@mail.gmail.com> User-Agent: Mutt/1.4.2.1i Subject: Re: Calling setxkbmap when starting X 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: Sat, 16 Sep 2006 23:17:37 -0000 On Sun, Sep 17, 2006 at 12:30:37AM +0300, Ivan Rambius Ivanov wrote: > I am from Bulgaria and I use Bulgarian language on my FreeBSD machine. > I use the following command > > $ setxkbmap -model pc105 -layout "us,bg" -variant ",phonetic" -option > "grp:alt_shift_toggle" > > to enable both Bulgarian and English. However, I call this command > every time I log in KDE. Is it possible to invoke it automatically > when X is started? I think what you're looking for is xinit(1). My own: $ cat ~/.xinitrc #!/bin/sh xmodmap .xmodmaprc xsetroot -solid dimgray xgamma -gamma 0.8 exec /usr/X11R6/bin/gnome-session Note also you can also define keyboard settings in rc.conf: $ grep keymap /etc/rc.conf keymap="us.iso.kbd.custom" My own custom keymap is a quick hack to swap the Caps_Lock key with Escape for non-X uses (something that only vi users would appreciate). Alternatively, KDE, like Gnome, etc. most likely offers a mechanism to execute scripts at startup, but I'd advise against that approach. Hope that helped.