maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   General (https://talk.maemo.org/forumdisplay.php?f=7)
-   -   have mail use ~/.signature as a signature ? (https://talk.maemo.org/showthread.php?t=64994)

wizzleteet 2010-11-03 15:18

have mail use ~/.signature as a signature ?
 
Hi All,

See subject, is it possible ?

Why ?
Cronjob runs python script every day on my linux box and crafts a fresh (text-based, but could also be html) signature.
You know, a fortune and other useless info =)
I would like to have that on my n900, please.

thx
wzzl

kureyon 2010-11-03 16:45

Re: have mail use ~/.signature as a signature ?
 
The signature is stored in that abomination known as gconf under "/apps/modest/accounts". You could write a little script to set it, but I'm not sure how to give it multiline values.

jacktanner 2010-11-03 17:00

Re: have mail use ~/.signature as a signature ?
 
Speaking of... My sig contains
Code:

<foo>
It gets rendered as
Code:

&lt;foo&gt;
. What gives?

kureyon 2010-11-03 17:03

Re: have mail use ~/.signature as a signature ?
 
Probably something to do with HTML (formatted text) mail.

v2px 2010-11-03 17:46

Re: have mail use ~/.signature as a signature ?
 
sorry for OT but..
gconf sucks :(

jacktanner 2010-11-03 19:32

Re: have mail use ~/.signature as a signature ?
 
I think this is related: https://bugs.maemo.org/show_bug.cgi?id=11451

Re: OP's question - can you have gconf keys that embed "\n" for newlines?

benny1967 2010-11-03 20:51

Re: have mail use ~/.signature as a signature ?
 
Quote:

Originally Posted by jacktanner (Post 862527)
Re: OP's question - can you have gconf keys that embed "\n" for newlines?

must be. my signature contains 3 lines, and it's displayed as 3 lines when i read it with gconftool-2

lma 2010-11-04 09:37

Re: have mail use ~/.signature as a signature ?
 
Bug 3941 has the same root cause. IMHO converting the message to HTML and back is completely broken behaviour :-(

kureyon 2010-11-04 09:45

Re: have mail use ~/.signature as a signature ?
 
Quote:

Originally Posted by benny1967 (Post 862597)
must be. my signature contains 3 lines, and it's displayed as 3 lines when i read it with gconftool-2

Yeah I know that :) Problem is how to use that pos gconftool-2 to set it?

I tried:

Code:

gconftool-2 --type=string --set /apps/modest/accounts/account_name/signature "name\ncompany\nwebsite"
This just appears in modest literally (with the \n not converted to newlines)

Also:

Code:

gconftool-2 --type=string --set /apps/modest/accounts/account_name/signature `echo -e "name\ncompany\nwebsite\n"`

Error setting value: Bad key or directory name: "company": Must begin with a slash (/)



Also if I use modest to edit the signature then do:

Code:

gconftool-2 --get /apps/modest/accounts/account_name/signature > sig.txt
and look at it in using "hexdump -c":

Code:

0000000  n  a  m  e  \n  c  o  m  p  a  n  y  \n  w  e  b
0000010  s  i  t  e  \n

Assuming that gconftool-2 --get gives a verbatim output then it appears that the signature is being stored as expected with no extraneous control codes or other junk.

I've been googling around on how to set multiline values, and values with control codes using gconftool-2 but most of the "relevant" hits were just a rehash of the manpage which itself is short of examples.

Allow me to quote a comment from one of the websites that I found:
Quote:

God bless gconf creators…

They had to feel really down to give the birth to such useless and obscure crap like gconf.
They said it was created to help administrators…I wonder if they asked firstly to some administrators if they would prefer plain clean text files instead of such rubbish.
That sums it up pretty neatly I think.

andresmp 2011-05-12 21:54

Re: have mail use ~/.signature as a signature ?
 
recovering old post.

so can I write script of some kind for the signature? kind of like the bash ones that can be done for evolution?


All times are GMT. The time now is 19:58.

vBulletin® Version 3.8.8