and the answer is...
-----
bash.1[~]: cat .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/.local/bin:$HOME/bin
export PATH
# If there are no xeyes already running, then...
if ! pgrep xeyes > /dev/null ; then
# put one pair of xeyes in the upper right corner of the left monitor...
/usr/bin/xeyes -geometry 1000x150+1559+0 -fg black -center pink \
-outline black &
# and one pair of xeyes in the upper left corner of the right monitor.
/usr/bin/xeyes -geometry 1000x150+2560+0 -fg white -center black \
-outline red &
fi
# the end.
bash.2[~]:
-----
... and that's my final answer (I hope!). It works whether both users
are regular users or one user is root.
(regarding Patrick's, Ed's, Todd's, and Samuel's "pidof" suggestion)
I tried that too, after getting the above script done and tested. It
does work. I did mis-understand the -c option. But I think the main
problem was I was using the quotes and square brackets in the if line.
(Ed's question about mis-typing the single quote)
I used the key between the semi-colon key and the "enter" key, not the
key above the "tab" key. (Now I know that both were wrong!)
Apart from binders, functors, and functional programming, I'm an
excellent C++ programmer. But I've done hardly any shell script
programming. I did not know the meaning and use of the double quotes
and the square brackets in the if line. This is what caused me so much
trouble in my experimenting.
I'm tagging this thread SOLVED. I thank everyone who tried to help.
Bill.
_______________________________________________
users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/users@xxxxxxxxxxxxxxxxxxxxxxx