Archive for the ‘benjamin’ Category

Uptime - Take 2

Saturday, September 22nd, 2007

Turns out I had a computer on for even longer which I had forgotten about! benjamin, one of my Linksys WRT54-g’s. He doesn’t really do much apart from provide WiFi access for my PDA and networking for my room (two 100Mbps feeds are not enough). He will be moving back to Exeter with me later today, so beast will overtake him in terms of my record recorded uptime.

root@benjamin:~# uptime
 00:43:01 up 102 days, 43 min, load average: 0.00, 0.00, 0.00

Ash and PROMPT_COMMAND

Friday, February 16th, 2007

The ash shell doesn’t appear to support setting the PROMPT_COMMAND variable which sets the window title in xterm and companions. I found a workaround to this, by including it in the PS1 variable.

I put this in my /etc/profile:

export PS1='\[\e]0;\h:\w\a\]\[\e[0;32m\]\h\[\e[0m\]:\w\$'

The \[\e]0;\h:\w\a\] is for the windows title. Essentially, \h hostname and \w current directory are bound by esc (\e) zero and bell (\a).

The second part \[\e[0;32m\]\h\[\e[0m\]:\w\$ is for the prompt, which is the same as above but the prompt is colored green.

supernaut at OpenWRT Forums
<http://forum.openwrt.org/viewtopic.php?pid=18521>

It worked perfectly :)


Content Copyright © 2005-2008 Chris Smith. All Rights Reserved.