[opensuse] Email signature command execution help
Hi, I have a file in /home that I use as a signature file. Whatever I write in there is displayed as my signature. In the signature, as you can see below, I would like to have the current machine uptime displayed when the message is put into the Outbox before being sent. I thought that just entering the #!/bin/bash would make it a script. Heck, I even made the file execuatable by the user(me). How can I get a command, like 'uptime, to execute in a text file whenever the text file is used? Should I leave out the # in the #!/bin/bash command? How can I achieve this and which man pages would assist? Tnx -- #!/bin/bash echo "=================================================================" echo "Using unpatched SuSE 9.2 Professional with KDE and Mozilla 1.7.2" echo "Linux user # 229959 at http://counter.li.org" uptime echo "=================================================================" --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Friday 2006-11-10 at 16:11 +0200, Hylton Conacher(ZR1HPC) wrote:
How can I achieve this and which man pages would assist?
As you are using Mozilla/5.0, you must look it up in the Mozilla setup. It may be possible or not, it depends totally on the mail program you use. - -- Cheers, Carlos E. R. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFVJ/ptTMYHG2NR9URAq+MAJ9byq6PkepTq7uLH6koRY6jRCc0YQCeKAK4 AM7JO49ilyqio7ztBQDr7eA= =Oj7r -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2006-11-10 08:11, Hylton Conacher(ZR1HPC) wrote:
Hi,
I have a file in /home that I use as a signature file. Whatever I write in there is displayed as my signature. Since you are using Mozilla, AFAICT that is your only choice. Mozilla does not seem to have an option to sign a message with the results of an executable file.
There may be add-ons or extensions that will give that option, but I have yet to run across any. -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Darryl Gregorash wrote:
On 2006-11-10 08:11, Hylton Conacher(ZR1HPC) wrote:
Hi,
I have a file in /home that I use as a signature file. Whatever I write in there is displayed as my signature. Since you are using Mozilla, AFAICT that is your only choice. Mozilla does not seem to have an option to sign a message with the results of an executable file.
There may be add-ons or extensions that will give that option, but I have yet to run across any.
I missed previous posts in this thread, but in Mozilla/TB under Account Settings you have the item Attach this Signature where you can specify the file to attach as the sig. Wouldn't selecting the file containing the output from the executable is what is required here? Cheers. -- "This week, on Tuesday night, in an ironic turnaround, Iraq brought regime change to the U.S." Amy Poehler --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sunday 12 November 2006 9:07 pm, Basil Chupin wrote:
I missed previous posts in this thread, but in Mozilla/TB under Account Settings you have the item Attach this Signature where you can specify the file to attach as the sig. Wouldn't selecting the file containing the output from the executable is what is required here?
Not with the same effect. Something external would have to trigger the executable to fire off so it would output to the file being attached. For example, Kmail lets one specify an executable script to execute, then it uses the output as the signature. Many people put the output of uptime into their sig, so their sig contains the exact uptime at the time that they replied to the message with the sig on it. With your suggestion, to achieve the same effect one would have to have this 'signature' script running in the background, say with cron, every minute or so dumping the output to a text file that is the file specified as the signature attach file in Mozilla/TB. Course, this assumes that Mozilla/TB doesn't cache that file, in which case even the cron example wouldn't work. Scott -- Id est mihi, id non est tibi! POPFile, the OpenSource EMail Classifier http://popfile.sourceforge.net/ Linux 2.6.13-15.12-default x86_64 SUSE LINUX 10.0 (X86-64) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Scott Leighton wrote:
On Sunday 12 November 2006 9:07 pm, Basil Chupin wrote:
I missed previous posts in this thread, but in Mozilla/TB under Account Settings you have the item Attach this Signature where you can specify the file to attach as the sig. Wouldn't selecting the file containing the output from the executable is what is required here?
Not with the same effect. Something external would have to trigger the executable to fire off so it would output to the file being attached.
For example, Kmail lets one specify an executable script to execute, then it uses the output as the signature. Many people put the output of uptime into their sig, so their sig contains the exact uptime at the time that they replied to the message with the sig on it.
With your suggestion, to achieve the same effect one would have to have this 'signature' script running in the background, say with cron, every minute or so dumping the output to a text file that is the file specified as the signature attach file in Mozilla/TB. Course, this assumes that Mozilla/TB doesn't cache that file, in which case even the cron example wouldn't work.
Ah, OK. I think what you may be looking for is this extension for TB: Signature 0.4.0.4.200610221528 which you will find by going to- https://addons.mozilla.org/search.php?cat=36&app=thunderbird&appfilter=thunderbird&type=E Cheers. -- "This week, on Tuesday night, in an ironic turnaround, Iraq brought regime change to the U.S." Amy Poehler --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Basil Chupin wrote:
Scott Leighton wrote:
On Sunday 12 November 2006 9:07 pm, Basil Chupin wrote:
I missed previous posts in this thread, but in Mozilla/TB under Account Settings you have the item Attach this Signature where you can specify the file to attach as the sig. Wouldn't selecting the file containing the output from the executable is what is required here?
Not with the same effect. Something external would have to trigger the executable to fire off so it would output to the file being attached. For example, Kmail lets one specify an executable script to execute, then it uses the output as the signature. Many people put the output of uptime into their sig, so their sig contains the exact uptime at the time that they replied to the message with the sig on it. With your suggestion, to achieve the same effect one would have to have this 'signature' script running in the background, say with cron, every minute or so dumping the output to a text file that is the file specified as the signature attach file in Mozilla/TB. Course, this assumes that Mozilla/TB doesn't cache that file, in which case even the cron example wouldn't work.
Ah, OK.
I think what you may be looking for is this extension for TB:
Signature 0.4.0.4.200610221528
which you will find by going to-
https://addons.mozilla.org/search.php?cat=36&app=thunderbird&appfilter=thunderbird&type=E Tnx Basil,
I'll have a look there. -- ======================================================================== Using SuSE 9.2 Professional with KDE and Mozilla 1.7.13 Linux user # 229959 at http://counter.li.org ======================================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Scott Leighton wrote:
On Sunday 12 November 2006 9:07 pm, Basil Chupin wrote:
I missed previous posts in this thread, but in Mozilla/TB under Account Settings you have the item Attach this Signature where you can specify the file to attach as the sig. Wouldn't selecting the file containing the output from the executable is what is required here?
Not with the same effect. Something external would have to trigger the executable to fire off so it would output to the file being attached.
[pruned] You may also want to have a look at extensions called- Time Stamp Signature Switch Quicktext Cheers. -- "This week, on Tuesday night, in an ironic turnaround, Iraq brought regime change to the U.S." Amy Poehler --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, Nov 12, 2006 at 09:29:01PM -0800, Scott Leighton wrote:
With your suggestion, to achieve the same effect one would have to have this 'signature' script running in the background, say with cron, every minute or so dumping the output to a text file that is the file specified as the signature attach file in Mozilla/TB. Course, this assumes that Mozilla/TB doesn't cache that file, in which case even the cron example wouldn't work.
No, use a 'named pipe'. [man mkfifo] That will run a command as if it were a file (like ~/.signature) or run a file as if it were a command. houghi -- To have a nice mailinglist experience, follow the guidelines below:
Please do not toppost. Please turn off HTML Read http://en.opensuse.org/Opensuse_mailing_list_netiquette Read http://www.catb.org/~esr/faqs/smart-questions.html
To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sun, Nov 12, 2006 at 09:29:01PM -0800, Scott Leighton wrote:
With your suggestion, to achieve the same effect one would have to have this 'signature' script running in the background, say with cron, every minute or so dumping the output to a text file that is the file specified as the signature attach file in Mozilla/TB. Course, this assumes that Mozilla/TB doesn't cache that file, in which case even the cron example wouldn't work.
No, use a 'named pipe'. [man mkfifo] That will run a command as if it were a file (like ~/.signature) or run a file as if it were a command. Maybe I am missing something. The best I can do is to make a fifo, "mkfifo -m <permissions> fifoname", set Mozilla/TB to read that as the signature file, then create a shell script, scriptname, and finally
On 2006-11-13 01:42, houghi wrote: periodically run <path>/scriptname >> fifoname Are you sure this is no different than simply running a cron to overwrite the signature file, if Mozilla/TB caches what it reads? (Not that it should be doing any such caching at all, but lately I've begun to wonder about some of the things it does do :-) ) Still, this is something that should be integral to the useragent, not something that has to be faked in any way, particularly in such a non-trivial way. I doubt such options are even open to Windows users. -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Darryl Gregorash wrote:
On Sun, Nov 12, 2006 at 09:29:01PM -0800, Scott Leighton wrote:
With your suggestion, to achieve the same effect one would have to have this 'signature' script running in the background, say with cron, every minute or so dumping the output to a text file that is the file specified as the signature attach file in Mozilla/TB. Course, this assumes that Mozilla/TB doesn't cache that file, in which case even the cron example wouldn't work.
No, use a 'named pipe'. [man mkfifo] That will run a command as if it were a file (like ~/.signature) or run a file as if it were a command. Maybe I am missing something. The best I can do is to make a fifo, "mkfifo -m <permissions> fifoname", set Mozilla/TB to read that as the signature file, then create a shell script, scriptname, and finally
On 2006-11-13 01:42, houghi wrote: periodically run
<path>/scriptname >> fifoname
Are you sure this is no different than simply running a cron to overwrite the signature file, if Mozilla/TB caches what it reads? (Not that it should be doing any such caching at all, but lately I've begun to wonder about some of the things it does do :-) )
It doesn't cache the sig file. You can write a new one, put its name in the Attach this Signature box, pretend to write a new message and the new sig will be at the bottom on the msg. [pruned] Cheers. -- If you really want to know, you won't ask me. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2006-11-13 22:57, Basil Chupin wrote:
It doesn't cache the sig file. You can write a new one, put its name in the Attach this Signature box, pretend to write a new message and the new sig will be at the bottom on the msg.
So, apart from the cosmetics, using a named pipe as the signature file and overwriting the signature are identical. OK, Hylton has two methods now to get what he wants in his signature :-) -- Personally, I don't give a rat's behind about bragging my uptime to anyone, but who am I to criticize? ;-) --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tue, Nov 14, 2006 at 12:48:39AM -0600, Darryl Gregorash wrote:
On 2006-11-13 22:57, Basil Chupin wrote:
It doesn't cache the sig file. You can write a new one, put its name in the Attach this Signature box, pretend to write a new message and the new sig will be at the bottom on the msg.
So, apart from the cosmetics, using a named pipe as the signature file and overwriting the signature are identical. OK, Hylton has two methods now to get what he wants in his signature :-)
Yes. But cron will do it each time interval (e.g. each minute) even if it is not needed. This means if you send two mails within that minute, you have the same signature. If you don't send an email, there is unneeded activity. With fifo you will only get a new signature when there is a request. houghi -- To have a nice mailinglist experience, follow the guidelines below:
Please do not toppost. Please turn off HTML Read http://en.opensuse.org/Opensuse_mailing_list_netiquette Read http://www.catb.org/~esr/faqs/smart-questions.html
To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2006-11-14 01:59, houghi wrote:
With fifo you will only get a new signature when there is a request.
OK, this is what I cannot figure out how to do. -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Tue, 14 Nov 2006, by raven@accesscomm.ca:
On 2006-11-14 01:59, houghi wrote:
With fifo you will only get a new signature when there is a request.
OK, this is what I cannot figure out how to do.
Very simply put: $ mkfifo sig $ l sig prw-r--r-- 1 theo users 0 Nov 14 22:29 sig| $ while [ 1 ];do uptime >sig;done & $ read sigline < sig $ echo $sigline 10:31pm up 3:44, 5 users, load average: 0.05, 0.22, 0.16 Every time you read from sig you get an updated line, or lines if you feed more in the fifo. Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131 SUSE 9.2 + Jabber: muadib@jabber.xs4all.nl Kernel 2.6.8 + See headers for PGP/GPG info. Claimer: any email I receive will become my property. Disclaimers do not apply. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2006-11-14 15:33, Theo v. Werkhoven wrote:
$ mkfifo sig
$ l sig prw-r--r-- 1 theo users 0 Nov 14 22:29 sig|
$ while [ 1 ];do uptime >sig;done &
$ read sigline < sig
$ echo $sigline
OK, but that is hardly useful in the context of this thread. Since I cannot simply tell Mozilla/Seamonkey/Thunderbird to insert the result of running uptime, I can hardly tell it to execute "read sigline". The end result must be a file, and I do not know if a named pipe qualifies as a file in mozilla's language. If it does, then I can just insert "sig" as the signature file, but I am not prepared to go through the exercise. I will leave that to Hylton, if he is interested. -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Tue, 14 Nov 2006, by raven@accesscomm.ca:
On 2006-11-14 15:33, Theo v. Werkhoven wrote:
$ mkfifo sig
$ l sig prw-r--r-- 1 theo users 0 Nov 14 22:29 sig|
$ while [ 1 ];do uptime >sig;done &
$ read sigline < sig
$ echo $sigline
OK, but that is hardly useful in the context of this thread. Since I cannot simply tell Mozilla/Seamonkey/Thunderbird to insert the result of running uptime, I can hardly tell it to execute "read sigline".
I thought the questioneer's problem was that he didn't know how to use FIFos. That was what my answer was for.
The end result must be a file, and I do not know if a named pipe qualifies as a file in mozilla's language. If it does, then I can just insert "sig" as the signature file, but I am not prepared to go through the exercise. I will leave that to Hylton, if he is interested.
So will I. Theo -- Theo v. Werkhoven Registered Linux user# 99872 http://counter.li.org ICBM 52 13 26N , 4 29 47E. + ICQ: 277217131 SUSE 9.2 + Jabber: muadib@jabber.xs4all.nl Kernel 2.6.8 + See headers for PGP/GPG info. Claimer: any email I receive will become my property. Disclaimers do not apply. --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2006-11-14 17:20, Theo v. Werkhoven wrote:
<snip> I thought the questioneer's problem was that he didn't know how to use FIFos. That was what my answer was for.
That was my question, after it was suggested as an alternative to the OP's problem, his signature :-) -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2006-11-14 17:20, Theo v. Werkhoven wrote:
Tue, 14 Nov 2006, by raven@accesscomm.ca:
<snip>
The end result must be a file, and I do not know if a named pipe qualifies as a file in mozilla's language. If it does, then I can just insert "sig" as the signature file, but I am not prepared to go through the exercise. I will leave that to Hylton, if he is interested.
So will I.
Well, I tried it anyway.. trying to read a named pipe in Seamonkey just hangs. -- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Tuesday 14 November 2006 19:00, Darryl Gregorash wrote:
On 2006-11-14 17:20, Theo v. Werkhoven wrote:
Tue, 14 Nov 2006, by raven@accesscomm.ca:
<snip>
The end result must be a file, and I do not know if a named pipe qualifies as a file in mozilla's language. If it does, then I can just insert "sig" as the signature file, but I am not prepared to go through the exercise. I will leave that to Hylton, if he is interested.
So will I.
Well, I tried it anyway.. trying to read a named pipe in Seamonkey just hangs.
Pipe semantics are perhaps a bit odd. Readers block if there's at least one writer present (i.e., a process that has the pipe open for writing). If there are no writers, readers get and EOF (reads immediately return a count of 0 bytes read). If a writer writes when there are no readers present, the write is discarded and the writing process is sent a SIGPIPE. Writers will block once they reach the high-water mark for pipes, which is something in the 8-16 K mark (I'm guessing--it may be higher these days). If there are multiple writers, there are no guarantees about relative ordering of concurrent writes. Likewise for multiple readers, but no byte written will be read by more than one reader. If you want to use pipes, you need to keep these things in mind. Named pipes are no different than conventional ones, except that the reader and writers need have no common process parentage from which to have inherited the open pipe descriptors. Randall Schulz --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Tuesday 2006-11-14 at 17:07 -0600, Darryl Gregorash wrote:
The end result must be a file, and I do not know if a named pipe qualifies as a file in mozilla's language. If it does, then I can just insert "sig" as the signature file, but I am not prepared to go through the exercise. I will leave that to Hylton, if he is interested.
It does not work with Pine, I was curious enough to test it. cer@nimrodel:~> mkfifo signature.autoupdate cer@nimrodel:~> l signature.autoupdate cer@nimrodel:~> while [ 1 ];do uptime > signature.autoupdate ; done & [1] 22026 cer@nimrodel:~> cat signature.autoupdate 12:59am up 12 days 1:43, 25 users, load average: 0.32, 0.66, 0.66 cer@nimrodel:~> cat signature.autoupdate 12:59am up 12 days 1:43, 25 users, load average: 0.29, 0.65, 0.66 Then I setup pine to use the "signature.autoupdate" file: Set Signature = signature.autoupdate The result you can see below: empty (two empty lines below the dashes). - -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFFWlsytTMYHG2NR9URAk7SAJoCSSdu8yAIUEM7M1fLQV6CVYFaTQCfWGpN g5fSYboAn4OrXCoXG+VJBg8= =K3GS -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Darryl Gregorash wrote:
<snip>
So, apart from the cosmetics, using a named pipe as the signature file and overwriting the signature are identical. OK, Hylton has two methods now to get what he wants in his signature :-)
mmm, Tnx all and it would seem esp houghi. -- ======================================================================== Using SuSE 9.2 Professional with KDE and Mozilla Messenger 1.7.13 Linux user # 229959 at http://counter.li.org ======================================================================== -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (8)
-
Basil Chupin
-
Carlos E. R.
-
Darryl Gregorash
-
houghi
-
Hylton Conacher(ZR1HPC)
-
Randall R Schulz
-
Scott Leighton
-
Theo v. Werkhoven