maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   .zshrc for N900 (updated, now works for me[tm]) (https://talk.maemo.org/showthread.php?t=68685)

avx 2011-01-23 17:50

Re: .zshrc for N900
 
Ok, I think I've got some kind of little breakthrough.

I did 'chsh -s /bin/zsh' for both user & root, run 'sed -i "s@/bin/sh@/bin/zsh@"' on everything in /etc/X11/* and put your command in .zshenv of both user & root. Rebooted and it booted straight up, and 'echo $SHELL' reports zsh for both users.

The one thing I left out right now, is the chmod&chown-part described above, to properly use compinit.

So I'll create a backup now and see if maybe the chown/chmod is causing the havoc.

Edit, holy hell, it still works.

Edit2, I also added 'PATH=/sbin:/bin/:...' to the .zshrc of root, since that didn't get set correctly and somehow only had /usr/{sbin} in it, so that could have been the problem, too.

Edit3, for now I'm happy, I'll do a backup, grab something to eat, do a full reflash and if it works again, rewrite the guide. Thanks for the hints so far :)

Edit4, if someone with more knowledge of Debian internals knows how to make a .deb out of this, a simple guide or a working .deb itself would be nice. Thanks.

Snark1994 2011-01-23 20:43

Re: .zshrc for N900
 
Guys, thankyou so much for this. I panicked when I killed my phone doing this, eventually reflashed. I then had a look on the 'net for "n900 zsh" and found this, and followed it successfully :) and only then noticed it was dated today! I registered to say thanks, and I'm happy to try to create a .deb if people want :)

avx 2011-01-23 21:10

Re: .zshrc for N900
 
Welcome to the forums, Snark1994 :)

I'm currently writing a zsh-setup script, which automates the steps I've taken, so that'll get a little easier. Of course, a .deb would be really appreciated, so it could go easier to -testing/devel if it works.

BernardB 2011-01-23 21:19

Re: .zshrc for N900
 
Quote:

Originally Posted by avx (Post 926840)
run 'sed -i "s@/bin/sh@/bin/zsh@"' on everything in /etc/X11/*

Curious - why is that needed? That bit's just a bit scary as it's not particularly upgrade-proof.

Awesome that it worked though.

I also wouldn't recommend changing it for root. A lot of scripts (e.g. package install scripts) expect the default shell to be bash or ash. For root you could use the .profile exec /bin/zsh trick.

avx 2011-01-23 21:55

Re: .zshrc for N900
 
Dunno why/if it's needed to run the sed-stuff, I just happened to try it and it worked and I didn't yet try it without it.

As for root, I consider your argument as valid, but imho the packages are broken, if they rely on bashisms or other non-standard stuff.

Anyway, I finished the setup-script, will reflash the phone and try it now, wish me luck :p

Edit, #commented out the change for root and left a note.

BernardB 2011-01-23 21:57

Re: .zshrc for N900
 
Quote:

Originally Posted by avx (Post 926973)
As for root, I consider your argument as valid, but imho the packages are broken, if they rely on bashisms or other non-standard stuff.

Well actually the problem is that zsh is incompatible with sh/bash by default. If zsh is invoked as sh/bash, then it goes into sh/bash-compatibility mode, but by changing the #! line, you're telling zsh that it doesn't need to.

Anyway, good luck!

avx 2011-01-23 22:22

Re: .zshrc for N900
 
So, got it working, tried two times incl. complete vanilla+rootfs flashing, both times success. I'll go and update the first post.

BernardB 2011-01-23 22:34

Re: .zshrc for N900
 
Awesome. Cheers!

Snark1994 2011-01-24 22:20

Re: .zshrc for N900 (updated, now works for me[tm])
 
If you've already got a .sh script, then this seems to describe a variety of methods + packages for making it into a .deb :)

avx 2011-01-25 17:54

Re: .zshrc for N900 (updated, now works for me[tm])
 
Quote:

Originally Posted by Snark1994 (Post 927710)
If you've already got a .sh script, then this seems to describe a variety of methods + packages for making it into a .deb :)

Thanks, will have a look at it. Might take some time, though, since I'm currently working on backup-solution better fitting my needs(multi-{parallel}-hosts, encryption, easy replay of single files, ...).

cheers,
avx


All times are GMT. The time now is 21:14.

vBulletin® Version 3.8.8