![]() |
.zshrc for N900 (updated, now works for me[tm])
// couldn't find a better place, move/merge if needed.
Update: now works flawless for me. Guide is rewritten from the original. There's still a chance to brick the device, but not permanently, so reflashing is possible. You've been warned, you'd better have a backup. A .deb would be really useful, if you're capable of doing so, please don't hesitate :) -- I made some modifications to my desktop's .zshrc to better fit (my) needs on the N900:
I'd like to share this with you, so maybe someone else can benefit and I'd be glad to receive patches(diffs) or additions. Getting started: a) you need to be able to become root b) you need extras-{devel,testing} both enabled c) open the terminal d) become root e) fetch this file: http://phorcix.org/proj/n900/conf/zsh-setup f) run Code:
sh /path/to/zsh-setup When all this is done, have a quick look over the command's output and make sure, there are no errors. If everything looks ok, reboot the device. Note:ZSHs first start will take a relatively long time, since it's building the entries needed for autocompletion. This is one time only, so after that, it shouldn't be slow at all. -- A little overview of what's possible with it - please forgive me, if I use zsh-terms too often... a) auto_cd is on, thus Code:
cd /some/path Code:
/some/path Code:
cd ~cam of course Code:
cp somefile ~cam/ some other named-dirs are also setup, namely for the paths of documents, sounds, images, videos, backups and some more c) shortcuts for things like apt-get are setup, thus i.e. Code:
agi nc d) ' P ' works as ' | ' e) easy layout switching, in my case de<->dvorak f) '+'/'-' to turn up/down the volume g) easy 'chmod'/'chown', ie '755 file' h) shortcuts for a lot of commands, i.e. A,E,G,L -> awk,echo,grep,less and more i) associations for most commonly used files, espacially media is assigned to mplayer j) setup to 55 colums, so its easily editable on the N900 in vim with 'set number' -- Love, praise, thoughts, critics, deathwishes are welcome. In the hope that someone finds it useful, cheers, avx PS: a little screeny of what my setup looks like, can be found in this post |
Re: .zshrc for N900
thank you, this is great
edit: damn, had to reflash too :( |
Re: .zshrc for N900
Quote:
I'm looking into this, I guess the init-scripts are borked, but I'm not sure, yet. |
Re: .zshrc for N900
Could u please make a .deb package?
|
Re: .zshrc for N900
Quote:
Maybe I could, but I'd need to read up on it, since I'm more of the .ebuild guy ;) |
Re: .zshrc for N900
Quote:
do hope you figure out how to get it running properly though! :) |
Re: .zshrc for N900
The bricking issue appears to be that zsh is used to execute /etc/X11/Xsession at startup. The output of run-parts in that script is delimited by newlines, which ash and bash recognise as field separators and split appropriately when it is used in the following for loop. Zsh isn't splitting at newlines and tries to execute the entire output of run-parts as one command.
Does somebody who's willing to risk bricking their phone want to try adding this line to your /home/user/.profile ? It shouldn't brick it :) It should get busybox to run zsh in xterms and ssh sessions. Code:
[ -n "$PS1" ] && [ "$0" != "/etc/X11/Xsession" ] && exec /bin/zsh "$@" || : I'm 99% confident that it will do the right thing(tm), but not confident enough to try it myself before I board a plane in a few hours. Please forgive my sensibility :) |
Re: .zshrc for N900
Thanks, BernardB, will try that later tonight.
Also thanks for the hint on Xsession, I'll have a look at that, too and hopefully found a solution. |
Re: .zshrc for N900
Oh, what may also work (and be slightly more efficient as it avoids starting two shells each time), is to set zsh as your default shell, but to add this line to your .zshenv file:
Code:
[ "$0" = "/etc/X11/Xsession" ] && emulate sh || : |
Re: .zshrc for N900
Does anyone of you know, if/how I could get access when it stops at the moving balls? Either drop me into a shell or connect to my wlan and enable ssh?
|
All times are GMT. The time now is 00:22. |
vBulletin® Version 3.8.8