Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 29 Jul 2014, 13:03
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
rxvt prompt is 'broken' in 1.0.5 (Solved)
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [4 Posts]  
Author Message
ozboomer


Joined: 04 May 2005
Posts: 93
Location: Melbourne, Australia

PostPosted: 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
View user's profile Send private message 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: 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
View user's profile Send private message 
rarsa


Joined: 29 May 2005
Posts: 3053
Location: Kitchener, Ontario, Canada

PostPosted: Sat 01 Oct 2005, 14:45    Post subject:  

Here is a good tutorial for that http://www.freebsddiary.org/prompt.php
Back to top
View user's profile Send private message Visit poster's website 
ozboomer


Joined: 04 May 2005
Posts: 93
Location: Melbourne, Australia

PostPosted: 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
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [4 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

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
[ Time: 0.0474s ][ Queries: 11 (0.0041s) ][ GZIP on ]