[arch-general] i3 and .zprofile
Hi, I have recently switched from gnome to i3. I really like it, but there are still a few annoying problems left… Currently I use gdm to login; my login shell is set to zsh in /etc/passwd. I have several dotfiles, like ".zshrc" and ".zprofile" in $HOME. The problem is, that i3 does not seem to spawn a login shell correctly (is this even possible?). In gnome3 my settings in .zprofile are applied globally and just fine. In i3 the entire .zprofile is missed. Since .zprofile is sourced by interactive login shells, I guess that there might be a problem. Am I missing something here? Thanks, Stefan
On Tue, Oct 27, 2015 at 10:45 AM, Stefan Tatschner <rumpelsepp@sevenbyte.org> wrote:
Hi,
I have recently switched from gnome to i3. I really like it, but there are still a few annoying problems left… Currently I use gdm to login; my login shell is set to zsh in /etc/passwd. I have several dotfiles, like ".zshrc" and ".zprofile" in $HOME.
The problem is, that i3 does not seem to spawn a login shell correctly (is this even possible?). In gnome3 my settings in .zprofile are applied globally and just fine. In i3 the entire .zprofile is missed. Since .zprofile is sourced by interactive login shells, I guess that there might be a problem. Am I missing something here?
Thanks, Stefan
Whether the profile source file for your shell is run depends on how your terminal emulator launches your shell, and whether -i is passed or not. For i3, the case might be a bit less clear or obvious, since you haven't stated what terminal you use and how that one is set up. One possible solution would just be to source .zprofile on login through .xinitrc or whatever starts i3 for you. cheers! mar77i
On Di, 2015-10-27 at 11:14 +0100, Martti Kühne wrote:
Whether the profile source file for your shell is run depends on how your terminal emulator launches your shell, and whether -i is passed or not.
It is different in gnome and i3. In gnome .zprofile is sourced in all terminal emulators (default config, execute as login shell is disabled): gnome-terminal, terminator, termite. i3 does not. That's why I thought that might not be a terminal emulator problem. Maybe gdm does something strange here…
For i3, the case might be a bit less clear or obvious, since you haven't stated what terminal you use and how that one is set up. One possible solution would just be to source .zprofile on login through .xinitrc or whatever starts i3 for you.
Hi Stefan,
On October 27, 2015 at 11:22 AM Stefan Tatschner <rumpelsepp@sevenbyte.org> wrote:
On Di, 2015-10-27 at 11:14 +0100, Martti Kühne wrote:
Whether the profile source file for your shell is run depends on how your terminal emulator launches your shell, and whether -i is passed or not.
AFAIK, i3 will get started directly by gdm. I'm not sure, if there is a shell between gdm and i3, but if it's the case, it will only be a non-interactive login-shell. While you're opening a terminal, you'll open a interactive non-loginshell. Read up the "STARTUP" part in zsh(1). There is everything described, which file it will source in which case. Mit freundlichen Grüßen, Benedikt Heine
On Di, 2015-10-27 at 11:42 +0100, bebe@bebehei.de wrote:
AFAIK, i3 will get started directly by gdm. I'm not sure, if there is a shell between gdm and i3, but if it's the case, it will only be a non-interactive login-shell.
I have fixed it by replacing gdm with plain console login and "startx". There are no problems any more with ENV variables. Thanks to all! Stefan
Hello,
The problem is, that i3 does not seem to spawn a login shell correctly (is this even possible?). In gnome3 my settings in .zprofile are applied globally and just fine. In i3 the entire .zprofile is missed. Since .zprofile is sourced by interactive login shells, I guess that there might be a problem. Am I missing something here?
Have you tried changing your default shell the "old fashined way"? $ chsh /usr/bin/zsh Then re login. -- Alfredo Palhares GPG/PGP Key Fingerprint 68FC B06A 6C22 8B9B F110 38D6 E8F7 4D1F 0763 CAAD
On Di, 2015-10-27 at 10:18 +0000, Alfredo Palhares wrote:
Have you tried changing your default shell the "old fashined way"?
$ chsh /usr/bin/zsh
Then re login.
I have done that a long time ago. :) My shell is set to /bin/zsh instead; but since that line appears in /etc/shells as well, it should imo be fine. Stefan
Hi,I use xfce4 with i3 (dual session)in my i3 config I just start urxvt, in my .xinitrc I just have: exec startxfce4I can start xterm or xfce4-terminal also as I need.in my .Xresources : #include ".Xresources.d/xterm"#include ".Xresources.d/urxvt-unicode" and the configs in the .Xresources.dI used to start from lightdm, but now I just use tty, from there I login and .xinitrc takes over.Bob From: Stefan Tatschner <rumpelsepp@sevenbyte.org> To: arch-general@archlinux.org Sent: Tuesday, October 27, 2015 11:26 AM Subject: Re: [arch-general] i3 and .zprofile On Di, 2015-10-27 at 10:18 +0000, Alfredo Palhares wrote:
Have you tried changing your default shell the "old fashined way"?
$ chsh /usr/bin/zsh
Then re login.
I have done that a long time ago. :) My shell is set to /bin/zsh instead; but since that line appears in /etc/shells as well, it should imo be fine. Stefan
participants (5)
-
Alfredo Palhares
-
bebe@bebehei.de
-
bob
-
Martti Kühne
-
Stefan Tatschner