The time now is Wed 22 May 2013, 09:23
All times are UTC - 4 |
| Author |
Message |
ozboomer

Joined: 04 May 2005 Posts: 83 Location: Melbourne, Australia
|
Posted: Sat 01 Oct 2005, 09:53 Post subject:
rxvt prompt is 'broken' in 1.0.5 (Solved) |
|
Since I've upgraded to 1.0.5, I've found the prompt in my rxvt sessions is not as I expect it to look.
I include the node name in the PS1 variable in /root/.rxvtrc (and export it there) and I have an entry in /etc/profile:
| Code: | | export ENV=/root/.rxvtrc |
..which worked from v0.9.7 or so up until 1.0.5. When I open an rxvt session under X, I only get the normal '#' prompt, whereas if I exit X and get to a 'console' prompt, the prompt is as I expect it to appear.
What seems to be happening is that under X, I seem to be running bash rather than (Busybox's) sh. If I type 'blah' at a prompt in an rxvt session under X, a message is displayed: 'bash: blah: command not found' Whereas if I try that at the 'console' prompt, I see the message: 'blah: no such file or directory'.
In the rxvt session under X, if I try typing: /bin/sh /usr/local/bin/rxvt I get the message: '/usr/local/bin/rxvt: 1: Syntax error: "(" unexpected'.
Is there some way that I can get my prompt working again under X?
|
|
Back to top
|
|
 |
GuestToo
Puppy Master
Joined: 04 May 2005 Posts: 4078
|
Posted: Sat 01 Oct 2005, 14:34 Post subject:
|
|
1.0.5 has SHELL="/bin/bash" in /etc/profile
you can change that to SHELL=/bin/sh or SHELL=/bin/ash
ash is busybox's shell
sh is bash running under the name sh
bash is bash running under the name bash
ash and sh will execute the file named in ENV everytime they start ... you can setup environment variables there, and aliases, and set the prompt
bash does not use ENV ... it executes /root/.bashrc ... you can setup the environment for bash in there, including the prompt
ash and sh use /etc/profile if they are started as a login shell ... bash uses /root/.bash_profile (or maybe it's .bash-profile) if it's started as a login shell
also, bash and ash have a slightly different syntax for setting the prompt
you can see what's happening if you put echo commands in the rc files, something like echo '/root/.bashrc is executing'
you can change SHELL=/bin/bash in /etc/profile to SHELL=/bin/sh or to SHELL=/bin/ash ... or you can setup ENV and .bashrc files to work the way you want
|
|
Back to top
|
|
 |
rarsa

Joined: 29 May 2005 Posts: 3053 Location: Kitchener, Ontario, Canada
|
Posted: Sat 01 Oct 2005, 14:45 Post subject:
|
|
Here is a good tutorial for that http://www.freebsddiary.org/prompt.php
|
|
Back to top
|
|
 |
ozboomer

Joined: 04 May 2005 Posts: 83 Location: Melbourne, Australia
|
Posted: Sun 02 Oct 2005, 00:11 Post subject:
|
|
Many thanks for the pointers... I've made some notes and have made some suitable changes to /etc/profile and ~/.bashrc
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|