[3717] in RedHat Linux List

home help back first fref pref prev next nref lref last post

Re: xdm

daemon@ATHENA.MIT.EDU (Wierdl Mate)
Sun Nov 10 11:31:23 1996

To: smurphy@stardust.bln.sub.org (Joerg Mertin), redhat-list@redhat.com
In-reply-to: Your message of "Sat, 09 Nov 1996 22:45:02 +0100."
             <m0vMLD4-0005nyC@stardust.bln.sub.org> 
Date: Sun, 10 Nov 1996 10:28:32 -0600
From: Wierdl Mate <matyi@wierdlmpc.msci.memphis.edu>
Resent-From: redhat-list@redhat.com
Reply-To: redhat-list@redhat.com

> According to Wierdl Mate:
> > For xdm, you need to do two things:
> > 
> > 1) Set up your environment in ~/.xsession (.xsession is read at 
> > login under xdm). Here is my .xsession:
> 
> Well, that nice, bu only the User will have the enviroenement. I make
> all this in /etc/X11/xdm Directory:
> 
> 
> 
> > 
> > #!/bin/bash
> > # begin ~/.xsession
> > 
> > # systemwide config
> > 
> >   if [ -f /etc/profile ]; then
> >     source /etc/profile
> >   fi
> > 
> > 
> >   if [ -f /etc/bashrc ]; then
> >     source /etc/bashrc
> >   fi
> > 
> > 
> > # my profile
> > 
> >   if [ -f ~/.bash_profile ]; then
> >     source ~/.bash_profile
> >   fi
> > 
> > # keymaps
> >   if [ -f ~/.Xmodmap ]; then
> >      xmodmap ~/.Xmodmap
> >   fi
> > 
> > # pland daemon for plan
> > 
> >   pland -k
> > 	 
> > rxvt &
> > 
> > xhost moni
> > xhost zebra
> ^^^^^^^^^^^^^Hmmm... Big Security Breach. Why not Create a .Xauthority
>  file in $HOME ??? I use the following Script for this. Each new
> X-Session uses it:
> 

Each new X-Session uses what? The script /usr/bin/newcookie?
So for each session an .Xauthority file is created?
Where do I put a command like
	xhost zebra
Is .xserverrc in fact ~/.xserverrc ?
I thought under xdm the X server is not restarted at every login 
(unless I specify this explicitly). 
So then how is the script below read at every X session?

Thanks for your help

Mate

> 
> --------------------------------------Cut------------------------------
> #!/bin/sh
> #
> # /usr/bin/newcookie
> # started in .xserverrc - Xserver startup file
> #
> HOST=`hostname`
> authfile="${XAUTHORITY-$HOME/.Xauthority}"
> chmod 600 "${authfile}"
> 
> gencookie='
> # generate random cookie from portable shell tools
>     ( ps -ael ; netstat -n ) |
>     compress |
>     tr "\100-\377" "\007-\077\001-\077\001-\077\001-\077" | 
>     tr "\001-\077" "9a-f0-9a-f0-9a-f0-9a-f0-9" |
>     fold -32 |
>     awk "{ l1=l2; l2=l3; l3=l4; l4=\$0; } END { print l1 }"
> '
> COOKIE="`eval \"$gencookie\"`"
> case "$COOKIE" in
>     ????????????????????????????????) ;;  # length is ok
>     *) echo "illegal cookie made!? please verify $0" >&2; exit 1 ;;
> esac
> xauth add :0 . "$COOKIE"
> xauth add ${HOST}:0 . "$COOKIE"
> 



--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
  ________________________________________________________________________
  http://www.redhat.com/RedHat-FAQ   http://www.redhat.com/RedHat-Errata
  http://www.redhat.com/RedHat-Tips  http://www.redhat.com/mailing-lists
  ------------------------------------------------------------------------
To unsubscribe: mail -s unsubscribe redhat-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post