<<< Date Index >>>     <<< Thread Index >>>

Re: mutt called from script does not more work...



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Wednesday, September 13 at 04:39 PM, quoth Michelle Konzack:
>Am 2006-09-09 12:48:48, schrieb cga2000:
>
>> Looks like you need to double-quote the string that follows the -c flag.
>> Otherwise, bash silently ignores whatever is specified after the mutt
>> command.
>
>The problem is, that the config string is read/sourced from a Config
>file like:
>
>MUA="mutt -F ${HOME}/.tdnewmsg/muttrc -f"
>TERMINAL="xterm -class XTerm -name XTerm -geometry 80x30+250+200 -xrm 
>*VT100*font6 -title mutt/tdnewmsg -n mutt -e bash -l -c "
>
>and then in the script I have:
>
>----8<--------------------------------------------------------------
>  if [ $? -eq 0 ] ; then
>    DIRSEL="+${RET}"
>    if   [ -n "${DISPLAY}" ] ; then
>      DISPLAY=${DISPLAY}

What is the purpose of setting the display variable to itself?

>      ${TERMINAL} ${MUA} ${DIRSEL} &

So change that to:

    ${TERMINAL} "${MUA}" ${DIRSEL} &

>> Did you touch anything on your machine that might have affected the
>> behavior of bash over the last few weeks..?
>
>The only thing I have changed was my ~/.Xresources/XTerm

In what way?

>And then there is a second problem:  My XTerm is white (like you
>have deleted all XTerm resources).  XTerm does not more read
>~/.Xresources/XTerm like before

Well, strictly speaking, xterm *never* read that file. The X server 
itself reads that file, and xterm just requests that information from 
the X server. That has particular importance if you're forwarding your 
X connection to a server not running on the same machine as those 
files are (for example, ssh'ing into another machine and running 
xterm---in that case, since xterm fetches that information from the X 
server, it will use the configuration of the server it's actually 
being displayed on, rather than the configuration files on the machine 
it's actually running on).

Now, some X servers, to avoid re-reading that file all the time, have 
a caching scheme that I don't fully understand, which can result in it 
appearing to ignore changes you've made to the file that it didn't 
detect for whatever reason.

In any case, the program to use to adjust and update your X-resource 
database (i.e. manually inform your X server of specific files) is 
xrdb. For example, say you ssh into a machine and run xterm. It 
doesn't look the same as it does when you run it locally on the 
machine you ssh'd into, because your X server isn't reading the remote 
config files. To inform it of the contents of those files, you can run 
the following command within your ssh session (i.e. on the remote 
system):

    xrdb -load .Xresources/XTerm

That will make a connection to your local X server and send it the 
information stored in the file on the remote system.

You can do the same thing locally to force the X server to re-read the 
files you've changed but that it appears to be ignoring.

~Kyle
- -- 
Preach the Gospel at all times and when necessary use words.
                                              -- St. Francis of Assisi
-----BEGIN PGP SIGNATURE-----
Comment: Thank you for using encryption!

iD8DBQFFCY9JBkIOoMqOI14RAk0uAJ4uUvaKSQAP15YOPXLHwiSzDnwM5gCgg79Y
FvOs2XI+Fs/RX/l2n4Ghrck=
=YqKQ
-----END PGP SIGNATURE-----