maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N900 (https://talk.maemo.org/forumdisplay.php?f=44)
-   -   change regular user to bash shell? (https://talk.maemo.org/showthread.php?t=64488)

jd4200 2010-10-27 19:53

Re: change regular user to bash shell?
 
I've also had this problem since the beginning, bit of a pain to have to keep executing bash from busybox.
I also find that past commands aren't always written to bash_history.

Quote:

Originally Posted by juise- (Post 854105)
My favorite is Ctrl+r for 'reverse-i-search', where you can type in any part of a previous command, and the shell will look it up for you.

That alone is enough reason to install bash (to me at least). The keyboard on N900 isn't bad, but it's not great for shell bashing. Being able to easily find that difficult-to-type line is nice.

Auto-completion on remote paths is also fun, it works if you are using public keys with ssh.

If you like the reverse-search, you might like this for your bashrc:

Code:

# Searches .bash_history with up and down key
bind '"\e[A"':history-search-backward
bind '"\e[B"':history-search-forward

Type a letter or two of a command, hit up and it goes through all the ones that match.

naturegodtm 2010-10-27 19:53

Re: change regular user to bash shell?
 
isnt there any costum shell that enables bash? i have found my self too trying things that in a normal linuix system would work , but i got bizzar behavior on the output

jkq 2010-10-27 19:57

Re: change regular user to bash shell?
 
Quote:

Originally Posted by jedi (Post 853949)
I just edited /etc/passwd and changed /bin/sh to /bin/bash for root and user.

This worked for me, but I only changed the user entry. You may also want to try rebooting afterwards, but note that if you mess up /etc/passwd you may end up needing to reflash!

I don't recall if I had to do anything else, as it was quite a while ago.

-jkq

jd4200 2010-10-27 20:14

Re: change regular user to bash shell?
 
It also doesn't source the bashrc file with normal user, when switching to root it does.

I added "source .bashrc" (no quotes) at the bottom of /etc/profile (before unset -i) and this seems to work fine.

kopele 2010-10-27 20:27

Re: change regular user to bash shell?
 
Quote:

Originally Posted by extendedping (Post 853780)
I just installed bash and see it has an option to run bash-setup to boot to bash as opposed to busybox.

I did this as root and hit no where it asked to overwrite my ??? .bashrc and everything works, I boot into bash as root.

I tried as regular "user" but it did not take (took to to busy box).

so I went in as root, did su - to user and ran bash-setup.

it asks 2 questions just like it did at root. I hit yes to change to bash and no to overwriting the .config file (? .bashrc).

well it did not change me to bash and all it did was mess up my prompt.

can you smart people help me? ideally I'd like bash for the user account but if I can't have that I just want my old prompt back...

I ran into this a while back, if I remember correctly there is a problem with changing the login shell as a user. Try this to switch to bash:
Code:

root (or sudo gainroot)
chsh -s /bin/bash user

HTH

extendedping 2010-10-29 23:13

Re: change regular user to bash shell?
 
Quote:

Originally Posted by kopele (Post 854173)
I ran into this a while back, if I remember correctly there is a problem with changing the login shell as a user. Try this to switch to bash:
Code:

root (or sudo gainroot)
chsh -s /bin/bash user

HTH

thanks but that just messes up the user prompt.

dchky 2010-10-29 23:50

Re: change regular user to bash shell?
 
Quote:

Originally Posted by extendedping (Post 857145)
thanks but that just messes up the user prompt.

bash-setup now works as you would expect in PR1.3 - if you don't like the prompt you can change it in your .bashrc file.

extendedping 2010-10-30 00:37

Re: change regular user to bash shell?
 
Quote:

Originally Posted by dchky (Post 857170)
bash-setup now works as you would expect in PR1.3 - if you don't like the prompt you can change it in your .bashrc file.

tried for user:

bash-setup

chsh -s /bin/bash user

changing /etc/passwd user shell to /bin/bash

none of the above changed the user shell to bash.

extendedping 2010-10-31 14:33

Re: change regular user to bash shell?
 
So has anyone actually got bash as their default user shell?

I'm ready to give up on it

dchky 2010-10-31 14:57

Re: change regular user to bash shell?
 
Quote:

Originally Posted by extendedping (Post 858537)
So has anyone actually got bash as their default user shell?

I'm ready to give up on it

Yes. A fresh install of PR1.3, install bash followed by bash-setup, it worked perfectly as a regular user and as root.

If it doesn't work edit /etc/passwd and set the shall as /bin/bash there.


All times are GMT. The time now is 06:40.

vBulletin® Version 3.8.8