LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-08-2019, 08:00 AM   #1
rorqual
LQ Newbie
 
Registered: Sep 2019
Location: Melb, Aus
Distribution: Ubuntu 18.04
Posts: 5

Rep: Reputation: Disabled
jpilot - access two sets of Palm PIM info from under one user via shell script


I have jpilot 1.8.2 installed to Ubuntu Bionic 18.04 LTS. Also installed were all the additional supporting software requirements listed at the jpilot.org website.

I no longer use any Palm handhehld hardware (no current requirement to Hotsync devices) but need to access two sets of Palm Desktop address, calendar, memo, etc PIM info created and stored using two separate devices some years ago.

Data was exported from Palm Desktop v4.1.4 running on WinXP. Dataset1 was subsequently imported into jpilot 1.8.2 on my Ubuntu system via its GUI. The import happened with a few data errors, but I haven't yet noticed any glaring omissions or corruption, the result appears to be acceptable.

Jpilot documentation gives a method to enable access to another set (or multiple sets) of Palm PIM data under the same Linux user via a shell script. Here is the method:
Quote:
Environment variables

J-Pilot uses the JPILOT_HOME environment variable to make it easy to allow multiple pilots to be synced under the same unix user. Just set JPILOT_HOME to the directory you want jpilot to use. For example, I have 2 palm pilots. I can sync the one I use all the time into /home/judd. The other one I can sync into /home/judd/palm2 by using this script:
Code:
#!/bin/bash
JPILOT_HOME=/home/judd/palm2
jpilot
Despite my efforts I could not get this to work.

Here is what I tried...
1. Open an instance of terminal and run nano script editor.
2. Create the following script:
Code:
#!/bin/bash
JPILOT_HOME=/home/username/.JJJpalm
jpilot
3. Saved script from nano with Ctrl+X to /home/username directory. The script file was named "AAAjpilot.sh".
4. Directory /home/username/.JJJpalm was created - where I intended to store the second set of Palm PIM data. Directory was empty.
5. File permissions of script were changed thus:
Code:
$ ls -l AAAjpilot.sh
(above to view and confirm existing file permissions)
$ sudo chmod 774 AAAjpilot.sh
(above to change file permissions to allow script to be executed)
When Dataset1 was imported to jpilot the program stored its data in the directory /home/username/.jpilot . The shell script is intended, I think, to force jpilot to use the directory detailed in the script. However, when I ran the script it did not access or create new empty database files in the .JJJpalm directory I had created for Dataset2. It instead accessed the directory .jpilot to which Dataset1 had been imported.

I'm new to Linux so don't know what went wrong here.

I killed jpilot and renamed the directory /home/username/.jpilot to /home/username/.jpilot_dataset1 . Launching jpilot after that caused it to create a new /home/username/.jpilot directory containing all the necessary files ready to import Palm data files into. I imported Dataset2 successfully into this new .jpilot directory.

Although it is now possible for me to access each of the two imported datasets by going into the /home/username directory and temporarily renaming the .jpilot (.jpilot_dataset2) and .jpilot_dataset1 directories I would prefer a neater, quicker, more direct and more convenient way of getting there.

Advice to get jpilot's environment variable working via shell script would be appreciated.
 
Old 09-09-2019, 05:31 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
From the documentation. Emphasis added:
Quote:
J-Pilot uses the JPILOT_HOME environment variable to make it easy to allow multiple pilots to be synced under the same user. Just set JPILOT_HOME to the directory you want J-Pilot to use. Be sure to export it also.
so
Code:
#!/bin/bash
export JPILOT_HOME=/home/judd/palm2
jpilot
 
1 members found this post helpful.
Old 09-09-2019, 10:08 PM   #3
rorqual
LQ Newbie
 
Registered: Sep 2019
Location: Melb, Aus
Distribution: Ubuntu 18.04
Posts: 5

Original Poster
Rep: Reputation: Disabled
Thank you, scacey, that worked. Result was slightly different to what I'd expected though.

Transposing to the example I created:
Code:
#!/bin/bash
export JPILOT_HOME=/home/username/.JJJpalm
jpilot
This didn't pick up dataset2 already installed in directory .JJJpalm. Instead it created a new directory /home/username/.JJJpalm/.jpilot . After copying dataset2 files into it the new .jpilot directory the job was done.
 
Old 09-09-2019, 10:17 PM   #4
rorqual
LQ Newbie
 
Registered: Sep 2019
Location: Melb, Aus
Distribution: Ubuntu 18.04
Posts: 5

Original Poster
Rep: Reputation: Disabled
Oops, repeat post.

Last edited by rorqual; 09-09-2019 at 10:18 PM. Reason: delete repeat
 
Old 09-09-2019, 11:01 PM   #5
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,727

Rep: Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211Reputation: 2211
Quote:
Originally Posted by rorqual View Post
Thank you, scacey, that worked. Result was slightly different to what I'd expected though.

Transposing to the example I created:
Code:
#!/bin/bash
export JPILOT_HOME=/home/username/.JJJpalm
jpilot
This didn't pick up dataset2 already installed in directory .JJJpalm. Instead it created a new directory /home/username/.JJJpalm/.jpilot . After copying dataset2 files into it the new .jpilot directory the job was done.
Yup. That’s because the variable is JPILOT_HOME. You probably want to set up a home for each user. They’d each have a .jpilot directory. Note that the home probably doesn’t need to be hidden.

Glad I could help.

Last edited by scasey; 09-09-2019 at 11:05 PM.
 
Old 09-10-2019, 12:02 AM   #6
rorqual
LQ Newbie
 
Registered: Sep 2019
Location: Melb, Aus
Distribution: Ubuntu 18.04
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by scasey View Post
You probably want to set up a home for each user. They’d each have a .jpilot directory. Note that the home probably doesn’t need to be hidden.
I considered having a home for each user but I need to access Dataset2 only occasionally. Dataset1 is my primary Palm/jpilot dataset. Leaving things the way they are I can get to it quickly by hitting superkey > j > enter. That launches jpilot with Dataset1 imported. I made an alias for jpilot-dataset2.sh that helps me get to Dataset2 quickly enough via terminal.

Re having the Dataset2 jpilot home directory hidden, listing directories and files from terminal makes this practice moot; ls -a command reveals everything. But keeping it hidden helps keep all the hidden jpilot directories near each other in the list, and easy to find.

Thanks again.

Last edited by rorqual; 09-10-2019 at 12:24 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
sync yahoo PIM with linux PIM jst1 Linux - Software 2 07-23-2009 08:14 AM
Unable to HotSync with JPilot and Palm Zire 71 TheOneKEA Linux - Laptop and Netbook 1 01-06-2007 12:58 PM
tools for Palm (gnome-pilot, kpilot, jpilot....) altella Mandriva 3 02-24-2006 12:42 PM
Can't sync Palm Vx with Kpilot or Jpilot, but can with pilot-xfer ShaneK Linux - Hardware 1 08-27-2005 05:31 PM
Jpilot will not hotsync with palm Zire 21 in Fedora Core 2 or 3 sabot Linux - Hardware 0 02-05-2005 08:38 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:23 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration