Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Feb 2002 00:44:16 +0000
From:      Scott Mitchell <scott.mitchell@mail.com>
To:        =?iso-8859-1?Q?Rickard_Borgm=E4ster?= <doktorn@realworld.nu>
Cc:        Dan Nelson <dnelson@allantgroup.com>, freebsd-questions@FreeBSD.ORG
Subject:   Re: System-wide environment variables
Message-ID:  <20020228004416.B48231@localhost>
In-Reply-To: <20020227233106.35b14982.doktorn@realworld.nu>; from doktorn@realworld.nu on Wed, Feb 27, 2002 at 11:31:06PM %2B0100
References:  <20020226030324.4a94cc33.doktorn@realworld.nu> <1014689577.677.0.camel@blackbox.pacbell.net> <20020226025447.GA21944@dan.emsphone.com> <20020227233106.35b14982.doktorn@realworld.nu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Feb 27, 2002 at 11:31:06PM +0100, Rickard Borgmäster wrote:
> On Mon, 25 Feb 2002 20:54:47 -0600
> Dan Nelson <dnelson@allantgroup.com> hit the keyboard and punched:
> 
> > In the last episode (Feb 25), Mike Makonnen said:
> > > On Mon, 2002-02-25 at 18:03, Rickard Borgmäster wrote:
> > >  
> > > > Where should i put this? Into rc.conf.local or something maybe?
> > > 
> > > .login
> > 
> > That only works if you use /bin/sh as your shell.  You can set global
> > env variables in /etc/login.conf, with the 'setenv' cap.
> 
> I don't get it.
> 
> The command now in .bashrc:
> export PS1=$'[ \\u@\\h:\\w ] \\$ '
> 
> How do I put this into /etc/login.conf, "with the 'setenv' cap"?
> I want this to apply all users, no matter wether they login to
> shell or by gdm.
> 

	:setenv=PS1=$'[ \\u@\\h:\\w ] \\$ ':\

There's already a setenv property in the default /etc/login.conf, so you
can just add the PS1=... part to that.  I'm not entirely sure how well
login.conf handles quotes and other shell metacharacters, so you may need
some more blackslashes in there to get that to parse correctly.

	Scott

-- 
===========================================================================
Scott Mitchell          | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England      | 0x54B171B9 |  don't get sucked into jet engines"
scott.mitchell@mail.com | 0xAA775B8B |      -- Anon

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020228004416.B48231>