From owner-freebsd-questions@FreeBSD.ORG Fri Apr 9 09:07:38 2004 Return-Path: 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 2FE3016A4CE for ; Fri, 9 Apr 2004 09:07:38 -0700 (PDT) Received: from scaup.mail.pas.earthlink.net (scaup.mail.pas.earthlink.net [207.217.120.49]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0D18043D39 for ; Fri, 9 Apr 2004 09:07:38 -0700 (PDT) (envelope-from rpratt1950@earthlink.net) Received: from user116.net311.fl.sprint-hsd.net ([198.70.221.116] helo=kt.weeble.com) by scaup.mail.pas.earthlink.net with smtp (Exim 3.33 #1) id 1BByX8-0005MV-00; Fri, 09 Apr 2004 09:07:11 -0700 Date: Fri, 9 Apr 2004 12:07:14 -0400 From: Randy Pratt To: Radu MOLNAR Message-Id: <20040409120714.2f3ffaf9.rpratt1950@earthlink.net> In-Reply-To: <20040409111209.S332@hawat.cc.ubbcluj.ro> References: <20040409111209.S332@hawat.cc.ubbcluj.ro> X-Mailer: Sylpheed version 0.9.10 (GTK+ 1.2.10; i386-portbld-freebsd4.9) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-questions@freebsd.org Subject: Re: newbie questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Apr 2004 16:07:38 -0000 On Fri, 9 Apr 2004 11:18:34 +0300 (EEST) Radu MOLNAR wrote: > I hope this is the right place to post this.Sorry if it isn't > > Just some stupid newbie questions: > 1) I have an alias made in my .profile alias vi='/usr/local/bin/vim' but > the alias is not made when i log in X. If a log in console or using ssh > from a remote host the alias is made but when i log in x it is not. > Anybody know why? As shell i use bash. Its definitely the right place to ask questions. I can only comment on the first question. Its more of a question of how your shell is being invoked in your window manager. It sounds as if the window manager is invoking the shell as a non-login shell. You can test this by using "xterm -ls" and see if your alias settings are being read. This causes the xterm to act as a login shell and bash will act accordingly. Take a look at man page for bash in the section "INVOCATION" for a complete description of how bash behaves depending on whether or not its a login or non-login shell. There are several different ways to address it. You could simply duplicate your alias settings in a ~/.bashrc file which bash will read when invoked in a non-login shell. I personally don't like having more than one place for any configuration. It would probably be easier to change the way your window manager invokes a shell. I use xterms and blackbox so it was easy to change the menu configuration from "xterm" to "xterm -ls". If you are using a different type of terminal window in XFree86, then look in its documentation for a way to make it behave as a login. If you're using some other terminal type, check its documentation for similar things and change your window manager menus accordingly. HTH, Randy --