Re: FVWM: a problem of .login starting fvwm (migration suse-ubuntu)
On Sun, 14 Nov 2021, Cameron Simpson wrote: On 14Sep2021 15:36, Lucio Chiappetti wrote: I am migrating (actually, configuring a new PC) from opensuse 42.3 to xubuntu 20.04.3. Thanks for your interest. In the meanhile I arranged an acceptable workaround. 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. My long standing approach has been to have a .xsession file specifying my desktop session. I'm not sure whether that's compatible with the default xubuntu way. To recap, a "text terminal then startx" style login goes: Used that only once for a laptop which failed to start X at boot (or perhaps back in the old times of Sun workstation in the '90s ...) An XDM (et al) style login goes: (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 ?) Apparently in xubuntu the things to be tested are if ( $?XDG_SESSION_TYPE != 0 ) then if ($XDG_SESSION_TYPE == x11) then my arrangement has been to move some conditional code in .cshrc, and leave some conditional X server stuff (like the X11 bell emulation) in .login, and force its execution in fvwm with a xterm -ls in StartFunction Thanks anyhow -- 'It seemed to me,' said Wonko the Sane, 'that any civilization that had so far lost its head as to need to include a set of detailed instructions for use in a package of toothpicks, was no longer a civilization in which I could live and stay sane.' Douglas Adams, So Long, and Thanks for All the Fish
Re: FVWM: a problem of .login starting fvwm (migration suse-ubuntu)
On 14Sep2021 15:36, Lucio Chiappetti 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
Re: FVWM: a problem of .login starting fvwm (migration suse-ubuntu)
Lucio, I also use Ubuntu 20.04, fvwm, and tcsh. What display manager are you using? I like xdm and fvwm is started from .xsession. My .login is just for setting the environment, and .tcshrc for aliases. cat .xsession #!/bin/bash export PATH=~/bin:/usr/local/bin:/usr/local/sbin:$PATH export TZ="America/Los_Angeles" /bin/mv -f /home/frankb/.xsession-errors /home/frankb/.xsession-errors.old exec /usr/bin/fvwm 2> $HOME/.xsession-errors E. Frank Ball III On Tue, Sep 14, 2021 at 03:36:43PM +0200, Lucio Chiappetti 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 > > (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 checked with ps -H the way fvwm is started > > On suse > > 1 1690 root /usr/bin/sddm > 1690 17584 root /usr/lib/sddm/sddm-helper ... --start fvwm --user > lucio > 17584 17586 lucio /usr/bin/fvwm > > On ubuntu > > 1 977 root /usr/sbin/lightdm > 977 34424 root /usr/lib/xorg/Xorg -core :0 ... > 977 56656 root lightdm --session-child 12 19 > 56656 56682 lucio fvwm2 > 56682 56759 lucio/usr/bin/ssh-agent /usr/bin/im-launch fvwm2 > > The difference between fvwm and fvwm2 is virtual. On suse /usr/bin/fvwm2 is > a link to fvwm. On ubuntu fvwm is a link to /etc/alternatives... which in > turn is a link to /usr/bin/fvwm2. > > Suse has fvwm 2.6.6 and ubuntu has 2.6.8 > > What is apparent is that somehow suse performs a "login with my shell" > before starting fvwm (thus setting my environment) while ubuntu starts fvwm > ignoring my login shell choices. > > How can I either change this order, or instruct fvwm under ubuntu so that > it sets up a basic environment which is then inherited by all child shells > (in xterm, urxvt or whatever) ? > > Thanks > > -- > Lucio Chiappetti - INAF/IASF - via Corti 12 - I-20133 Milano (Italy) > For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html
FVWM: a problem of .login starting fvwm (migration suse-ubuntu)
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 (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 checked with ps -H the way fvwm is started On suse 1 1690 root /usr/bin/sddm 1690 17584 root /usr/lib/sddm/sddm-helper ... --start fvwm --user lucio 17584 17586 lucio /usr/bin/fvwm On ubuntu 1 977 root /usr/sbin/lightdm 977 34424 root /usr/lib/xorg/Xorg -core :0 ... 977 56656 root lightdm --session-child 12 19 56656 56682 lucio fvwm2 56682 56759 lucio/usr/bin/ssh-agent /usr/bin/im-launch fvwm2 The difference between fvwm and fvwm2 is virtual. On suse /usr/bin/fvwm2 is a link to fvwm. On ubuntu fvwm is a link to /etc/alternatives... which in turn is a link to /usr/bin/fvwm2. Suse has fvwm 2.6.6 and ubuntu has 2.6.8 What is apparent is that somehow suse performs a "login with my shell" before starting fvwm (thus setting my environment) while ubuntu starts fvwm ignoring my login shell choices. How can I either change this order, or instruct fvwm under ubuntu so that it sets up a basic environment which is then inherited by all child shells (in xterm, urxvt or whatever) ? Thanks -- Lucio Chiappetti - INAF/IASF - via Corti 12 - I-20133 Milano (Italy) For more info : http://www.iasf-milano.inaf.it/~lucio/personal.html