Date: Fri, 9 Apr 2004 12:07:14 -0400 From: Randy Pratt <rpratt1950@earthlink.net> To: Radu MOLNAR <taipan@hawat.cc.ubbcluj.ro> Cc: freebsd-questions@freebsd.org Subject: Re: newbie questions Message-ID: <20040409120714.2f3ffaf9.rpratt1950@earthlink.net> In-Reply-To: <20040409111209.S332@hawat.cc.ubbcluj.ro> References: <20040409111209.S332@hawat.cc.ubbcluj.ro>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 9 Apr 2004 11:18:34 +0300 (EEST) Radu MOLNAR <taipan@hawat.cc.ubbcluj.ro> 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 --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040409120714.2f3ffaf9.rpratt1950>