Re: FVWM: a problem of .login starting fvwm (migration suse-ubuntu)
Cameron Simpson <[email protected]> Sun, 14 Nov 2021 08:14:40 +1100
| Newsgroups | gmane.comp.window-managers.fvwm |
|---|---|
| Message-ID | <[email protected]> |
On 14Sep2021 15:36, Lucio Chiappetti <[email protected]> wrote: >I am migrating (actually, configuring a new PC) from opensuse 42.3 to >xubuntu 20.04.3. In particular I would like to clone my fvwm >configuration (since I have a screen of the same size), the one in >http://sax.iasf-milano.inaf.it/~lucio/WWW/Opinions/window.html > >What I am noticing (which is probably not directly related fvwm itself >but to the way it is started with the X server) is that the fvwm >session does not run my .login (I am since ages a tcsh user, so I have >a .cshrc and a .login). Such .login is executed correctly in a ssh >session. > >The .login has few items (a PATH setting, a font path xset +fp setting >(plus other audio stuff so far commented out) which is conditional to >a $?XSESSION_IS_UP, and a setenv of some locale like LC_TIME to >en_US.UTF-8) > >Apparently ALL of the .login is not executed This is pretty normal. The display manager is running fvwm as your "session", so it starts it directly without using a shell at all. This is generally safer because many shell startups have some tty interaction which doesn't make sense in a batch environment (the headless process of running fvwm in a GUI directly). My long standing approach has been to have a .xsession file specifying my desktop session. Mine is this: #!/bin/sh . /etc/profile . $HOME/.profile exec $HOME/rc/x11/session To make your startup easier you'd want a tcsh based script, something like: #!/usr/bin/tcsh source /etc/login source $HOME/.login exec fvwm (Untested, and I am not a csh user so the syntax may be a bit incorrect.) In my setups I have environment setting in .profile and interactive stuff in .zshrc (or .bashrc, or .cshrc for you as a tcsh user). So the session script sources the .login (environment setting) but _not_ the .cshrc (interactive things). To recap, a "text terminal then startx" style login goes: - login tcsh - start x11, your environment is already set up An XDM (et al) style login goes: - X11 active - run .xsession - - source .login etc - - execute fvwm as the session, so that the logout happens when fvwm logs out Just a different ordering. >(not just the part relevant to XSESSION_IS_UP ...by the way what is >the correct way in ubuntu to check I am in an X session ?) I check that $DISPLAY is not empty, and maybe do an: xdpyinfo >&/dev/null as an additional check. In Bounre shell that might be like this: if [ -n "$DISPLAY" ] && xdpyinfo >/dev/null 2>&1 then ... x11 stuff here ... fi You'll have to adjust for csh. Cheers, Cameron Simpson <[email protected]>