[comp.windows.x] Beginner's X Question

gallivan@uiucdcsp.cs.uiuc.edu (02/11/88)

beginner's X question...

I'm using X11 on a Sun 3/50, and want just to be able to write out bitmaps.
What I'm doing is getting the defaults from the root window and using these
to set up the fields in an image structure.  Then I write the image to the
root window.  It works fine except the upper right corner of the screen is
not painted with the bitmap.  The fixes (should) have been added up through
no. 90.  ?????????    

bohler@police.rutgers.edu (BOHLER) (11/17/89)

I have just begun to use X-windows and have a basic question that I
cannot solve from the manuals.  If anyone has the time and
consideration
to answer, I would be greatful.
So here goes:
What is the name and location of the file where one gives the x
startup the commands to do certain things (i.e. open up a window with
Emacs running in it, declare a raster file background upon
initialization, etc.) I know the commands but am not sure where X
looks for them.  Thanks for anyone's help.

Stephen Bohler.

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (11/17/89)

> What is the name and location of the file where one gives the x
> startup the commands to do certain things (i.e. open up a window with
> Emacs running in it, declare a raster file background upon
> initialization, etc.) I know the commands but am not sure where X
> looks for them.  Thanks for anyone's help.

If you are running Xdm then the file is: ~/.xsession

Otherwise you will have to put those commands in your .login file.


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213

klee@chico.pa.dec.com (Ken Lee) (11/17/89)

In article <Nov.16.11.34.41.1989.1662@police.rutgers.edu>,
bohler@police.rutgers.edu (BOHLER) writes:
> What is the name and location of the file where one gives the x
> startup the commands to do certain things (i.e. open up a window with
> Emacs running in it, declare a raster file background upon
> initialization, etc.) 

This is the job of your session manager.  The DECwindows dxsession
defaults to .X11Startup in your home directory, but you can change
that.  The MIT xdm uses .xsession.  Other session managers may use
other files.  If you're not using a session manager, you can always
just run a shell script by hand.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@decwrl.dec.com
uucp: uunet!decwrl!klee

montnaro@sprite.crd.ge.com (Skip Montanaro) (11/17/89)

If you're not running a session manager of some sort, you can put commands
to be executed upon server startup in ~/.xinitrc. Normally, any persistent
commands are placed in the background, except the window manager, which is
run last. When you exit the window manager, xinit will exit also.

A simple example:

#!/bin/sh

if [ -f $HOME/.Xres ] ; then
    xrdb -load $HOME/.Xres
fi

# zip the pointer around the screen
xset m 5 5

# terminal emulator to run system commands and accept console messages
xterm -C -geometry 80x40+5-5&

# normal editing emacs
emacs -geometry 80x69-5-5 &

# and a window manager
startupfile=$HOME/.awmrc-`hostname`
if [ ! -r $startupfile ] ; then
    startupfile=$HOME/.awmrc
fi
/usr/bin/X11/awm -f $startupfile

--
Skip Montanaro (montanaro@crdgw1.ge.com)

nancie@hal.CSS.GOV (Nancie Matson) (11/21/89)

>
> What is the name and location of the file where one gives the x
> startup the commands to do certain things (i.e. open up a window with
> Emacs running in it, declare a raster file background upon
> initialization, etc.) I know the commands but am not sure where X
> looks for them.  Thanks for anyone's help.
>

You can create an ~/.xinitrc file and put the command in there, or
use the ~/.xsession file.

Hope this helps!

nancie
nancie@hal.CSS.GOV