From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 20150 invoked from network); 8 Sep 2022 21:38:11 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 8 Sep 2022 21:38:11 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1662673091; b=hiMhebg1ai7bYEIuD6cgmL0sci/iSuNCadYGJlzmbaxfp27ld7bUCpGF1tNjcieFvcquMJUyJE p25PreKpco9OUjuNv97auISk0/HIvfxgdL83WzJTixIHbvJ6gP/zUeYubBWkEiyrgECDasNGL1 oV1m+/0I0C6lIOO2Se+tqhh/0CwrHf5kMeuTHOpbps/m5mnVdRsIou7L8lUHfixp9Y++1aTnWz dWDd5W3DpvTxOSWogQaogkXiVOfV+xk6afrkS7NcdWEOqrjeXLnMjFi31zDsPwGDDjfh6QhHH4 POv/oh+WSmQ0eM8sRi5qa2hugxaKOJYeOOvxF0R2zWxXTw==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (mail-io1-f51.google.com) smtp.remote-ip=209.85.166.51; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1662673091; bh=dILI1JZt4H5o3IYIjXDFh6Uw5UVwUjSOuGYxJ2hcSt8=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Type:To:Subject:Message-ID:Date:From:MIME-Version: DKIM-Signature:DKIM-Signature; b=fokYJY1C0aJ5ij1g7xMh+tD/U+rQB+eIFoWIUJynveVmMxdkkJ2l5S2MzmpW+DzUIUJXksnxrH l9pFJlh40dH4I/ROU8a7THO1kyyVnJzouSatGUbuLhBsL7xle/Luq0qYHoth321NaN3eUuLHf5 /p1RoMMo+1KG5AVes4mpNVKt3MHG1fLsc5oyYeJhyTBf8GahCfNoiiTnSjV5OAthHzdCezqwOc rKaN8T8aUaHjIxYgbt0sQsmIg1PK2dlMuy1yrCkF03ZJO28VLc/Wjxc479IMyBBxVHBeBpytcb v+RipLPqm8ujrs1JdEzIETONNi+fOahSfEM9GHPp0YchcQ==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Type:To:Subject:Message-ID: Date:From:MIME-Version:Reply-To:Cc:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:In-Reply-To:References; bh=dILI1JZt4H5o3IYIjXDFh6Uw5UVwUjSOuGYxJ2hcSt8=; b=Uy2+Aoj9d4Rg+aZ6zxzDziP+Go iI3F461VpD22oVkAdpBBq8PyLWo89bABopfSdjrqstWtRL1CewOzawgTXCcWb5EkJyClIwdQikoZk VDR2PSRb9SdgR6B/E7RI8Ff5zgrJB5ccwHq2SyEEaCX/rd4XLpK/mCk4iRBSs3EQkMkZykYz/ArDK 5TufiL9XvUrFF6xGLSpYqkW3ntU74DO8WwF+ahh7HeehDIVkLkEgnCPqlTpxYMicKE1zqwZuEoC22 LOS7gpM9Je3qpTX3QGUFL4HdzWrlSN/7uYE730ZnUuNO3MokroAF8WCP4vHInZgnTlzTNdwHecilM x0oj7hZw==; Received: from authenticated user by zero.zsh.org with local id 1oWPDu-000JnK-In; Thu, 08 Sep 2022 21:38:10 +0000 Authentication-Results: zsh.org; iprev=pass (mail-io1-f51.google.com) smtp.remote-ip=209.85.166.51; dkim=pass header.d=gmail.com header.s=20210112 header.a=rsa-sha256; dmarc=pass header.from=gmail.com; arc=none Received: from mail-io1-f51.google.com ([209.85.166.51]:41830) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_128_GCM_SHA256:128) id 1oWPD6-000J5v-UU; Thu, 08 Sep 2022 21:37:22 +0000 Received: by mail-io1-f51.google.com with SMTP id r134so257088iod.8 for ; Thu, 08 Sep 2022 14:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date; bh=dILI1JZt4H5o3IYIjXDFh6Uw5UVwUjSOuGYxJ2hcSt8=; b=N5Kb3r7CCEUmi1ttCC9OqMW+54vNPtX4kpYG/LESP2XXrXxRoWOB1kkljdgbe99Cyf BLloX0nt2/Myqqc0QHrWwPaEpUMBat9LZ4QxhGQz82/TQHC9KqrZeQeQeFNRiGcEkICt /cTRuRhlcwR6x7g8VepAc/3HCHmwZxHfxqQ3B5vqMWa5fT8w/GIeHO8VpQOXp1UT5bTc g5BYJu0AjFW+uH0Qktf/2dGYDUFTrFhnJKuGOHzUG7cL3Tpqw0m0jc9UbzjmfOsmNxe7 WPu+SMavJOoYi6x/IH+qQlGft8j9+jc1pF/cXFIZnD6z6cTo8Dfe9bRtTEIwVgkOul7t OHRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date; bh=dILI1JZt4H5o3IYIjXDFh6Uw5UVwUjSOuGYxJ2hcSt8=; b=HmmZy1JqGWKx/KDMAeI2NBW6jdVcojts6ZW0/PH1CBuEtZJmfiZ1gD/IJTzM80/SFK ljn9yNkSXV6sZp5XGSNuGVuFdeW5MpD24KTOWKG0ETB3jg7Th8wlMZ5mOAm4F41LGdie iWz9bBRBhaERm3DLffW8i0OI/Tx2aF2cSTwG5h8braeukBbE745R/peLZ8XsIjET0isT ysgcco1cZOxMI87RcglAL+RH/shHy6qqQ/kQMQwKeM9Z04HIBhHWn/kZlzlQ1seOY0GA aBzDtJPozq5rErb1Bb9QXvybHGIlNHMTD2yMD2oAFm6HNkEd8BZJ/sesjQNRWLaibf/S Leeg== X-Gm-Message-State: ACgBeo1ekDl5b1jY0ZRsKKQ1C5WoSmLlUkzIpDFdgH3TBUIi9QtNMKLc NOvAVw3dByQwOzR62NzjmwZU6DcySllIhU1VTE7gbVAW9Q== X-Google-Smtp-Source: AA6agR44q99+eS5HiKtPjAL3ua3yXaHFHe1dJEG3j8yEZsEGUvVZ2QJAFT20ufZgwiP1PNWpI1Va8XsDVsRJcD4vNOU= X-Received: by 2002:a6b:c343:0:b0:68a:b1d0:3ddf with SMTP id t64-20020a6bc343000000b0068ab1d03ddfmr5192349iof.0.1662673039725; Thu, 08 Sep 2022 14:37:19 -0700 (PDT) MIME-Version: 1.0 From: Piscium Date: Thu, 8 Sep 2022 22:37:08 +0100 Message-ID: Subject: zprofile and .profile sourcing To: zsh-users@zsh.org Content-Type: text/plain; charset="UTF-8" X-Seq: 28053 Archived-At: X-Loop: zsh-users@zsh.org Errors-To: zsh-users-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-users-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: I have been trying (unsuccessfully) to figure out why ~/.profile is sourced in some cases and not in others. I am on Arch Linux, and zsh is my login shell. If I log in to Arch over lightdm to a Xfce session, then a variable defined in .profile becomes part of my environment. I think this is because in Arch /etc/zsh/zprofile has a single statement that calls /etc/profile in sh compatibility mode: https://github.com/archlinux/svntogit-packages/blob/packages/zsh/trunk/zprofile And here is /etc/profile: https://github.com/archlinux/svntogit-packages/blob/packages/filesystem/trunk/profile However if within Xfce I log in to a Linux console with Ctrl-Alt-F4; or if I log in to a headless (no X, no Wayland) Arch VM in VirtualBox; then a variable defined in .profile does not become part of my environment. Why? The Zsh man page says (in different sections): "Login shells source /etc/profile followed by $HOME/.profile." "If the shell is a login shell, commands are read from /etc/zsh/zprofile and then $ZDOTDIR/.zprofile." ~/ zsh --version zsh 5.9 (x86_64-pc-linux-gnu) What am I missing?