Score:0

tcsh .login in X sessions using fvwm window manager

fr flag

Recently moved to xubuntu 20.4 from opensuse 42.3 and would like to preserve my long term habits. My window manager is fvwm, and my login shell is tcsh.

What I noticed is that my .login file is not executed on an X console login, while it used to be on opensuse. Apparently the sequence of processes from ps -H is

on opensuse

/usr/bin/sddm/
  /usr/bin/X -nolisten tcp -auth ...
  /usr/lib/sddm/sddm-helper ... --start fvwm --user lucio
   /usr/bin/fvwm
    /usr/bin/ssh-agent /usr/bin/gpg-agent --sh ...

on xubuntu

/usr/sbin/lightdm
   /usr/lib/xorg/Xorg -core :0 ...
   lightdm --session-child 12 19
     fvwm2
      /usr/bin/ssh-agent /usr/bin/im-launch fvwm2  

Anyhow it looks like that the .login is not executed in ubuntu before fvwm, therefore the scripts and terminals started by fvwm ignore the (few) things set up by .login which include:

  1. setting up the PATH
  2. setting up the X font path (xset +fp
  3. some audio settings (currently commented out)
  4. a few locale setting like setenv LC_TIME en_US.UTF-8

(steps 2 and 3 are conditional of being in an X session, which on opensuse occurs checking $?XSESSION_IS_UP ... what would be the equivalent ?)

I could easily move item 4 to .cshrc or to individual scripts requiring it, but for paths (1 and 2) they should be done once to avoid multiple concatenation of user items to the default "system" path.

Is there a way to have such environment set up at the beginning of the X session ?

Edit: .login is honoured in an ssh login

David avatar
cn flag
There is no such Ubuntu version as 20.4
Lucio C avatar
fr flag
Welcome to Ubuntu 20.04.3 LTS (GNU/Linux 5.4.0-81-generic x86_64)
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.