GNU bug report logs

#28260 tcsh/csh needs separate /etc/profile - like file

PackageSource(s)Maintainer(s)
guix PTS Buildd Popcon
Reply or subscribe to this bug. View this bug as an mbox, status mbox, or maintainer mbox

Report forwarded to bug-guix@gnu.org:
bug#28260; Package guix. (Mon, 28 Aug 2017 08:16:02 GMT) (full text, mbox, link).


Acknowledgement sent to ng0 <ng0@infotropique.org>:
New bug report received and forwarded. Copy sent to bug-guix@gnu.org. (Mon, 28 Aug 2017 08:16:02 GMT) (full text, mbox, link).


Message #5 received at submit@debbugs.gnu.org (full text, mbox, reply):

From: ng0 <ng0@infotropique.org>
To: bug-guix@gnu.org
Subject: tcsh/csh needs separate /etc/profile - like file
Date: Mon, 28 Aug 2017 08:14:38 +0000
[Message part 1 (text/plain, inline)]
I am looking into making usage of different shells easier on GuixSD.
I already noticed that our SLIM-service needs a change
to work for tcsh, but it seems as if we should also create
a file in the %base-services or a small service:

quote man tcsh(1):

> Startup and shutdown
>   A login shell begins by executing commands from the system files /etc/csh.cshrc and /etc/csh.login.  It then executes commands from files in the user's home directory: first ~/.tcshrc (+) or, if  ~/.tcshrc  is  not
>   found,  ~/.cshrc,  then the contents of ~/.history (or the value of the histfile shell variable) are loaded into memory, then ~/.login, and finally ~/.cshdirs (or the value of the dirsfile shell variable) (+).  The
>   shell may read /etc/csh.login before instead of after /etc/csh.cshrc, and ~/.login before instead of after ~/.tcshrc or ~/.cshrc and ~/.history, if so compiled; see the version shell variable. (+)
>
>   Non-login shells read only /etc/csh.cshrc and ~/.tcshrc or ~/.cshrc on startup.

It might take a while for me to find time for this and to test it,
but I will try and add such a file (/etc/csh.login) via a service.

However this _seems_ to be only a problem with SLIM as far as I could test,
as I am able to log in using tcsh (in a profile which never used bash and
uses tcsh as its user shell) at the tty. SLIM fails for login_command
reasons. Nevertheless it should be safer to add this for tcsh users
who are new to Guix and who did not add basic stuff to their .tcshrc
such as

> setenv PATH $HOME/.guix-profile/bin:$HOME/.guix-profile/sbin:/run/setuid-programs:/run/current-system/profile/bin:/run/current-system/profile/sbin
> setenv INFOPATH $HOME/.guix-profile/share/info:/run/current-system/profile/share/info:$HOME/.guix-profile/share/info:/run/current-system/profile/share/info
> setenv GUILE_LOAD_COMPILED_PATH $HOME.guix-profile/lib/guile/2.2/site-ccache:$HOME.guix-profile/share/guile/site/2.2:/run/current-system/profile/lib/guile/2.2/site-ccache:/run/current-system/profile/share/guile/site/2.2
> setenv GUILE_LOAD_PATH $HOME/.guix-profile/share/guile/site/2.2:/run/current-system/profile/share/guile/site/2.2
> setenv GIT_EXEC_PATH $HOME/.guix-profile/libexec/git-core

I will also look at the ~/.guix-profile/etc/profile variant
and see that we can generate a similar file for tcsh.

> export INFOPATH="${GUIX_PROFILE:-/gnu/store/1n2ay00nvsybwszvjdm7acc39pm0k851-profile}/share/info${INFOPATH:+:}$INFOPATH"

a very simple solution could be
setenv INFOPATH $GUIX_PROFILE/share/info

which of course does not include the

> export INFOPATH=$HOME/.guix-profile/share/info:/run/current-system/profile/share/info

which can be set in /etc/profile so I assume it
could be (untested):

setenv INFOPATH $GUIX_PROFILE/share/info:INFOPATH

We can also test very easily for tcsh if that helps
solving any future problems:

> [abyayala] 8:08am ~ > echo $shell
> /gnu/store/kfv79p5di3bz3jl4j1vn91v69ga6sqk3-tcsh-6.20.00/bin/tcsh
> [abyayala] 8:08am ~ > exit
> # now we are back in bash again (no tcsh-only environment here)
> user@abyayala ~$ echo $shell
>
> # as you can see bash returns empty here
> # and so does zsh aswell.
-- 
ng0
GnuPG: A88C8ADD129828D7EAC02E52E22F9BBFEE348588
GnuPG: https://n0is.noblogs.org/my-keys
https://www.infotropique.org https://krosos.org
[signature.asc (application/pgp-signature, inline)]

Severity set to 'wishlist' from 'normal' Request was from ludo@gnu.org (Ludovic Courtès) to control@debbugs.gnu.org. (Sun, 26 Nov 2017 14:19:02 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


debbugs.gnu.org maintainers <help-debbugs@gnu.org>. Last modified: Wed Apr 16 04:45:40 2025; Machine Name: wallace-server

GNU bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.