🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cmu.cs.general
Article #148

Help with .xinitrc problem

#148
From: Gerry Roston
Date: Tue, 06 Apr 1993 00:06
132 lines
4828 bytes
This is probably quite obvious, but...

I fire up X by exec'ing the following script:

--

#!/bin/csh

# choose window manager

cd $HOME

unalias goo
unalias gox

setenv DISPLAY          `hostname`:0.0
setenv WM               tvtwm
setenv BACKGROUND_IMAGE 0

if ("$1" == "o") then
    setenv WM olwm
else if ("$1" == "t") then
    setenv WM twm
endif

# choose X server
if ($0 == "/usr/gerry/bin/gox") then
    exec xinit -- $XHOME/bin/Xsun >&! .Xerrorlog
else if ($0 == "/usr/gerry/bin/goxi") then
    setenv BACKGROUND_IMAGE 1
    exec xinit -- $XHOME/bin/Xsun >&! .Xerrorlog
else if ($0 == "/usr/gerry/bin/goo") then
    exec xinit -- $OPENWINHOME/bin/xnews >&! .Xerrorlog
else
    unsetenv DISPLAY
    unsetenv WM
    set term = "sun"
endif

--

My .xinitrc file looks like this:

--

#!/bin/csh -f

#gpr .xsession, modified to support xnews and xsun
#stuff taken from dac global startup scripts and gs stuff

#set up system window defaults
xrdb -retain -load /usr/local/X11R5/lib/Xresources
xrdb -retain -merge .Xresources

xset m 4 6
xset b 100 300 50 &

xhost gramineae dreams frc2 gate

$WM &

#if ($BACKGROUND_IMAGE == "1") then 
#    rdisplay 900 /usr/gerry/images &
#endif

xsetroot -cursor /usr/gerry/bitmaps/pistol.xbc /usr/gerry/bitmaps/pistol.xbcm

#start some convenient windows
#if ($WM == "tvtwm") then
    xterm  -n "Shell-1" -title "Shell-1" -geom 90x59+0+106 &
    xterm  -n "Shell-2" -title "Shell-2" -geom 90x50-0-0 -iconic &
    xclock -geom 60x60-104+94 -analog &
    xbiff  -geom 60x60-168+94 -update 1 &
    xload  -nolabel -geom 100x60-0+0 &
    xterm  -n "Shell-3" -title "Shell-3" -geom 80x30-0+1370 &
    xmail  -geom +1200+50 &
    gemacs -w =90x65+1154+905 &
#else
#    xterm  -n "Shell-1" -title "Shell-1" -geom 90x59+0+106 &
#    xterm  -n "Shell-2" -title "Shell-2" -geom 90x50-0-0 -iconic &
#    xclock -geom 60x60-104+0 -analog &
#    xbiff  -geom 60x60-168+0 -update 1 &
#    xload  -nolabel -geom 100x60-0+0 &
#    xmail  -geom -iconic &
#    gemacs -w =90x65 -iconic &
#endif

#start the main window last, when it exits, X will exit
exec xterm  -geom 90x6+0+0 -fn fixed -C -ls -title CONSOLE -n CONSOLE

--

The problem is this: If I uncomment either section of the if'ed stuff,
X doesn't open. What happens is the screen changes to a uniform gray, 
the modified cursor appears, then I get logged out (since I exec'ed 
the script from my login shell).  Upon relogging in, .Xerrlog contains 
the following:  (note: the line number may not be "accurate" since I
put a bunch of echo lines in the file to try to help debug it.
Basically, read line 52 as last line in the file.) (Oh, with the
echo's in, it showed the one right after setting the cursor, but did
not show any that were withing the second if stuff, the first if stuff
having been commented out.)

--

gramineae being added to access control list
dreams being added to access control list
frc2 being added to access control list
gate being added to access control list
root set
/usr/gerry/.xinitrc: syntax error at line 52: `end of file' unexpected

waiting for X server to shut down 


--

The problem is probably quite obvious, but it has me completely
baffled. Your help in solving this problem would be greatly
appreciated.

--
Gerry Roston (gerry@cmu.edu)    | In the enlightened Age and in this Land of
Field Robotics Center,          | equal liberty it is our boast, that a man's
Carnegie Mellon University      | religious tenets will not forfeit the
Pittsburgh, PA, 15213           | protection of the Law, nor deprive him of the
(412) 268-3856                  | right of attaining and holding the highest
                                | Offices that are known in the United States.
The opinions expressed are mine | George Washington
and do not reflect the official | 
position of CMU, FRC, RedZone,  | 
or any other organization.      | 
Technical Details
Message-ID: <GERRY.93Apr5190633@onion.cmu.edu>
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!yale.edu!nigel.msen.com!sdd.hp.com!zaphod.mps.ohio-state.edu!swrinde!gatech!europa.eng.gtefsd.com!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!netnews.srv.cs.cmu.edu!gerry

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 103734,623077f50f134bea,start
X-Google-Attributes: gid103734,public
X-Google-Thread: fb37e,623077f50f134bea,start
X-Google-Attributes: gidfb37e,public
X-Google-ArrivalTime: 1993-04-05 17:07:08 PST
Newsgroups: cmu.cs.general,comp.windows.x
Path: arc1-ca.pugleaf.net!gmd.de!newsserver.jvnc.net!yale.edu!nigel.msen.com!sdd.hp.com!zaphod.mps.ohio-state.edu!swrinde!gatech!europa.eng.gtefsd.com!fs7.ece.cmu.edu!crabapple.srv.cs.cmu.edu!netnews.srv.cs.cmu.edu!gerry
From: gerry@cmu.edu (Gerry Roston)
Subject: Help with .xinitrc problem
Message-ID: <GERRY.93Apr5190633@onion.cmu.edu>
Sender: news@cs.cmu.edu (Usenet News System)
Nntp-Posting-Host: onion.frc.ri.cmu.edu
Reply-To: gerry@cmu.edu (Gerry Roston)
Organization: Field Robotics Center, CMU
Date: Tue, 6 Apr 1993 00:06:33 GMT
Lines: 132