Re: FVWM: How do you run fvwm?

From: Richard Lister <ric_at_giccs.georgetown.edu>
Date: Wed, 07 Oct 1998 11:36:33 -0400

On Wed, 7 Oct 98 14:56:30 +0000
josephf_at_magpage.com
wrote concerning 'Re: FVWM: How do you run fvwm?':
> Richard,
>
> Where is the Xclients file stored? When I edit it from my home dir
> I get a knew file.... Then when I run startx I get an error about Xclients
> permission
> denied. Any thoughts?
>


As promised here are my stripped down versions of the xinit startup files.
I wrote these to provide a consistent and simple interface for my users
across several platforms.

startx lives in /usr/local/bin. It basically just runs xinit on the
xinitrc and xserverrc files. The user can override these files with
their own versions in ~/.xinitrc and ~/.xserverrc.

xinitrc, xserverrc and Xclients live in /usr/local/lib/xinit/. The
xinitrc sets up things like Xresources and xmodmap mappings, then
runs Xclients, or the user ~/.Xclients if it exists.

The vast majority of users just create their own .Xclients containing
a list of startup clients, then run startx.

(note: xsession is a nice program that starts the window manager for you
and then allows you to switch between window managers).

Ric

Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences
Georgetown University Medical Center, Washington, DC 20007, USA
Phone: +1 202-687 2878
Email: ric_at_giccs.georgetown.edu
Web: http://www.giccs.georgetown.edu/~ric/



#!/bin/sh
##
## xserverrc
## Ric Lister
## $Id: xserverrc,v 1.1 1997/07/21 15:11:36 ric Exp $
##
## Command for starting X server. The most interesting thing we do
## here is to turn on Xauthority, which is more secure than xhosts.
## See xauth(1) for details.

## generate an even random key
randomkey=`perl -e 'for (1..4) { \
                    srand(time+$$+$seed); \
                    printf("%4.5x", ($seed = int(rand(65536)))); } \
                    print "\n";'`

## add key to .Xauthority file
xauth add `hostname`/unix:0 . $randomkey
xauth add `hostname`:0 . $randomkey

## start X with xauth enabled
exec X -auth ${HOME}/.Xauthority


#!/bin/sh
##
## xinitrc
## Ric Lister
## $Id: xinitrc,v 1.1 1997/07/21 15:10:56 ric Exp $
##
## System xinitrc. Invoked by ./startx if user's .xinitrc doesn't exist.
## Keep it simple and start only basic clients.

## files
USER_XRESOURCES="${HOME}/.Xdefaults"
USER_XMODMAP="${HOME}/.xmodmaprc"

SYS_XCLIENTS="/usr/local/lib/xinit/Xclients"
USER_XCLIENTS="${HOME}/.Xclients"

## resources
if [ -f ${USER_XRESOURCES} ] ; then
    xrdb -load ${USER_XRESOURCES}
fi

## xmodmap
if [ -f ${USER_XMODMAP} ] ; then
    xmodmap ${USER_XMODMAP}
fi

## disable xhost so xauth works
xhost -

## now clients
if [ -f ${USER_XCLIENTS} ] ; then
    exec ${USER_XCLIENTS}
else
    if [ -f ${SYS_XCLIENTS} ] ; then
        exec ${SYS_XCLIENTS}
    else
        echo "System Xclients file missing, please contact sysadmin!!!"
        xterm &
        exec twm
     fi
fi


#!/bin/sh
##
## Xclients
## Ric Lister
## $Id: Xclients,v 1.1 1997/07/21 15:10:34 ric Exp $
##
## Basic set of clients for users.

xterm +cm -geometry 80x48+1+100 &
xterm +cm -geometry 80x48-1-1 &
xsetroot -solid MidnightBlue

exec xsession -defaultWM fvwm2


#!/bin/sh
##
## startx
## Ric Lister
## $Id: startx,v 1.1 1997/07/21 15:10:11 ric Exp $
##
## Ric's stripped-down tidied up version of /usr/X11R6/bin/startx.
## Does simple invocation of user's xinitrc and xserverrc, or
## calls appropriate system files.

## location of files
USER_XINITRC="${HOME}/.xinitrc"
USER_SERVERRC="${HOME}/.xserverrc"

SYS_XINITRC="/usr/local/lib/xinit/xinitrc"
SYS_SERVERRC="/usr/local/lib/xinit/xserverrc"

XINITRC=""
XSERVERRC=""

## check for user's xinitrc, else use system xinitrc
if [ -f ${USER_XINITRC} ] ; then
    XINITRC=${USER_XINITRC}
else
    if [ -f ${SYS_XINITRC} ]; then
        XINITRC=${SYS_XINITRC}
    fi
fi

## check for user's xserverrc, else use system xserverrc
if [ -f ${USER_SERVERRC} ] ; then
    XSERVERRC=${USER_SERVERRC}
else
    if [ -f ${SYS_SERVERRC} ] ; then
        XSERVERRC=${SYS_SERVERRC}
    fi
fi

## run it
exec xinit ${XINITRC} -- ${XSERVERRC}

--
Visit the official FVWM web page at <URL:http://www.hpc.uh.edu/fvwm/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to majordomo_at_hpc.uh.edu.
To report problems, send mail to fvwm-owner_at_hpc.uh.edu.
Received on Wed Oct 07 1998 - 10:43:30 BST

This archive was generated by hypermail 2.3.0 : Mon Aug 29 2016 - 19:38:01 BST