Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 159890 - sys-apps/qingy-0.9.4 not sourcing /etc/profile when non-root user login to X session using /bin/zsh as shell
Summary: sys-apps/qingy-0.9.4 not sourcing /etc/profile when non-root user login to X ...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Michele Noberasco (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on: 19924
Blocks:
  Show dependency tree
 
Reported: 2007-01-03 12:15 UTC by Jakub Ruzicka
Modified: 2007-07-20 14:55 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jakub Ruzicka 2007-01-03 12:15:34 UTC
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; cs; rv:1.8.0.9) Gecko/20061231 Firefox/1.5.0.9
Build Identifier: 

When I log in using agetty as root OR as user, everything is all right as well
as loging in as root using qingy. But when I log in using qingy as normal user,
locales are not set, PATH contains only basic /bin:/usr/bin:/usr/local/bin etc,
so I guess /etc/env.d isn't sourced.

Reproducible: Always

Steps to Reproduce:
1. emerge qingy (0.7.4)
2. log in as user
3. check env. variables

Actual Results:  
/etc/env.d isn't sourced so locales aren't set, PATH isn't set correctly...
extremly annoying since my language is pain without right locales.

Expected Results:  
source /etc/env.d and don't be naughty login manager...

Portage 2.1.1-r2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r3,
2.6.18-gentoo-r6 i686)
=================================================================
System uname: 2.6.18-gentoo-r6 i686 AMD Athlon(tm)  2200+
Gentoo Base System version 1.12.1
Last Sync: Wed, 03 Jan 2007 16:20:01 +0000
app-admin/eselect-compiler: [Not Present]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=athlon-xp -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config
/usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf
/etc/java-config/vms/ /etc/revdep-rebuild /etc/splash /etc/terminfo"
CXXFLAGS="-O3 -march=athlon-xp -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="ftp://ftp.sh.cvut.cz/MIRRORS/gentoo/gentoo
http://mirror.uni-c.dk/pub/gentoo/ http://trumpetti.atm.tut.fi/gentoo/ "
LANG="cs_CZ.UTF-8"
LINGUAS="cs"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress
--force --whole-file --delete --delete-after --stats --timeout=180
--exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="x86 X aalib alsa alsa_cards_ali5451 alsa_cards_als4000 alsa_cards_atiixp
alsa_cards_atiixp-modem alsa_cards_bt87x alsa_cards_ca0106 alsa_cards_cmipci
alsa_cards_emu10k1x alsa_cards_ens1370 alsa_cards_ens1371 alsa_cards_es1938
alsa_cards_es1968 alsa_cards_fm801 alsa_cards_hda-intel alsa_cards_intel8x0
alsa_cards_intel8x0m alsa_cards_maestro3 alsa_cards_trident alsa_cards_usb-audio
alsa_cards_via82xx alsa_cards_via82xx-modem alsa_cards_ymfpci
alsa_pcm_plugins_adpcm alsa_pcm_plugins_alaw alsa_pcm_plugins_asym
alsa_pcm_plugins_copy alsa_pcm_plugins_dmix alsa_pcm_plugins_dshare
alsa_pcm_plugins_dsnoop alsa_pcm_plugins_empty alsa_pcm_plugins_extplug
alsa_pcm_plugins_file alsa_pcm_plugins_hooks alsa_pcm_plugins_iec958
alsa_pcm_plugins_ioplug alsa_pcm_plugins_ladspa alsa_pcm_plugins_lfloat
alsa_pcm_plugins_linear alsa_pcm_plugins_meter alsa_pcm_plugins_mulaw
alsa_pcm_plugins_multi alsa_pcm_plugins_null alsa_pcm_plugins_plug
alsa_pcm_plugins_rate alsa_pcm_plugins_route alsa_pcm_plugins_share
alsa_pcm_plugins_shm alsa_pcm_plugins_softvol bash-completion berkdb
bitmap-fonts bzip2 cdr cli cracklib crypt cups directfb divx dlloader dri dvd
dvdread edline elibc_glibc encode fbcon firefox foomaticdb fortran gdbm gif gpm
gtk gtk2 iconv input_devices_keyboard input_devices_ps2mouse ipv6 isdnlog jabber
java jpeg jpeg2k kernel_linux libcaca libg++ linguas_cs mp3 ncurses nls nptl
nptlonly offensive openal opengl oss pam pcre perl png ppds pppd python qt3 qt4
quicktime readline real realmedia reflection sdl session spl ssl svg tcpd tiff
truetype truetype-fonts type1-fonts udev unicode userland_GNU vcd
video_cards_fbdev video_cards_radeon video_cards_vesa vim-synt win32codecs xml
xorg xpm xv xvid zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS,
PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Michele Noberasco (RETIRED) gentoo-dev 2007-01-03 23:20:52 UTC
Thanks for the heads up. Yet, your issue should already be fixed in qingy 0.9.4, which is in Portage, masked and pending stabilization. You should try out that version...
Comment 2 Jakub Ruzicka 2007-01-04 05:24:33 UTC
Yes, in sys-apps/qingy-0.9.4 this issue is fixed for console login, however when I use fluxbox X session (x11-wm/fluxbox-0.9.15.1-r1, /etc/X11/Sessions/fluxbox) the problem is exactly the same. I really want to fix this, if you give me direction I 'll try to do so myself, but I don't have the slightest idea what to do...
Comment 3 Michele Noberasco (RETIRED) gentoo-dev 2007-01-04 06:01:02 UTC
The problem is that /etc/env.d is sourced only for login shells, but afaik a login shell should be fired up only if you want a command prompt, not when you want it to start something (i.e. xinit) and die when this program closes... Doing otherwise may even result in the command failing to start at all (it happens for if you use zsh, for example)...
Comment 4 Jakub Ruzicka 2007-01-04 07:06:24 UTC
(In reply to comment #3)
> The problem is that /etc/env.d is sourced only for login shells, but afaik a
> login shell should be fired up only if you want a command prompt, not when you
> want it to start something (i.e. xinit) and die when this program closes...
> Doing otherwise may even result in the command failing to start at all (it
> happens for if you use zsh, for example)...
> 

Well, good you mentioned that example as I actually DO use zsh and when I use bash instead, it works. Any ideas (except switching to bash;]) ? 
Comment 5 Michele Noberasco (RETIRED) gentoo-dev 2007-01-08 09:40:28 UTC
Well, what is the problem exactly? First thing I do when I fire up my Gnome environment it to fire up a terminal, and I tell it to start my shell as a login shell, so no problem there...
Comment 6 Jakub Ruzicka 2007-01-13 17:53:20 UTC
(In reply to comment #5)
> Well, what is the problem exactly? First thing I do when I fire up my Gnome
> environment it to fire up a terminal, and I tell it to start my shell as a
> login shell, so no problem there...
> 

The problem is /etc/profiles isn't sourced for X sessions with qingy and zsh as login shell in /etc/passwd, nothing more, nothing less. It's terrible as locales aren't set so fonts in everything using my lang. are messed up and PATH isn't set so I can't run apps not in standard system PATH (/usr/games/bin for example)... System isn't usable that way. It works properly with bash+qingy and even zsh+agetty so I don't understand what exactly is wrong... I made it work by appending line

source /etc/profiles

to /usr/bin/startfluxbox which I use to start FB. It doesn't work out-of-box for XFCE either... It's quite a WTF and it almost pissed me so much I was going to dd if=/dev/one of=/dev/hda3 (yep, I have /dev/one working:-P) to my gentoo partition... life without qingy is meaningless, don't you think;o)
Comment 7 Michele Noberasco (RETIRED) gentoo-dev 2007-01-16 08:15:13 UTC
Well, well,
finally I was able to get to the root of the problem...

The problem is not that (like I thought before) zsh is not able to fire up a program when started as a login shell. It does, only on my machine the execution failed because PATH was not set correctly and zsh could not find the executables I wanted to launch. Upon further investigation, I discovered that zsh, unlike bash, when invoked as a login shell does not source /etc/profile, sourcing /etc/zprofile (that is /etc/zsh/zprofile on my Gentoo box) instead. Only, PATHs are set by Gentoo in /etc/profile, thus adding to my /etc/zsh/zprofile a
. /etc/profile
solved all the environmental issues on my machine. I just committed to qingy svn repository a change that makes qingy start (again) every shell as a login shell, and I should release a new version in a day or two...
Yet I think that Gentoo's default /etc/zsh/zprofile should be fixed.
Comment 8 Michele Noberasco (RETIRED) gentoo-dev 2007-01-17 16:25:24 UTC
qingy 0.9.5 is out and in Portage, and it fixes the login shell issues... zsh still has to provide decent PATHs, though...
Comment 9 Michele Noberasco (RETIRED) gentoo-dev 2007-07-20 14:55:30 UTC
With zsh bug closed this should be fixed, too...