#!/bin/sh # # Sample MFCF X Environment xsession - # this gets called by the modified local MFCF # xdm startup script. For customization, a user can copy this to # ~/.xsession and edit as desired. The user then probably wants to # copy the standard twmrc file too. See comments below. # # PATH should already be set just fine by the Xsession script # But - this gets run by the user's shell, which may have reset the PATH # to something icky. So make sure that the x11 stuff is right in there. echo "Debut du fichier xsession" PATH=`/bin/showpath x11 current`; export PATH echo "Running MFCF X environment .xsession script." # make sure that things we start don't run niced BACKGROUNDPRIORITY=0 # fun file names resources=/u2/fturi/.Xdefault Xmodmap=$HOME/.Xmodmap xmodmap=$HOME/.xmodmap xmodmaprc=$HOME/.xmodmaprc # different people have got in the habit of using different names for this if [ -f $Xmodmap ]; then xmodmap $Xmodmap elif [ -f $xmodmap ]; then xmodmap $xmodmap elif [ -f $xmodmaprc ]; then xmodmap $xmodmaprc fi # Try to figure out which window manager to run for this person. For now, # we will recognize AWM and TWM as reasonable. UWM is not. GWM is not yet. # Assume that AWM is more advanced or somehow better than TWM, so try it # first. MWM is pretty popular these days too. awmrc=$HOME/.awmrc twmrc=$HOME/.twmrc tvtwmrc=$HOME/.tvtwmrc mwmrc=$HOME/.mwmrc # we don't want x11,motif as a package dependency, # so we'll test for the presence of mwm before trying to use it. mwm="`/bin/showpath FindFirst=mwm current`" # This is the important line, since we run twm for the MFCF environment. # If you have copied this file to .xsession in your home directory for # customizing, you probably want to copy the following file to .twmrc too. std_twmrc=/software/x11-mfcfenv/config/twmrc if [ -f $awmrc ]; then awm & elif [ -f $tvtwmrc ]; then tvtwm & elif [ -f $twmrc ]; then twm & elif [ -f $mwmrc -a -n "$mwm" ]; then mwm & else echo Starting twm with MFCF X environment start up file $std_twmrc twm -f $std_twmrc & fi # sleep to give the window manager a chance to start (sigh), # so that the remaining clients we start will start off as managed, # so that if we try to start a window as an icon, # there will be a window manager present to honour the request # (ugly, but how else can it be done ?) sleep 1 #turi# xclock -geometry 100x90+0+0 & # Note that any xterm we start here will have the proper stty settings # if we are coming from another xterm that is set up properly, since # xterm inherits stty settings from the terminal that calls it. # This also applies if we are coming from xinit since presumably the # original terminal was set up with the right erase and intr characters. # Start a couple xterms, on host where home directory really is. # Geometry determined by package's .Xresources hostname=`hostname` #turi# if [ "hostname" = "$X11_MFCFENV_HOMEHOST" ]; then #turi# xterm -name FirstTopXterm -title "TopXterm ($hostname)" & #turi# xterm -name FirstBottomXterm -title "BottomXterm ($hostname)" & #turi# else #turi# xterm -name FirstTopXterm -title "TopXterm ($X11_MFCFENV_HOMEHOST)" \ #turi# -e rlogin $X11_MFCFENV_HOMEHOST & #turi# xterm -name FirstBottomXterm -title "BottomXterm ($X11_MFCFENV_HOMEHOST)" \ #turi# -e rlogin $X11_MFCFENV_HOMEHOST & #turi# fi #turi# xmessage -iconic -geometry 620x600+100+75 -name Help \ #turi# -title 'Help' -b 'Click here to quit this help window' \ #turi# </software/x11-mfcfenv/data/help_files/main & # These are the things that one might normally start in a .login # to be run when one first logs in. # However an X session can sometimes involve (as it does in this case) # rlogins to other machines, and hence multiple login shells, # so those things that we want done just once per X "session" # are done here, in their own windows. # Make sure we get read_system_news PATH=`/bin/showpath newsreaders current`; export PATH # and wait for the other clients to start, # so that this one (it's "important" :-) will end up on top # (ugly, but how else can it be done ?) # Hey, it can be done with xwit! # Doesn't work. Xterm can still be slower to get going and come up later. sleep 5 xterm -name SystemNews -n "System News" \ -title "Important System News You Should Read First" \ -e read_system_news & #sleep 5 #xwit -names SystemNews & echo "Fin du fichier .xsession" #fin