You are not logged in.

#1 2007-10-05 01:04:42

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Changing to Zsh

Is this the correct side of the forum to post? big_smile Anyway I'll get straight to the point.

I've customized, customized, customized. Before even logging in with zsh.

Now some applications don't start up with extra arguements like firefox %u, saying "Couldn't find executable", but then again others are able to like opera %u. I figure it is a PATH issue rather than a shell command issue, but I have both paths in my .zshrc. I tried with a minimal zshrc (grabbed an example from the Zsh wiki), still no go. I sourced it, since my /etc/profile contains only defaults. No positive result either.

The main stumbling block is in /var, or rather with makepkg (/var/abs/local). Running it complains:

/usr/bin/makepkg:601: condition expected: is
==> WARNING: Fakeroot is not installed. Building as an unprivileged user**bla bla**

Further down:

/usr/bin/makepkg:629: condition expected: is
==> WARNING: pacman was not found in PATH. skipping dependency checks.

It looks obvious that makepkg can't find the env vars to read that fakeroot and pacman are indeed installed, but env looks fine, so what can the problem be? Have I missed a vital step in configuring zsh to be my primary shell? I have also tried exporting in realtime but to no avail. Anyway I have linked sh and bash to zsh since I want a global shift, maybe this is part of the reason?

Thanks beforehand for any help, and if possible can anyone tell me why is there a zsh-$version binary alongside zsh itself? Doesn't look like a link either. Probably a question to the packagers but no harm if you could tell me smile


I need real, proper pen and paper for this.

Offline

#2 2007-10-05 01:22:33

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Changing to Zsh

Do you have sane zshrc and zprofile in /etc/zsh/? Just copy /etc/profile to /etc/zsh/zprofile.

Offline

#3 2007-10-05 01:39:36

elgatofelix
Member
From: Chile
Registered: 2007-07-03
Posts: 137

Re: Changing to Zsh

how should i do to make fish               (The friendly interactive shell) 

my default shell ?

currently i have the line exec fish in my .bashrc (but this is not the way to chsh )
because i dont know how fish could load all the profile and profile.d/ files


Are u listening?

Offline

#4 2007-10-05 04:07:31

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Changing to Zsh

DO NOT link sh and bash to zsh.  There are many scripts in archlinux that depend on specific syntax of bash or sh.  As long as you make your default shell zsh, you shouldn't care that /etc/rc.d/* is using bash.

btw elgatofelix:

/usr/bin/chsh

Offline

#5 2007-10-05 05:16:40

elgatofelix
Member
From: Chile
Registered: 2007-07-03
Posts: 137

Re: Changing to Zsh

i ve done that but the bash files in /etc/profile.d dont get executed and fish syntax is a little different than bash scripts
so i got a shell (fish) with just 3 or 4 environment variables.

the only that i could think was calling fish in last line of my .bashrc so when bash gets called it calls fish. Itsnt a good solution ..

Last edited by elgatofelix (2007-10-05 05:20:37)


Are u listening?

Offline

#6 2007-10-05 13:27:24

schivmeister
Developer/TU
From: Singapore
Registered: 2007-05-17
Posts: 971
Website

Re: Changing to Zsh

lucke: strange i had no /etc/zsh after installing that package..looking at the abs pkg* though, it shoulda been made along with sample zprofile and zshrc placed in. My ignorance to have assumed they were there. I think what codemac mentioned is indeed the cause for this; incompatility.

codemac: yes you're right, like i expected..well it was stupid of me to get carried away in the first place lol Anyway I needed confirmation thanks!

elgatofelix: yeah that won't work. in any way, those scripts still need bash, they aren't being told to call and run with fish but still /bin/sh or /bin/bash. And because in the first case you had fish on top, the scripts won't relate any longer.


I need real, proper pen and paper for this.

Offline

#7 2007-10-05 14:29:17

buttons
Member
From: NJ, USA
Registered: 2007-08-04
Posts: 620

Re: Changing to Zsh

Yes, please use chsh to change your *login* shell.  This is what you want.

If you change your shell to anything else arch will break.  Hard.  I once symlinked sh to dash and installed gnome...crippling my system in the process.

You can also hand-edit /etc/passwd if you want.  Just don't change any symlinks!


Cthulhu For President!

Offline

#8 2007-10-05 14:32:07

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Changing to Zsh

elgatofelix: Have you looked up what files fish uses as start up files?  Have you seen if they source /etc/profile at all?  Because that's all they should need to do...

Offline

#9 2007-10-05 22:07:51

elgatofelix
Member
From: Chile
Registered: 2007-07-03
Posts: 137

Re: Changing to Zsh

yep. it just defaults to its own /etc/fish files and the include/*.fish ones


Are u listening?

Offline

#10 2007-10-06 15:00:26

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Changing to Zsh

Well then the issue here is that for zsh and bash to become your login shell with all the right paths, they can just source /etc/profile as they both can read POSIX shell stuff.  We probably aren't going to rewrite all of the /etc/profile scripts just for fish as no developers use it (as I know).  I'd describe fish as "the zsh for people who don't want to take the time to learn zsh".

I say try zsh. tongue  Not a solution at all, but I know I personally will not be reimplementing all of the /etc/profile scripts in every package.

Offline

#11 2007-10-06 23:25:32

elgatofelix
Member
From: Chile
Registered: 2007-07-03
Posts: 137

Re: Changing to Zsh

Agree..
Gonna read about processes and environment so i can write a more apropiated hack around this.. roll


Are u listening?

Offline

#12 2007-11-07 17:47:19

pdunning
Member
Registered: 2007-11-07
Posts: 31

Re: Changing to Zsh

I just had a similar problem to this in zsh having used chsh and found that the best solution was a symbolic link at:
/etc/zsh/zprofile to /etc/profile
and one at
/etc/zsh/zprofile.d to /etc/profile.d

these don't exist in the default zsh. Should they?

p.s. thanks for the help.

Offline

#13 2008-02-24 03:06:49

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: Changing to Zsh

I just had this problem. I want to use fish as well. The problem is the environment variables.
Under gnome-terminal, you get the environment variables set because gnome is started by gdm which is started by the init scripts which read /etc/profile and /etc/profile.d/.


If you start it as a login shell, those environment variables are not set.
So far, the only way to do it is "exec fish" in ".bashrc".

Another messy way to do it is to parse the bash profile scripts for "export" statements using the FISH init scripts and process accordingly.

Last edited by SpookyET (2008-02-24 05:45:44)

Offline

#14 2008-05-26 15:09:25

SpookyET
Member
Registered: 2008-01-27
Posts: 410

Re: Changing to Zsh

Fix for the environmental variables: http://bbs.archlinux.org/viewtopic.php? … 00#p372500

Offline

Board footer

Powered by FluxBB