bash/sh "exec" problem - startx doesn't work

bash/sh "exec" problem - startx doesn't work

Post by Mark Paul » Wed, 27 Jan 1999 04:00:00



I had startx working on my system at one time, but since then
something has broken.  After spending several hours fiddling,
I finally figured out "what" seems to broken, but I don't know why.
Maybe someone can help??

When I run startx (RH 5.2, w/XFree-3.3.3.1 RPM updates for my
Creative Labs TNT), I get a gray screen (XServer starts), and my
nice 'X' cursor, and there it sits.  My window manager never starts.
However, if I run xinit, and then run /etc/X11/xinit/Xclients in the
xterm that is started, my X comes up fully, with the window manager.
So, I went further.  My shell startup/identification string in
/etc/X11/xinit/xinitrc
is defined as #!/bin/sh, and in Xclients it's #!/bin/bash.  It appears
to me that somehow the "sh clone" is having problems doing
an "exec <script>" when the script is not the same shell.
If I change xinitrc to be #!/bin/bash, then I get a hangup in some
other script that it 'execs'.  I would really like to know what is
wrong here, and fix it, rather than have to manually edit all
my script files, and then have to re-edit them if I ever upgrade
any little software package.  Any info appreciated.

Thanks.

****   Please remove the NO.SPAM when replying   ****

 
 
 

bash/sh "exec" problem - startx doesn't work

Post by Glen Turne » Thu, 28 Jan 1999 04:00:00



> When I run startx (RH 5.2, w/XFree-3.3.3.1 RPM updates for my
> Creative Labs TNT), I get a gray screen (XServer starts), and my
> nice 'X' cursor, and there it sits.  My window manager never starts.
> However, if I run xinit, and then run /etc/X11/xinit/Xclients in the
> xterm that is started, my X comes up fully, with the window manager.
> So, I went further.  My shell startup/identification string in
> /etc/X11/xinit/xinitrc
> is defined as #!/bin/sh, and in Xclients it's #!/bin/bash.  It appears
> to me that somehow the "sh clone" is having problems doing
> an "exec <script>" when the script is not the same shell.
> If I change xinitrc to be #!/bin/bash, then I get a hangup in some
> other script that it 'execs'.  I would really like to know what is
> wrong here, and fix it, rather than have to manually edit all
> my script files, and then have to re-edit them if I ever upgrade
> any little software package.  Any info appreciated.

A good start is to set the root profiles back to the defaults.

Unfortunately, even setting "set -o noclobber" in the root
profiles can stop X starting.

 
 
 

bash/sh "exec" problem - startx doesn't work

Post by Tim Moor » Thu, 28 Jan 1999 04:00:00


% startx >& startx.log &

(or sh equiv)
--
[Replies: remove the dot(s)]

"Everything is permitted.  Nothing is forbidden."
                                   WS Burroughs.

 
 
 

1. Why doesn't echo "text" 'command' "more text" work?

                 ^                                        ^
Wrong quotes, should be -
   echo "You have" `grep Subject: /usr/spool/mail/me | wc -l` "messages."
or -
   echo "You have `grep Subject: /usr/spool/mail/me | wc -l` messages."

But, another problem is, if you've no mail, /usr/spool/mail/me does not
exist, leading grep to say:
   grep: can't open /usr/spool/mail/me
Wc will still report 0.

You might try -
   sh -c 'echo "You have `grep 2>/dev/null Subject: /usr/spool/mail/me | wc -l` messages."'

Hope this helps.

2. difference between set and setenv?

3. rpc problems

4. how to exec "login" from lowest level "sh" ?

5. Peer is not authorized to use remote address

6. Cannot use "exec bash" in /bin/sh on DECstation 5000

7. Newbie question about CC compiler

8. Why "$ read name < file_name" doesn't work in sh script ?

9. WHY 'exec "$REALFILE" ${1+"$@"}'

10. FTP works, but "ls" or "dir" doesn't ???

11. Apache and "exec cgi", "exec cmd".

12. startx "bash: startx: command not found"