pan-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pan-users] Quick question on using Pan on two computers


From: Duncan
Subject: Re: [Pan-users] Quick question on using Pan on two computers
Date: Tue, 19 Jul 2011 06:46:06 +0000 (UTC)
User-agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 9996aa7 branch-master)

Jeffrey Needle posted on Mon, 18 Jul 2011 22:19:05 -0700 as excerpted:

> I have a desktop computer and a netbook, both running Ubuntu Linux
> 10.04.  I have Pan installed on both systems.
> 
> Is there a way for me to copy Pan's settings from my desktop to my
> netbook so that I don't have to set it all up again?  I also want Pan to
> keep up between machines as to messages already read, etc.

pan's data dir is ~/.pan2/ by default. (You can change that by setting 
and exporting the PAN_HOME environmental variable such that it appears in 
pan's environment.  I used that, combined with some launcher scripts, to 
setup a number of separate pan instances, each of which has its own 
config, cache, etc, with symlinks to a common scorefile, accels.txt, 
etc.)  Everything's stored in that dir.

Pan's main settings are stored in xml files, preferences.xml for main 
preferences, with servers.xml, posting.xml, and group-preferences.xml 
containing the settings you'd expect from the name.

I already mentioned accels.txt, which contains a (not particularly 
organized) dump of your keyboard accelerator mappings.  That's of 
interest if you've customized them as I have.  Score is the scorefile, if 
you've setup any of those.  FWIW, pan's scorefile format is very close to 
that used by slrn and xnews.

The newsgroups.* files contain information about the available 
newsgroups, their descriptions (*.dsc), posting-allowed settings (*.ynm, 
yes/no/moderated), and for groups you've visited, the per-server xover 
numbers data (*.xov).

The (standard format) newsrc files, one per server, contain the 
subscribed group info and track read messages for groups you've visited 
(whether subscribed or not).  If you have more than one server, these 
could be confusing as by default they're numbered, not named to 
correspond with the server.  However, you can get the server-to-newsrc 
mapping from the servers.xml file, and even edit it there and change the 
names on the files (with pan closed, naturally) to reflect the server 
names instead of being numbered.  I did that with mine, here.

The tasks.nzb file is where pan tracks any scheduled tasks that haven't 
completed yet.  Again, this is standard *.nzb file format.

That's the files, now for the dirs:

The article_cache (or article-cache, IDK which is used currently but it 
switched at some point and I created a symlink one to the other) dir is 
just that, the article cache.  By default it's only 10 MB in size, tho 
it's possible to set a huge cache by directly editing the appropriate 
setting in preferences.xml and I have both my binary and text instances 
set to a cache size of gigabytes.

article-drafts is the default location for just that, drafts that you've 
saved while composing.  A new feature in current git that I don't believe 
has made it into a released version yet is draft auto-save, with that 
file found here as well, if you've a version with that feature.

encode-cache is associated with another new feature, not yet available in 
released versions and in fact still quite experimental.  pan (well, this 
experimental branch of it, anyway) now has the ability to attach 
binaries, which of course must be encoded to post, and this is the 
working dir associated with that feature.

The groups dir contains one file per active group, each of which contains 
the current headers for that group.  If you have your servers set to 
never expire headers and don't delete headers manually, or if you track 
groups with millions of articles these files can be tens or hundreds of 
megabytes each, tho on less active groups with a short expiration, 
they'll often be kilobytes, not megabytes.

Just transferring settings can be done by simply copying the *.xml files 
over (and possibly the newsgroups.dsc and ynm files if you don't want to 
re-download that info, plus the scorefile and accels.txt if you've 
customized them), tho you may wish to copy over the whole dir and thus 
all settings and current posts, etc, with it.

For keeping things in sync, you'll almost certainly want the newsrc files 
(keeping in mind that you'll need to have copied the servers.xml file 
over if you have more than one server, to keep the mappings between 
server and newsrc file straight, but servers.xml is a one-time copy).  
Also newsgroups.xov.

You may want the groups subdir synced as well, depending on your sync 
method and the room you have for storage if it's sneakernet not ssh or 
similar.

If you regularly add scores, you'll want to keep that synced too.

You can probably skip syncing the cache and drafts dirs, unless you want 
to work on the same drafts on both computers, etc.  Similarly, accels.txt, 
newsgroups.dsc and ynm, and tasks.nzb can probably be skipped (tho 
syncing the newsgroups files after doing a groups list refresh would 
avoid having to do that on both computers, but that's always a manual 
operation so it's only necessary if you've refreshed the groups list and 
find it easier to copy the files than to download the same data to the 
second computer).  And the *.xml files are a one-time copy, not necessary 
to keep synced unless you make changes and find it easier to simply copy 
them over than to make the same changes on both computers.


There is, however, another alternative that might or might not be easier 
for you.  If you never use pan on both machines at once (doing so 
complicates the idea of syncing anyway, so preferably don't), you can put 
the pan dir on a thumbdrive or other external drive.  You'd point pan at 
the new location instead of its default ~/.pan2/ using either the 
PAN_HOME variable as explained above, or with a simply symlink at the 
default location pointing to the appropriate dir on the mounted external 
drive.  That way, you don't have to worry about it as you're simply 
plugging in the same dataset for use on whichever computer you wish to 
run pan on at that moment.

However, do be aware that a lot of pan's files are either temporary 
(cache) or updated quite frequently, and flash drives have a limited 
number of write cycles so this will wear them out rather faster than you 
would with data that you save once and that just stays there for long 
periods.  But depending on the size of your pan dir and the other data 
you may wish to store as well, a 2 or 4 GB thumb drive might be plenty, 
and they're quite cheap. so it could still be worth it.

And of course if you use a portable conventional drive, perhaps a 2.5 
incher, that doesn't apply, since they are conventional magnetic media 
and writing to them many times doesn't wear them out significantly faster 
-- it's the power-cycles or hours running that typically counts as wear 
for them, not write cycles.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman




reply via email to

[Prev in Thread] Current Thread [Next in Thread]