Subject: Re: FVWM: How do you run fvwm?

From: [email-masked]
Date: Wed, 7 Oct 98 14:56:30 +0000

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?

Bregards

Joe

> On Tue, 6 Oct 98 15:40:52 +0000
> [email-masked] 
> wrote concerning 'Re: FVWM: How do you run fvwm?':
> > Hello,
> > 
> >    Well I am running redhat 4.2 with the source of 2.0.35 and I am actually
> > trying to run fvwm95-2.
> > If you could send me a script I would greatly appreciate it.
> > 
> > The paths of my files are
> > 
> > #! /bin/sh
> > /usr/X11R6/bin/xterm
> > /usr/X11R6/bin/xbiff
> > exec /usr/lib/X11/fvwm95-2
> >
> 
> 
> Joseph
> 
> OK, I have RedHat 4.2 here, as well. You already have startx, in
> /usr/X11R6/bin.
> 
> 1. Make sure /usr/X11R6/bin is in your PATH.
> 2. Edit ~/.Xclients to look like this:
>     #!/bin/sh
>     xterm &
>     xbiff &
>     twm
> 
> and type startx.
> 
> twm is another window manager that will always be there. If this works
> we have a good start.
> 
> 3. Now find the executable for fvwm95-2. /usr/lib/X11 is a strange place
> for the executable to live. Are you sure it isn't in /usr/bin/X11
> (which is, in fact, just a symlink to /usr/X11R6/bin)?
> 
> Try substituting it for twm:
> 
>     #!/bin/sh
>     xterm &
>     xbiff &
>     fvwm95-2
> 
> 
> If none of this works send me the error messages and I'll try and figure
> out what went wrong.
> 
> Also, if you like, take a look at /usr/X11R6/bin/startx to see what it
> is doing. I'll send a copy of my simplified version later on when I have
> some more time.
> 
> 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: [email-masked] 
> Web: http://www.giccs.georgetown.edu/~ric/

--
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 [email-masked].
To report problems, send mail to [email-masked].

---

From: Richard Lister <[email-masked]>
Date: Wed, 07 Oct 1998 11:04:46 -0400

On Wed, 7 Oct 98 14:56:30 +0000
[email-masked] 
> I get a knew file.... Then when I run startx I get an error about Xclients

Yes. The system Xclients is in /usr/X11R6/lib/X11/xinit. As you will see
it is rather unnecessarily complex. However, if you create your own
.Xclients (note the dot at the front) it will override the system version.

I expect you are getting the error because your .Xclients hasn't got
executable permissions set. Do something like:

  chmod 755 .Xclients

or

  chmod u+x .Xclients

or some suitable executable permissions.

Good luck
Ric

Richard J Lister, Georgetown Institute for Cognitive and Computational Sciences

---

From: Kendrick Vargas <[email-masked]>
Date: Wed, 7 Oct 1998 11:28:04 -0400

> I get a knew file.... Then when I run startx I get an error about Xclients

yes, change the mode on the file so that it is executable. 

	chmod u+x .xsession

			-peace

--- BEGIN GEEK CODE BLOCK ------------+-----------
GAT d- s:+ !a C+(+++) UI/L/S/B++(+++) | "In the morning glad I see
P>+ L+(++) E---- W+++ N+ o? K? w++++  |  My foe outstrech'd beneath the tree."
O--- M-- V PS+++@ PE Y-- PGP+ t++ 5   |               -The Poison Tree
X++ R- tv+ b DI++ D+ G e>*  h*(!) r-  |                William Blake
y*(+) ------ END GEEK CODE BLOCK -----+

---

From: Richard Lister <[email-masked]>
Date: Wed, 07 Oct 1998 11:36:33 -0400

> I get a knew file.... Then when I run startx I get an error about Xclients

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

#!/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}