If i got it right, you should try exec xterm -c wp to ~/.xinitrc
"exec" replaces the running process, so if he uses this line before he starts his window manager, the wm won't start.
Before we go telling him how to modify his xinitrc, we need to know if he's even using one. As FlyingHappy has asked (twice now) "What DE/WM are you using?"
]]>My question is which file should I place this invoking command sequence in to start my script at every login in a terminator / xterm window? Recently I placed it in "~/.bashrc" but I realized it starts when I manually launch terminator / xterm.
HUH?
You want it to run with *every* terminal you open ... but not with the ones you open manually? Can you clarify that?
]]>I made a small bash script "wp" which upload files from a file list (~/uploads.txt), and comment them from the list when uploading is ready. It writes a log file in "~/uploads.log" and it invokes the program similar to "wget" but called "wput". I public it, maybe it is useful for others too:
#!/bin/bash
if [ -z $(pgrep ^wp$) ]
then
:
else
echo "wp script is already running!"
exit
fi
host="ftp://yourusername:yourpassword@ftp.your_ftp_server.com"
while read f;
do
ret=""
if [ "${f:0:1}" = "#" -o "$f"1 = 1 ]
then
if [ "$f"1 = 1 ]
then
#read command feed a lot of empty string, this line is to deal with them, empty command :
:
else
#first character is a remark sign in uploads.txt # then message -> :
echo "remark line skipped: "$f
fi
else
#while string $ret is empty
while [ -z "$ret" ]
do
wput "$f" --tries=-1 $host 2>&1|tee -a ~/uploads.log
ret=$(tail -n 1 ~/uploads.log|grep "FINISHED\|Nothing\|Skipped\|Transfered")
done
#if $ret is not empty then upload was successful -> comment the line in uploads.txt
if [ -n "$ret" ]
then
cat ~/uploads.txt > ~/uploads_bak.txt
awk -v f="$f" '{if ($0==f && $0!~/#/) print "#" $0; else print $0;}' ~/uploads_bak.txt > ~/uploads.txt
fi
fi
done < ~/uploads.txt
I would like to start this script called "wp" when I login, with this command sequence (avoiding multiple starting):
if [ -z $(pgrep ^wp$) ]
then
echo "starting wp script..."
wp
else
echo "wp script is already running!"
fi
My question is which file should I place this invoking command sequence in to start my script at every login in a terminator / xterm window? Recently I placed it in "~/.bashrc" but I realized it starts when I manually launch terminator / xterm.
]]>