The Following 2 Users Say Thank You to xaccrocheur For This Useful Post: | ||
|
2011-08-16
, 18:41
|
Posts: 298 |
Thanked: 197 times |
Joined on Dec 2009
@ Norway
|
#2
|
|
2011-08-16
, 18:50
|
Posts: 2,225 |
Thanked: 3,822 times |
Joined on Jun 2010
@ Florida
|
#3
|
|
2011-08-16
, 20:44
|
Posts: 147 |
Thanked: 7 times |
Joined on Aug 2010
|
#4
|
|
2011-08-17
, 15:11
|
|
Posts: 73 |
Thanked: 24 times |
Joined on Jan 2010
@ Paris
|
#5
|
Keep in mind busybox-power can provide ls colors too, so it'd be great if you adapted your dependencies accordingly.
(...) I'm running bash 2.05b at the moment... :P (I know, but it's the only I found to show username and hostname...)(...)
PS1="\u@\h \W> "
You can copy it to all your users/root home folders (and to /etc/skel for all future ones) and it will automatically display "root" in the color you define. Bad root.
Features
Installation
as root :
- apt-get install bash wget
- cd
- wget -N "http://talk.maemo.org/attachment.php?attachmentid=22166" -O .bashrc
- cp .bashrc /home/user/
- bash
Optional :apt-get install coreutils-gnu (if you want colored ls)
Optionally, you may want to edit /etc/passwd to change "/bin/sh" to /bin/bash" where applicable.
Any enhancements requests and bug-reports welcome.
Notes
The xterm system on Maemo is tricky. X Terminal launches xterm who launches busybox who then launchs ash (o_O) Look at how I implemented it (both from desktop and ssh) and feel free to suggest a better way : Right now it handles ssh nicely, but strangely, when used in hildon X-Terminal I have to manually enter "bash" each time... Any thought?
(The attachment has a low viewcount because I upload new tweaks, and it keeps resetting..?)
Changelog
Removed bc dependency
Better handling of old (<3) BASHes
Thank you for your encouragements
Last edited by xaccrocheur; 2011-08-17 at 16:04.