Date: Wed, 27 Feb 2002 21:04:18 -0600 From: "Mike Meyer" <mwm-dated-1015297459.2c9163@mired.org> To: Rickard "Borgmäster" <doktorn@realworld.nu> Cc: questions@freebsd.org Subject: Re: System-wide environment variables Message-ID: <15485.40498.537327.335024@guru.mired.org> In-Reply-To: <21801178@toto.iv>
next in thread | previous in thread | raw e-mail | index | archive | help
Rickard Borgm=E4ster <doktorn@realworld.nu> types: > 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=E4ster 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 glob= al > > env variables in /etc/login.conf, with the 'setenv' cap. > I don't get it. > The command now in .bashrc: > export PS1=3D$'[ \\u@\\h:\\w ] \\$ ' That *can't* be right. You don't really want to set the value of PS1 to what is currently in a variable name that's probably illegal, do you? I'm going to assume the "=3D$'" should be "'$=3D". > 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. Well, first, it's not going to do anything for *csh users, because their prompt string is in the environment variable prompt, not PS1. Second, you can't stop them from changing it after they log in, or via ~/.login.conf themselves. Finally, the gods alone know if I've got the quoting right, but you could try: =09setenv=3DPS1=3D$[ \\u@\\h\c\\w ] \\$ , I haven no idea if gdm works in such a way as to use login.conf, but it would be a *bad* thing if it didn't, as several critical limits on users are set in that file. =09<mike -- Mike Meyer <mwm@mired.org>=09=09=09http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more inform= ation. 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?15485.40498.537327.335024>