🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
13 messages
13 total messages Started by Peter J Ross Thu, 07 Feb 2008 23:25
[tin] How to change default User-Agent line?
#216588
Author: Peter J Ross
Date: Thu, 07 Feb 2008 23:25
28 lines
2179 bytes
If I post with tin, my User-Agent header looks like this:

	User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX)
	 (Linux/2.6.22-3-686 (i686))

I don't want all that information to be shown. In particular, I think
my kernel version is my business, not my readers', and I'm not running
UNIX, and I have no idea what "Dalaruan" means.

I'd like to be able to replace the line with

	User-Agent: tin/1.9.2-20070201

but my efforts at editing src/config.c, include/version.h etc have so
far produced nothing but an assortment of GCC errors when running
"make build".

I don't want to turn the "advertising" off completely, since I see no
reason to be ashamed of such excellent software, and I don't want to
use "x_headers", even if it's possible, since I want to set a default
for all users, not only myself.

Any suggestions?

-- 
PJR :-)

<http://pjr.lasnobberia.net/usenet/>
Re: [tin] How to change default User-Agent line?
#216590
Author: Sqwertz
Date: Thu, 07 Feb 2008 23:34
12 lines
1674 bytes
On Thu, 07 Feb 2008 23:25:51 +0000, Peter J Ross wrote:

> If I post with tin, my User-Agent header looks like this:
> 
> 	User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX)
> 	 (Linux/2.6.22-3-686 (i686))
> 
> I don't want all that information to be shown. 

Have you tried "advertising=off" in .tin/tinrc?

-sw
Re: [tin] How to change default User-Agent line?
#216589
Author: Sqwertz
Date: Thu, 07 Feb 2008 23:37
20 lines
1955 bytes
On Thu, 7 Feb 2008 17:34:34 -0600, Sqwertz wrote:

> On Thu, 07 Feb 2008 23:25:51 +0000, Peter J Ross wrote:
> 
>> If I post with tin, my User-Agent header looks like this:
>> 
>> 	User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX)
>> 	 (Linux/2.6.22-3-686 (i686))
>> 
>> I don't want all that information to be shown. 
> 
> Have you tried "advertising=off" in .tin/tinrc?

Oops.  I didn't read far enough to see that you already knew
about this.

I'd address why the build isn't working as that's probably your
only other solution.

-sw
Re: [tin] How to change default User-Agent line?
#216591
Author: Urs Janßen
Date: Fri, 08 Feb 2008 00:18
20 lines
2031 bytes
In <slrnfqn4rv.ore.pjr@pjr.motzarella.org>, Peter J Ross wrote:
> If I post with tin, my User-Agent header looks like this:
> 
>        User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX)
>         (Linux/2.6.22-3-686 (i686))
> 
> I don't want all that information to be shown. In particular, I think
> my kernel version is my business, not my readers', and I'm not running
> UNIX, and I have no idea what "Dalaruan" means.
> 
> I'd like to be able to replace the line with
> 
>        User-Agent: tin/1.9.2-20070201
> 
> but my efforts at editing src/config.c, include/version.h etc have so

the relevant code is in post.c:checknadd_headers()

        fprintf(fp_out, "User-Agent: %s/%s-%s (\"%s\") (%s)%s\n",
            PRODUCT, VERSION, RELEASEDATE, RELEASENAME, OSNAME, suffix);
Re: [tin] How to change default User-Agent line?
#216592
Author: Peter J Ross
Date: Fri, 08 Feb 2008 00:21
59 lines
3301 bytes
In news.software.readers on Thu, 7 Feb 2008 17:37:35 -0600, Sqwertz
<swertz@cluemail.compost> wrote:

> On Thu, 7 Feb 2008 17:34:34 -0600, Sqwertz wrote:
>
>> Have you tried "advertising=off" in .tin/tinrc?
>
> Oops.  I didn't read far enough to see that you already knew
> about this.

For years I've loved tin so much that I enjoy reading printouts of
tin's man pages in bed, but I'm only now becoming interested in the
source code.

> I'd address why the build isn't working as that's probably your
> only other solution.

I can continue playing with the source code for a few weeks (and
eventually make a patch), but I'm almost totally ignorant of C, 
so it's easier to ask the experts how to do it.

Oh, in case it helps:

$ tin -V
Version: tin 1.9.2 release 20070201 ("Dalaruan") Feb  7 2008 17:44:02
Platform:
        OS-Name  = "linux-gnu"
Compiler:
        CC       = "gcc"
        CFLAGS   = "-O2"
        CPP      = "gcc -E"
        CPPFLAGS = "-D_GNU_SOURCE"
Linker and Libraries:
        LD       = "gcc"
        LDFLAGS  = ""
        LIBS     = "-lncurses"
        PCRE     = "7.6 2008-01-28"
Characteristics:
        +NNTP_ABLE -NO_POSTING -BROKEN_LISTGROUP +XHDR_XREF
        -HAVE_FASCIST_NEWSADMIN -ENABLE_IPV6 -HAVE_COREFILE
        -NO_SHELL_ESCAPE -DISABLE_PRINTING -DONT_HAVE_PIPING
-NO_ETIQUETTE
        +HAVE_LONG_FILE_NAMES +APPEND_PID -HAVE_MH_MAIL_HANDLING
        +HAVE_ISPELL +HAVE_METAMAIL +HAVE_SUM
        +HAVE_COLOR -HAVE_PGP -HAVE_PGPK +HAVE_GPG
        -MIME_BREAK_LONG_LINES +MIME_STRICT_CHARSET
+CHARSET_CONVERSION
        +MULTIBYTE_ABLE -NO_LOCALE
        -USE_CANLOCK -EVIL_INSIDE -FORGERY -TINC_DNS -ENFORCE_RFC1034
        -REQUIRE_BRACKETS_IN_DOMAIN_LITERAL -FOLLOW_USEFOR_DRAFT

./configure options:
	--with-pcre=/usr/local/lib/ --with-screen=ncurses


-- 
PJR :-)

<http://pjr.lasnobberia.net/usenet/>
Re: [tin] How to change default User-Agent line?
#216596
Author: Peter J Ross
Date: Fri, 08 Feb 2008 01:30
37 lines
2515 bytes
In news.software.readers on Fri, 8 Feb 2008 00:18:39 +0000 (UTC), Urs
Janßen <urs@buil.tin.org> wrote:

> In <slrnfqn4rv.ore.pjr@pjr.motzarella.org>, Peter J Ross wrote:
>> If I post with tin, my User-Agent header looks like this:
>> 
>>        User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX)
>>         (Linux/2.6.22-3-686 (i686))
>> 
>> I don't want all that information to be shown. In particular, I think
>> my kernel version is my business, not my readers', and I'm not running
>> UNIX, and I have no idea what "Dalaruan" means.
>> 
>> I'd like to be able to replace the line with
>> 
>>        User-Agent: tin/1.9.2-20070201
>> 
>> but my efforts at editing src/config.c, include/version.h etc have so
>
> the relevant code is in post.c:checknadd_headers()
>
>         fprintf(fp_out, "User-Agent: %s/%s-%s (\"%s\") (%s)%s\n",
>             PRODUCT, VERSION, RELEASEDATE, RELEASENAME, OSNAME, suffix);

Thank you. So this should give me what I want:

#v+
	fprintf(fp_out, "User-Agent: %s/%s-%s\n",
		PRODUCT, VERSION, RELEASEDATE);
#v-

Am I right?

-- 
PJR :-)

<http://pjr.lasnobberia.net/usenet/>
Re: [tin] How to change default User-Agent line?
#216601
Author: Sqwertz
Date: Fri, 08 Feb 2008 03:53
63 lines
3475 bytes
On Fri, 08 Feb 2008 01:30:12 +0000, Peter J Ross wrote:

> In news.software.readers on Fri, 8 Feb 2008 00:18:39 +0000 (UTC), Urs
> Janßen <urs@buil.tin.org> wrote:
> 
>> In <slrnfqn4rv.ore.pjr@pjr.motzarella.org>, Peter J Ross wrote:
>>> If I post with tin, my User-Agent header looks like this:
>>> 
>>>        User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX)
>>>         (Linux/2.6.22-3-686 (i686))
>>> 
>>> I don't want all that information to be shown. In particular, I think
>>> my kernel version is my business, not my readers', and I'm not running
>>> UNIX, and I have no idea what "Dalaruan" means.
>>> 
>>> I'd like to be able to replace the line with
>>> 
>>>        User-Agent: tin/1.9.2-20070201
>>> 
>>> but my efforts at editing src/config.c, include/version.h etc have so
>>
>> the relevant code is in post.c:checknadd_headers()
>>
>>         fprintf(fp_out, "User-Agent: %s/%s-%s (\"%s\") (%s)%s\n",
>>             PRODUCT, VERSION, RELEASEDATE, RELEASENAME, OSNAME, suffix);
> 
> Thank you. So this should give me what I want:
> 
> #v+
> 	fprintf(fp_out, "User-Agent: %s/%s-%s\n",
> 		PRODUCT, VERSION, RELEASEDATE);
> #v-
> 
> Am I right?

That would do the same as advertising=off.  If you still wanted
advertising of the newsreader but not the OS/Version, change it
to:

fprintf(fp_out, "User-Agent: %s/%s-%s (\"%s\")\n",
    PRODUCT, VERSION, RELEASEDATE, RELEASENAME);

Would result in the header:

User-Agent: tin/1.9.2-20070201 ("Dalaruan")

Another "fancy" option is to just edit your existing executable
(/usr/local/bin/tin, or whatever) with a binary/hex editor - or
Emacs is what I'd use - and search for the string:

User-Agent: %s/%s-%s (\"%s\") (%s)%s\n  

and replace the last 9 characters of that string with 

"\n       "

That's \n with 7 spaces after it - no quotes

It's the brute forth method: Ugly, but it works.  And saves you
from building it from scratch, possibly breaking something else
in the meantime.

-sw
Re: [tin] How to change default User-Agent line?
#216603
Author: Sqwertz
Date: Fri, 08 Feb 2008 04:27
68 lines
3735 bytes
On Fri, 08 Feb 2008 03:53:54 GMT, Sqwertz wrote:

> On Fri, 08 Feb 2008 01:30:12 +0000, Peter J Ross wrote:
> 
>> In news.software.readers on Fri, 8 Feb 2008 00:18:39 +0000 (UTC), Urs
>> Janßen <urs@buil.tin.org> wrote:
>> 
>>> In <slrnfqn4rv.ore.pjr@pjr.motzarella.org>, Peter J Ross wrote:
>>>> If I post with tin, my User-Agent header looks like this:
>>>> 
>>>>        User-Agent: tin/1.9.2-20070201 ("Dalaruan") (UNIX)
>>>>         (Linux/2.6.22-3-686 (i686))
>>>> 
>>>> I don't want all that information to be shown. In particular, I think
>>>> my kernel version is my business, not my readers', and I'm not running
>>>> UNIX, and I have no idea what "Dalaruan" means.
>>>> 
>>>> I'd like to be able to replace the line with
>>>> 
>>>>        User-Agent: tin/1.9.2-20070201
>>>> 
>>>> but my efforts at editing src/config.c, include/version.h etc have so
>>>
>>> the relevant code is in post.c:checknadd_headers()
>>>
>>>         fprintf(fp_out, "User-Agent: %s/%s-%s (\"%s\") (%s)%s\n",
>>>             PRODUCT, VERSION, RELEASEDATE, RELEASENAME, OSNAME, suffix);
>> 
>> Thank you. So this should give me what I want:
>> 
>> #v+
>> 	fprintf(fp_out, "User-Agent: %s/%s-%s\n",
>> 		PRODUCT, VERSION, RELEASEDATE);
>> #v-
>> 
>> Am I right?
> 
> That would do the same as advertising=off.  

I'm having serious trouble reading this thread correctly.  I must
have been looking at the line above when I was proofing your
changes.  

Yes - you had it right the first time, then I repeated it.  Duh.

So as not to make my previous post a complete waste of time, I
still offer the alternative below:

> Another "fancy" option is to just edit your existing executable
> (/usr/local/bin/tin, or whatever) with a binary/hex editor - or
> Emacs is what I'd use - and search for the string:
> 
> User-Agent: %s/%s-%s (\"%s\") (%s)%s\n  
> 
> and replace the last 9 characters of that string with 
> 
> "\n       "
> 
> That's \n with 7 spaces after it - no quotes
> 
> It's the brute forth method: Ugly, but it works.  And saves you
> from building it from scratch, possibly breaking something else
> in the meantime.

I must have a hole in my head today.  Sorry for the confusion -
again.

-sw
Re: [tin] How to change default User-Agent line?
#216609
Author: Peter J Ross
Date: Fri, 08 Feb 2008 06:19
58 lines
3166 bytes
On Fri, 08 Feb 2008 04:27:08, Sqwertz <swertz@cluemail.compost> wrote:
> On Fri, 08 Feb 2008 03:53:54 GMT, Sqwertz wrote:
> 
>> On Fri, 08 Feb 2008 01:30:12 +0000, Peter J Ross wrote:
>> 
>>> Thank you. So this should give me what I want:
>>> 
>>> #v+
>>>      fprintf(fp_out, "User-Agent: %s/%s-%s\n",
>>>              PRODUCT, VERSION, RELEASEDATE);
>>> #v-
>>> 
>>> Am I right?
>> 
>> That would do the same as advertising=off.  
> 
> I'm having serious trouble reading this thread correctly.  I must
> have been looking at the line above when I was proofing your
> changes.  
>
> Yes - you had it right the first time, then I repeated it.  Duh.
 
So let's see how this post turns out.

> So as not to make my previous post a complete waste of time, I
> still offer the alternative below:
> 
>> Another "fancy" option is to just edit your existing executable
>> (/usr/local/bin/tin, or whatever) with a binary/hex editor - or
>> Emacs is what I'd use - and search for the string:
>> 
>> User-Agent: %s/%s-%s (\"%s\") (%s)%s\n  
>> 
>> and replace the last 9 characters of that string with 
>> 
>> "\n       "
>> 
>> That's \n with 7 spaces after it - no quotes
>> 
>> It's the brute forth method: Ugly, but it works.  And saves you
>> from building it from scratch, possibly breaking something else
>> in the meantime.

I much prefer to work with the source code, where I have some chance of
knowing what I'm doing.

However, I assume your method would work for anybody who's installed a binary
package.

> I must have a hole in my head today.  Sorry for the confusion -
> again.

Your correction arrived before I read your previous post, so I wasn't
confused. Thanks for your help.


-- 
PJR :-)
Re: [tin] How to change default User-Agent line?
#216618
Author: Sqwertz
Date: Fri, 08 Feb 2008 07:58
34 lines
2722 bytes
On Fri, 08 Feb 2008 06:19:38 +0000, Peter J Ross wrote:

> On Fri, 08 Feb 2008 04:27:08, Sqwertz <swertz@cluemail.compost> wrote:
>> On Fri, 08 Feb 2008 03:53:54 GMT, Sqwertz wrote:

>>> Another "fancy" option is to just edit your existing executable
>>> (/usr/local/bin/tin, or whatever) with a binary/hex editor - or
>>> Emacs is what I'd use - and search for the string:
>>> 
>>> User-Agent: %s/%s-%s (\"%s\") (%s)%s\n  
>>> 
>>> and replace the last 9 characters of that string with 
>>> 
>>> "\n       "
>>> 
>>> That's \n with 7 spaces after it - no quotes
>>> 
>>> It's the brute forth method: Ugly, but it works.  And saves you
>>> from building it from scratch, possibly breaking something else
>>> in the meantime.
> 
> I much prefer to work with the source code, where I have some chance of
> knowing what I'm doing.

I thought you were having troubles compiling it from source so I
offered the binary solution - no building necessary.

> However, I assume your method would work for anybody who's installed a binary
> package.

Yes.  I use this for similar situations where I don't have the
source to build the binary.

-sw
[OT] was Re: [tin] How to change default User-Agent line?
#216624
Author: bealoid
Date: Fri, 08 Feb 2008 12:43
19 lines
1679 bytes
Peter J Ross <pjr@example.invalid> wrote in 
news:slrnfqn4rv.ore.pjr@pjr.motzarella.org:

[snip]

> and I have no idea what "Dalaruan" means.

[snip]

This has nothing to do with your question.  Sorry.  

I had no idea what dalaruan meant, so I googled it. There's a few results, 
many of which appear to be whisky.  Which reminded me of this xkcd comic:
http://xkcd.com/323/

and while I was looking for that, I found this one:
http://xkcd.com/178/

One of the things I didn't like about Pan was the version naming. :-/
Re: [tin] How to change default User-Agent line?
#216654
Author: Robert Singers
Date: Fri, 08 Feb 2008 22:30
12 lines
2330 bytes
Between saving the world and having a spot of tea Peter J Ross said

> For years I've loved tin so much that I enjoy reading printouts of
> tin's man pages in bed, but I'm only now becoming interested in the
> source code.

There is something very very wrong in that.

-- 
rob singers
pull finger to reply
Foemina Erit Ruina Tua
Re: [tin] How to change default User-Agent line?
#216657
Author: Mike Dee
Date: Fri, 08 Feb 2008 23:59
10 lines
1562 bytes
In article <slrnfqn83r.ore.pjr@pjr.motzarella.org>,
 Peter J Ross <pjr@example.invalid> wrote:

> For years I've loved tin so much that I enjoy reading printouts of
> tin's man pages in bed

You're a sick man, Peter ;-)   <---- (Just kidding) :-)

-- 
dee
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads