From owner-freebsd-questions@FreeBSD.ORG Tue Aug 26 00:35:38 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A1A61065671 for ; Tue, 26 Aug 2008 00:35:38 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx02.qsc.de (mx02.qsc.de [213.148.130.14]) by mx1.freebsd.org (Postfix) with ESMTP id E12598FC1B for ; Tue, 26 Aug 2008 00:35:37 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-195-82-108.dynamic.qsc.de [92.195.82.108]) by mx02.qsc.de (Postfix) with ESMTP id 0C07019B4E27; Tue, 26 Aug 2008 02:35:37 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id m7Q0ZaFF001791; Tue, 26 Aug 2008 02:35:36 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Tue, 26 Aug 2008 02:35:36 +0200 From: Polytropon To: Robe Message-Id: <20080826023536.704ff619.freebsd@edvax.de> In-Reply-To: <221c791e0808250832j3fb88887m6d7155052f45c5ff@mail.gmail.com> References: <221c791e0808250832j3fb88887m6d7155052f45c5ff@mail.gmail.com> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: Help changing the prompt X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Aug 2008 00:35:38 -0000 On Mon, 25 Aug 2008 10:32:22 -0500, Robe wrote: > Hi there, > > I'm trying to change the prompt in the *text (console) mode* for a > restricted user with a statement like this > > set prompt = "%~> " > > But it doesn't work. And when I type *set* I see _ = "%~> " instead prompt = > "%~> " > > However when I do it logged as a root it works. > Can someone help me with this? Maybe the user where you want to change the prompt has an overriding setting in ~/.cshrc? You are using the C Shell, right? Check the prompt and promptchars variables. I have this form system wide in /etc/csh.cshrc: set promptchars = "%#" set prompt = "%n@%m:%~%# " set autolist If a user wants another prompt, the respective setting has to be set in his ~/.cshrc. This gives you prompts like root@wtz34:/usr/src/# _ or bob@click:~/my_videos% _ You would then correctly use the form "%~> " for a prompt like: ~/foo/bar> _ -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...