views:

267

answers:

3

Hello,

Im using KUbuntu 10.04 (Lucid Lynx). I have installed zsh and screen. I have set zsh as the default shell, by setting Command to zsh in Settings->Edit Current Profile of the terminal. But,when i launch screen,the bash shell is loaded. If i run the command zsh, then zsh starts but the following message is displayed:

"/home/joel/.zshrc:36: Can't add module parameter `mapfile': parameter already exists"

Also,zsh is invoked for only the current screen instance and i have to invoke it manually again for other instances. So,is there any way to make screen load zsh by default and invoke it automatically for every instance ?

Thank You

+3  A: 

First locate where is zsh like that:

$ whereis zsh

Second change shell for current user:

$ chsh -s /path/to/zsh joel

And zsh will be default shell for user joel after relogin.

mosg
Thanks for the reply. whereis zsh gives sh: /bin/zsh /usr/bin/zsh /etc/zsh /usr/lib/zsh /usr/share/zsh /usr/share/man/man1/zsh.1.gz . But when i do chsh -s {/bin/zsh} joel, it asks for password and then i get the message "chsh: {/bin/zsh} is an invalid shell."
joel
*chsh -s /bin/zsh joel* - that's what you need! :)
mosg
Oops..ur right, thanks that worked ! :). But i still get the message "Can't add module parameter `mapfile': parameter already exists" when i launch screen. Any way to fix that ?
joel
I think, that Dennis right, you need to add to your question out of *~/.zshrc* file...
mosg
+5  A: 

If you want to make it the default shell for screen sessions only, you can simply add this line to your ~/.screenrc file.

shell "/usr/bin/zsh"
jkramer
A: 

I had a similar problem to you, except in my case I changed the shell vim uses, by specifying set shell=zsh\ --login in .vimrc. Every time I dropped into a shell via :sh zsh would whine with the same error:

Can't add module parameter `mapfile': parameter already exists

I asked on #vim and #zsh on freenode. Turns out if you run zsh again within a zsh session, you'll see the same error, and the suggested fix is to simply append &>/dev/null to your .zshrc file like so:

zmodload -ap zsh/mapfile mapfile &>/dev/null

The zsh mapfile module creates a pseudo-variable which maps filenames to their contents, and is only needed if you have scripts that actually use $mapfile.

It appears to be optional, but it was pointed out that the autoload parameter is there so it only gets loaded when required, so there should be no harm in keeping the line and piping complaints to /dev/null

justsee