desert-island

[Previous entry: "Life with the A730W (Episode 2)"] [Main Index]

06/25/2005: "Howto share/transfer clipboard between pda and desktop"

One of the most useful features that the MC218 (Series5/Series5a) has is the ability to share its clipboard with the desktop. With Windoze and Epoc Connect (PsiWin) this is achieved using CopyAnywhere. Under Linux and KDE one could get the same functionality using Klipsi which is part of plptools.

Being a systems administrator and web developer I keep the login/password info for hundreds of accounts on my MC218 and the ability to quickly access them and transfer them to the desktop via the clipboard is a huge timesaver. Thus I was quite anxious to be able to replicate this kind of functionality on the A730W.

I am only interested in free (as in beer) software and my search turned up 2 possible solutions:
- Remote Keyboard from TranCreative
- OPClip from OPByte Software

Remote Keyboard worked intermittently under Windoze and the telnet function (mainly for *nix clients) did not work at all. It's a shame because if it did function as advertised then it would be a very useful program. But as it is a commercial program turned freeware I doubt whether TranCreative will be supporting it anymore.

OPClip works as advertised but only comes with a Windoze client.

After some more rummaging through the freeware for pocket pc sites (yes I'm proud to be a cheapskate big grin) I found a gem in the form of nScriptm. This gives me the means to write my own clipboard sharing utility.

PDA Requirements
nScriptm installed on your pda

Desktop requirements
KDE
Klipper
KHotKeys
synce and you will probably want the KDE integration as well

How it works
A plain text file residing on the pda acts as the container for the transfer of the clipboard. Two programs are required, one running on the desktop and one running on the pda. They both do a similar same job, that is:

- get contents of the clipboard and write it to the shared file
- read from the shared file and put contents onto the clipboard

The program running on the desktop uses KDE's dcop mechanism to access & manipulate the clipboard via Klipper and the pcp, prm programs that are part of synce.


Prepare desktop
1) Download multiclip.sh, save it somewhere in your path and make it executable.

If run from the command line:

$ multiclip.sh export

will write the contents of the desktop clipboard to the shared file on the pda. And:
$ multiclip.sh import

will read the contents of the shared file on the pda and place it onto the desktop clipboard.


2) Configure KHotKeys
Open up your KDE Control Centre and find the KHotKeys panel.

Add a New Group and fill in the details:
multiclip-01 (10k image)

Add a New Action and fill in the General tab:
multiclip-02 (12k image)

Fill in the Keyboard Shortcut tab:
multiclip-03 (10k image)

Finally the Command/URL Settings tab:
multiclip-04 (10k image)

Create another New Action, this time for the import action, don't forget to use import instead of export in the Command/URL Settings tab!

To finish off, click on Global Settings > General Settings and make sure that the Disable KHotKeys daemon checkbos is NOT checked, then click OK:
multiclip-05 (11k image)

Prepare pda
1) Download multiclip.ns, save it somewhere on your pda.

2) Create the shortcuts
You need to create 3 shortcuts ...

multiclip.lnk
65#"\Program Files\utils\ns.exe" "\My Documents\macros\multiclip.ns"


multiclip-import.lnk
30#"\Program Files\utils\ns.exe" "\My Documents\macros\multiclip.ns" import


multiclip-export.lnk
30#"\Program Files\utils\ns.exe" "\My Documents\macros\multiclip.ns" export


... obviously you will have to adjust your shortcuts to reflect where you installed nScriptm and where your multiclip.ns lives.

NB here import means read contents of shared file and place onto pda clipboard, and export means put contents of the pda clipboard into the shared file.

3) Assign shortcuts to hardware buttons
Which buttons you assign them to is entirely up to you. You can opt not to assign any buttons if you wish but then using the thing would be very cumbersome indeed.

Using multiclip
Transferring the clipboard either way is a 2 step process (unfortunately).

To transfer from desktop to pda:

- in KDE press hotkey assigned to export
- in pda press hardware button assigned to import

To transfer from pda to desktop:

- in pda press hardware button assigned to export
- in KDE press hotkey assigned to import

Advanced features!
If you invoke multiclip.ns without any parameters ie if you use multiclip.lnk then you'll be presented with a dialog box:
multiclip-06 (14k image)
Here you can select select a previously used clip (multiclip keeps a history of the last 99 clips) and then either Copy to the pda clipboard or Export to the shared clipboard. The clips history is stored in a directory called clips which is created in the directory that multiclip.ns resides in. Thus if multiclip.ns was stored in \My Documents\macros\multiclip.ns then the clips history will be stored in the directory \My Documents\macros\clips (this directory is created automatically). Each clip in the history is stored as a separate file and are named _clip-??.txt. To remove unwanted clips from the history simply delete the corresponding file, they will automatically be re-ordered each time multiclip is started.

If you scroll right down to the bottom of the list:
multiclip-07 (13k image)
you can see there's a list of dates and times in different formats, these can also be selected and used in the same way as the other clips.

The last button is for invoking ClipMgr, a very handy program for storing and retrieving often used pieces of text.

That just about wraps it up. Enjoy smile


nav:
home
archives
email

June 2005
SMTWTFS
   1234
567891011
12131415161718
19202122232425
2627282930  
links:
Coming soon ...

Powered by Greymatter | Hosted by Memebot