l i n u x - u s e r s - g r o u p - o f - d a v i s
L U G O D
 
Next Meeting:
August 5: Social gathering
Next Installfest:
TBD
Latest News:
Jul. 4: July, August and September: Security, Photography and Programming for Kids
Page last updated:
2002 Oct 14 12:11

The following is an archive of a post made to our 'vox-tech mailing list' by one of its subscribers.

Report this post as spam:

(Enter your email address)
Re: [vox-tech] Re: Hello
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [vox-tech] Re: Hello



On Mon, Oct 14, 2002 at 10:06:49AM -0700, Peter Jay Salzman wrote:
> arda,
> 
> i don't think inittab is the right thing here.
> 
> i'm not sure what the right answer is, but you can try to put this in
> your .xinitrc:
> 
> exec /usr/X11R6/bin/twm
> exec xterm -e opera
> 
> however, i think the problem here might be that twm doesn't return
> (until it finishes), so the next line won't get executed.  come to think
> of it, try this if the above doesn't work:
> 
> exec /usr/X11R6/bin/twm &
> exec xterm -e opera

Pete, the "exec" command is a shell built-in that means, "replace me
with this program". In your first example, even if the twm command
spawned the window manager and promptly exited (which would be
counter-intuitive for window manager behavior), the next line could
*never* execute, because the script is no longer being run (having
been replaced by twm due to the "exec").

The second example will "work", since the & tells the shell to first
spawn off a child shell in the background, and then *that* will get
replaced by twm; but it still has the probably undesirable effect that
X will terminate, not upon twm's exit, but upon opera's.

The way .xinitrc scripts work is: the X server runs that script, and
when the script exits, so does the X server. So, typically, you want
to spawn off all commands in your .xinitrc (with "&") except the very
last one. Usually this last one is executed with "exec", and is the
*only* command to get "exec" (the "exec" is entirely optional, but it
enables one less process to be spawned). Once that final command
exits, the script is done, so X quits.

Most of the time, the window manager (or desktop session manager) is
the last command, because that's the one whose termination should
cause X to quit. This is not the problem you might think it would be:
it's perfectly okay to start up X-dependant programs before the window
manager is up. A lot of the time, the window manager may already be up
before the preceding commands have opened a window; other times, there
may be a brief moment when they come up without a title bar, frame,
etc; but they will immediately receive them when the WM comes up.

So, if I were Arda, and I went the .xinitrc route, I'd probably have
it read:

opera & # There's no need for "xterm" - also, the full path
        #to opera would be preferable
exec /usr/X11R6/bin/twm

HTH, HAND.
-Micah

<snip rest of Pete's message>

> begin Arda Ulas Unlu <ardaulas@yahoo.com> 
> > Hello
> > Sorry for disturbing.
> > I want to write the command(s) to restart the xserver and at the next login I want the xserver to
> > open the Opera browser, as first job after the system is up. The inittab didn't work, (if it is
> > right to modify it).
> > 
> > Any help, suggestions are appreciated.
_______________________________________________
vox-tech mailing list
vox-tech@lists.lugod.org
http://lists.lugod.org/mailman/listinfo/vox-tech



LinkedIn
LUGOD Group on LinkedIn
Sign up for LUGOD event announcements
Your email address:
facebook
LUGOD Group on Facebook
'Like' LUGOD on Facebook:

Hosting provided by:
Sunset Systems
Sunset Systems offers preconfigured Linux systems, remote system administration and custom software development.

LUGOD: Linux Users' Group of Davis
PO Box 2082, Davis, CA 95617
Contact Us

LUGOD is a 501(c)7 non-profit organization
based in Davis, California
and serving the Sacramento area.
"Linux" is a trademark of Linus Torvalds.

Sponsored in part by:
EDGE Tech Corp.
For donating some give-aways for our meetings.