From owner-freebsd-questions Wed Jan 5 21: 7:45 2000 Delivered-To: freebsd-questions@freebsd.org Received: from dorifer.heim3.tu-clausthal.de (dorifer.heim3.tu-clausthal.de [139.174.243.252]) by hub.freebsd.org (Postfix) with ESMTP id AD82014E6B for ; Wed, 5 Jan 2000 21:07:42 -0800 (PST) (envelope-from olli@dorifer.heim3.tu-clausthal.de) Received: (from olli@localhost) by dorifer.heim3.tu-clausthal.de (8.9.3/8.9.3) id GAA59854; Thu, 6 Jan 2000 06:07:29 +0100 (CET) (envelope-from olli) Date: Thu, 6 Jan 2000 06:07:29 +0100 (CET) Message-Id: <200001060507.GAA59854@dorifer.heim3.tu-clausthal.de> From: Oliver Fromme To: freebsd-questions@FreeBSD.ORG Subject: Re: window manager question X-Newsgroups: list.freebsd-questions In-Reply-To: <850om7$24jg$1@atlantis.rz.tu-clausthal.de> User-Agent: tin/1.4.1-19991201 ("Polish") (UNIX) (FreeBSD/3.4-19991219-STABLE (i386)) MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jonathon McKitrick wrote in list.freebsd-questions: > On Wed, 5 Jan 2000, Oliver Fromme wrote: >>When you use ``su -m'', the environment variables are not >>modified (see the su(1) manpage), including $USER, $LOGNAME, >>$HOME, $MAIL... I guess this has confused your mail client. > > Here's one problem i have with this: i have several aliases for root only > to mount filesystems and do a few other things. Is there a way to pick > these up when i su to root? There is certainly a way: You have to define the aliases in the right rc file or profile. This depends on your login shell (unfortunately you didn't mention which shell you're using). For example, the zsh uses the following rc/profiles: ~/.zshenv read by EVERY zsh ~/.zprofile read by LOGIN shell only ~/.zshrc read by INTERACTIVE shell only /.zlogin read by LOGIN shell only So if you want to be really sure, put your aliases, functions, variables, whatever into ~/.zshenv, which will be read by every invocation of zsh. However, aliases are only useful for interactive shells, so it is better to put them into ~/.zshrc to avoid unnecessary overhead. Putting them in ~/.zprofile or ~/.zlogin wouldn't work with ``su -m'', because it doesn't run a login shell. All of that can be different with different shells. You should read the section about startup files in the manpage of your shell. Regards Oliver -- Oliver Fromme, Leibnizstr. 18/61, 38678 Clausthal, Germany (Info: finger userinfo:olli@dorifer.heim3.tu-clausthal.de) "In jedem Stück Kohle wartet ein Diamant auf seine Geburt" (Terry Pratchett) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message