MyPhoneExplorer and Thunderbird under Linux

For user who dont speak german please use this part of my forum
matthias
Beiträge: 110
Registriert: Sa 8. Nov 2008, 13:04

Beitrag von matthias »

So, you are able to synchronize the contacts without any Problems, even though thunderbird on linux is running?
Pastim hat geschrieben: The Windows thunderbird never actually runs apart from the very 1st time it is installed. There is no need to set up an account with it. All it does is take up some space, with some links to the real linux thunderbird files. I do not know of any other way to get this to work. It's been fine for several years now, whether or not the linux thunderbird is running or not.
In fact TB-Win runs every time you sync your contacts and for TB-Linux it is like a foreign application that modifies the contacts. Therefore (as stated in the first post) there might be some problems that arise because of that..

Furthermore, I stumbled over this thread and read FJ's post about the actions MPE takes to interact with TB. According to the manuals, most of the steps are already possible to communicate between MPE in Wine and TB in Linux. So it would be possible to get a clean solution running (which i would highly favor). Maybe it would need some adaptions in MPE and the Addon, but FJ already stated (in Okt. 2014) that he might consider such adaptions.

Greetings Matthias
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

matthias hat geschrieben:So, you are able to synchronize the contacts without any Problems, even though thunderbird on linux is running?
Pastim hat geschrieben: The Windows thunderbird never actually runs apart from the very 1st time it is installed. There is no need to set up an account with it. All it does is take up some space, with some links to the real linux thunderbird files. I do not know of any other way to get this to work. It's been fine for several years now, whether or not the linux thunderbird is running or not.
In fact TB-Win runs every time you sync your contacts and for TB-Linux it is like a foreign application that modifies the contacts. Therefore (as stated in the first post) there might be some problems that arise because of that..

Furthermore, I stumbled over this thread and read FJ's post about the actions MPE takes to interact with TB. According to the manuals, most of the steps are already possible to communicate between MPE in Wine and TB in Linux. So it would be possible to get a clean solution running (which i would highly favor). Maybe it would need some adaptions in MPE and the Addon, but FJ already stated (in Okt. 2014) that he might consider such adaptions.

Greetings Matthias
Well, well. I never knew the TB windows version ran when syncing. I just checked, and yes, it does, very very briefly. It's never given me problems, whether TB linux was running or not, so I never thought to check.
TreeNode
Beiträge: 8
Registriert: Fr 12. Mai 2017, 19:59

Beitrag von TreeNode »

Hey,

I think I managed to sync the calendar of Linux Thunderbird without installing Thunderbird in wine.
I use MyPhoneExplorer 1.8.8, Wine 2.0.1 and winetricks.
I created some entries in the Wine-registry and made some changes in the TB-addon-file mpe.js.
My solution seams to work, but could do better. If there are some interests, I will write more.
I think this could also work for contacts.
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

TreeNode hat geschrieben:Hey,

I think I managed to sync the calendar of Linux Thunderbird without installing Thunderbird in wine.
I use MyPhoneExplorer 1.8.8, Wine 2.0.1 and winetricks.
I created some entries in the Wine-registry and made some changes in the TB-addon-file mpe.js.
My solution seams to work, but could do better. If there are some interests, I will write more.
I think this could also work for contacts.
I'd been keen to try this out.
TreeNode
Beiträge: 8
Registriert: Fr 12. Mai 2017, 19:59

Beitrag von TreeNode »

It is a it of copy an paste. I hope the instructions are clear, if not ask.

1. Create Reg-Entrie:
[code][HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\thunderbird.exe]
@="C:\\Program Files\\Mozilla Thunderbird\\thunderbird.bat"
"Path"="C:\\Program Files\\Mozilla Thunderbird"[/code]

2. create the Folder “Mozilla Thunderbird”
3. create in this folder the file thunderbird.bat
4. open thunderbird.bat and paste [code]/usr/lib/thunderbird/thunderbird.sh %1 %2[/code]
5. create a symbolic-link as usual in Application Data in wine to /.thunderbird and name it Thunderbird
6. install the MyPhoneExplorer-Addon in Thunderbird
7. create the File extensions.rdf in your thunderbird-Profile-Folder and paste:


[code]<?xml version="1.0"?>
<RDF:RDF xmlns:NS1="http://www.mozilla.org/2004/em-rdf#"
xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Seq RDF:about="urn:mozilla:item:root">
<RDF:li RDF:resource="urn:mozilla:item:de-DE@dictionaries.addons.mozilla.org"/>
<RDF:li RDF:resource="urn:mozilla:item:{972ce4c6-7e08-4474-a285-3208198ce6fd}"/>
<RDF:li RDF:resource="urn:mozilla:item:{e2fda1a4-762b-4020-b5ad-a41df1933103}"/>
<RDF:li RDF:resource="urn:mozilla:item:myphoneexplorer@fjsoft.at"/>
</RDF:Seq>
<RDF:Description RDF:about="urn:mozilla:item:{e2fda1a4-762b-4020-b5ad-a41df1933103}"
NS1:installLocation="app-profile"
NS1:version="4.7.8"
NS1:optionsURL="chrome://messenger/content/preferences/preferences.xul"
NS1:iconURL="chrome://calendar/skin/cal-icon32.png"
NS1:name="Lightning"
NS1:description="An integrated calendar for Thunderbird"
NS1:creator="Mozilla Calendar Project"
NS1:homepageURL="http://www.mozilla.org/projects/calendar/">
<NS1:type NC:parseType="Integer">2</NS1:type>
<NS1:targetApplication RDF:resource="rdf:#$GqnK52"/>
</RDF:Description>
<RDF:Description RDF:about="urn:mozilla:item:myphoneexplorer@fjsoft.at"
NS1:installLocation="app-profile"
NS1:version="2.0.19"
NS1:optionsURL="chrome://myphoneexplorer/content/mpeOptions.xul"
NS1:iconURL="chrome://myphoneexplorer/skin/icon.png"
NS1:name="MyPhoneExplorer"
NS1:description="MyPhoneExplorer Synchronisation"
NS1:creator="F.J. Wechselberger, N. Pueschel"
NS1:homepageURL="http://www.fjsoft.at/">
<NS1:type NC:parseType="Integer">2</NS1:type>
<NS1:targetApplication RDF:resource="rdf:#$GqnK52"/>
</RDF:Description>
<RDF:Description RDF:about="urn:mozilla:item:{972ce4c6-7e08-4474-a285-3208198ce6fd}"
NS1:installLocation="app-global"
NS1:version="3.1.11"
NS1:internalName="classic/1.0"
NS1:locked="true"
NS1:appManaged="true"
NS1:name="Thunderbird (default)"
NS1:description="The default theme"
NS1:creator="Arvid Axelsson"
NS1:contributor="Mozilla Contributors">
<NS1:type NC:parseType="Integer">4</NS1:type>
<NS1:targetApplication RDF:resource="rdf:#$5OIGm1"/>
</RDF:Description>
<RDF:Description RDF:about="urn:mozilla:item:de-DE@dictionaries.addons.mozilla.org"
NS1:installLocation="app-profile"
NS1:version="2.0.2"
NS1:name="German Dictionary"
NS1:description="German dictionary (new Orthography) for spellchecking in Mozilla products. Using igerman98 dictionary version 20091006."
NS1:creator="Robert Kaiser, using igerman98 dictionary by Björn Jacke">
<NS1:type NC:parseType="Integer">2</NS1:type>
<NS1:localized RDF:resource="rdf:#$.7h6d1"/>
<NS1:targetApplication RDF:resource="rdf:#$+7h6d1"/>
<NS1:targetApplication RDF:resource="rdf:#$08h6d1"/>
<NS1:targetApplication RDF:resource="rdf:#$18h6d1"/>
<NS1:targetApplication RDF:resource="rdf:#$28h6d1"/>
<NS1:targetApplication RDF:resource="rdf:#$38h6d1"/>
</RDF:Description>
</RDF:RDF>[/code]




8. modify the mpe.js in thunderbird-Profile-Folder/extension/myphoneexplorer@fjsoft.at/components
I changed only the RegRead and Run, just replace them:

[code]function RegRead(subkey,valuename)
{
Components.classes["@mozilla.org/net/osfileconstantsservice;1"].getService(Components.interfaces.nsIOSFileConstantsService).init();
var out = '';
var path = OS.Constants.Path.homeDir+'/.wine/user.reg';

var lines = ReadFile(path);
var reg = false;
var op;
subkey = subkey.split('\\').join('\\\\');

for (i = 1;lines.length > i;i++) {
if(lines[i].includes('['+subkey+']')){
reg=true;
}
if(lines[i]==''){
reg=false;
}
if(reg){
op = lines[i].substring(1,lines[i].indexOf('=')-1);
if(op==valuename){
out=lines[i].substring(lines[i].indexOf('=')+2,lines[i].length-1);
if(out.includes('\\')){ //anpassen des Pfade
out=out.replace('C:','drive_c');
out = out.split('\\\\').join('/');
out=OS.Constants.Path.homeDir+'/.wine/'+out;
}
return (out);
}
}
}
return (out);
}

and

Run: function(args)
{
var file = Components.classes["@mozilla.org/file/local;1"].createInstance(Components.interfaces.nsILocalFile);
var process = Components.classes["@mozilla.org/process/util;1"].createInstance(Components.interfaces.nsIProcess);

var mypath = RegRead("Software\\MyPhoneExplorer", "PathToExe");
var path = "/usr/bin/wine"

if (path.length != 0) {
try
{
file.initWithPath(path);
process.init(file);
process.run(false, [mypath,args], 2);
return;
}
catch(ex)
{
Components.utils.reportError('Could not run ' + path + ex );
return;
}
}
Components.utils.reportError("Could not find MyPhoneExplorer.exe");
},[/code]



have fun
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

OK - I'll try that in a few days time and let you know.
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

Hi,

Sorry to stumble at the first hurdle, but I am no windows expert. I don't understand your regedit syntax.

I understand I need a new "App Paths" key (which doesn't exist in a clean wine registry) but I don't understand what the rest is. Are they keys, data, strings? What syntax is "@="?

I'm using regedit (from winetricks).
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

Can you post a .reg file so I can just run that?
Mister_slowhand
Beiträge: 13
Registriert: Mi 10. Mai 2017, 15:19

Beitrag von Mister_slowhand »

TreeNode, thantks for the idea, I'm trying !!

As I use "playonlinux", this won't work as you have the path to the standard wine in the mpe.js file.
Time to clone my VM and try a dry Wine installation...

1. Create Reg-Entrie:

Code: Alles auswählen

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\thunderbird.exe]
@="C:\\Program Files\\Mozilla Thunderbird\\thunderbird.bat"
"Path"="C:\\Program Files\\Mozilla Thunderbird"
Pastim, you start by creating the new key (right click on the "App Path" label on the left) that you name "thunderbird.exe".
Then, in this key, you have a default value. This is the "@", you edit this entry and add the path to the "installation" directory.
Then, on the right panel, you right-click and choose "new/string" that you'll name "Path" and edit the value to the Thunderbird directory.
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

Pastim, you start by creating the new key (right click on the "App Path" label on the left) that you name "thunderbird.exe".
Then, in this key, you have a default value. This is the "@", you edit this entry and add the path to the "installation" directory.
Then, on the right panel, you right-click and choose "new/string" that you'll name "Path" and edit the value to the Thunderbird directory.
OK - Thanks - got that bit done.
One more problem. I cannot find the MyPhoneExplorer add-on for thunderbird. I have no idea why - I have installed it in the past in the wine version. Searching in thunderbird add-ons gets no result. Can you find it? Is it to do with being a linux version?
TreeNode
Beiträge: 8
Registriert: Fr 12. Mai 2017, 19:59

Beitrag von TreeNode »

The MyPhoneExplorer-Addon is in the Folder of MyPhoneexplorer. it is a .xpi file.
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

TreeNode hat geschrieben:The MyPhoneExplorer-Addon is in the Folder of MyPhoneexplorer. it is a .xpi file.
So it is - thank you very much. :)
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

I have now got it all installed, DLLs registered and so on, and mpe runs.

When I try to set up the contacts (or calendar) folder to sync it says "Folder Structure from Thunderbird cannot be listed". Any ideas?
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

When I start up and connect I see the correct calendar and contacts on my phone.

When I try to set the sync options for my calendar, looking at the log I get:

20:58:25.01 ListCalendars, Profile=default
20:58:35.02 ErrMsg: Folder structure from Thunderbird could not be listed!
20:58:43.38 OK pressed in settingswindow
20:58:43.41 Set first swap of settings
20:58:43.42 Apply new holidays
20:58:43.42 Holidays applied
20:58:43.42 Second swap of settings set
20:58:43.42 Everything is done
20:58:46.53 Refresh ComDescriptions...
20:58:46.61 Error in StartFritzboxSearch: 429 ActiveX component can't create object
20:58:47.63 Device driver info:
20:58:47.63 Devices with ADB Interface:
20:58:47.63 ADB Devices:
20:58:47.63 Portable devices:
20:58:47.63 Unknown devices:
TreeNode
Beiträge: 8
Registriert: Fr 12. Mai 2017, 19:59

Beitrag von TreeNode »

can you post the Reg-Entries and Subentriy of

HKEY_CURRENT_USER\Software\MyPhoneExporer
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

TreeNode hat geschrieben:can you post the Reg-Entries and Subentriy of

HKEY_CURRENT_USER\Software\MyPhoneExporer
I will in a while. However, I wonder if I have been a bit dim. When creating the previous reg entries I read the paths as needing single \ characters, not double ones, and without the leading a trailing " marks. Was that wrong?
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

TreeNode hat geschrieben:can you post the Reg-Entries and Subentriy of

HKEY_CURRENT_USER\Software\MyPhoneExporer
OK - here it is:

Language - English.ing
PathToExe - C:\Program Files\MyPhoneExplorer\MyPhoneExplorer.exe
Users - 203F............

And under Mozilla:

Default - (value not set)
Calendar - moz-profile-calendar://
MozillaAddressBooks - C:\users\crusty\Application Data\MyPhoneExplorer\MozillaAddressBooks
MozillaCalendars - C:\users\crusty\Application Data\MyPhoneExplorer\MozillaCalendars
MozillaItems - C:\users\crusty\Application Data\MyPhoneExplorer\MozillaItems

None of the last three files exist in C:\users\crusty\Application Data\MyPhoneExplorer\
Mind you, they don't exist in my old wine setup either, so I'm not sure what this means.
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

I thought I had found the problem. I have several wine configurations, and the extension code you supplied mentions .wine twice. I have changed this to match my wine directory. However I still get the same error.
Pastim
Beiträge: 85
Registriert: Fr 17. Jun 2011, 22:56

Beitrag von Pastim »

I found a way to get it all to work on my system.

I installed a clean 32 bit .wine system and inslalled mpe to that. It was initially reluctant to read the thunderbird directories (giving errors about accessing them), but after a couple of tries it seemed to settle down and now runs OK.

Thanks very much indeed. This is an excellent simplification for running on linux.
Mister_slowhand
Beiträge: 13
Registriert: Mi 10. Mai 2017, 15:19

Beitrag von Mister_slowhand »

I've had the same error you had.

but I run a 64bits system, as MPE is installed in "C:\Program Files (x86)\MyPhoneExplorer'.

And just like you, I started working out of nowhere after a while ??
Maybe it's about the authorisation you give to the plug-in in Thunderbird ? On first run, there is a confirmation asked in TBird, I don't see it in the Linux install ?

The only thing that will be missing on Linux would be the notes sync ? I use Davical to sync everything (Android syncs events and tasks through MPE to keep the categories...), but I haven't found a vNotes server yet.
Antworten