Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-10 Thread Rui Nibau

Le mer. 10 avril 2013 08:56:40 CEST, Jaap Karssenberg a écrit :


We use the temp dir given by the standard tempfile module, it
depends on environment variables (see
http://docs.python.org/2/library/tempfile.html). Apparently the
firefox process has another environment than the terminal process.
Sounds like I should take care in zim that the socket location is
uniquely defined and not depending on this temporary file. But not
sure what would be a robust way to determine such a location.
Regards,
Jaap



It's seems to be a recent move in Fedora : the TMPDIR  variable 
pointing to /var/tmp is hard coded in Firefox script :


From /usr/bin/firefox:

   ## Use $MOZ_TMPDIR if set. Otherwise use /var/tmp instead of /tmp
   ## because of 1GB /tmp limit in Fedora 18 and later.
   ## See: https://bugzilla.redhat.com/show_bug.cgi?id=867073

I could define the $MOZ_TMPDIR variable pointing to /tmp, but it will 
mean that an addon change the behavior of all Firefox, which I think 
will not be quit good.


I continue my investigation on how nsIProcess (interface that provides 
a way to run third party applications from Firefox) works, to see if I 
can define a tmp dir only for the process I create to run Zim.


Regards,

--
Rui Nibau
email: rui.ni...@omacronides.com
im: rui.ni...@gmail.com
site: http://omacronides.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-09 Thread Rui Nibau

Hi Jaap, Nomnex and all.

Le 08/04/2013 13:32, Jaap Karssenberg a écrit :


What do you see if you open zim mulitple notebooks without using
zim-clip, or when you open the same notebook multiple times without
zim-clip ?

If similar behavior it is unrelated to zim-clip and likely due to the
trayicon plugin and/or XFCE panel. If so, please open a bug report for
further discussion.

Regards,

Jaap



I see why there is two tray icons (and two instances) when using zim-clip.

(1) When I Open Zim from an application launcher ( ~/path/to/zim.py) I 
have 3 processes :



--ipc-server-main /tmp/zim-rnb/zim-server-socket 30


(2) When i do an action from zim-clip (/path/to/zim.py --plugin 
quicknote ...), it creates 3 new processes :



--ipc-server-main /var/tmp/zim-rnb/zim-server-socket 30


(3) Now running a zim-clip action with zim closed. It creates 3 zim 
processes :



--ipc-server-main /var/tmp/zim-rnb/zim-server-socket 30


(4) If I run now Zim from terminal (/path/to/zim.py), it creates 3 new 
processes :



--ipc-server-main /tmp/zim-rnb/zim-server-socket 30


So when I run Zim from Gnome, zim-server-socket is created in 
/tmp/zim-[user] ; when I run Zim from zim-clip/Firefox, 
zim-server-socket is created in /var/tmp/zim-[user].



For those who want to test, here's a simple Firefox add-on that creates 
a widget which runs Zim (zim folder needs to be defined in the 
preference page):


http://omacronides.com/tmp/run-zim.xpi

xpi are simple zip archives. Source code is in resources/run-zim/lib/main.js

I have to find why zim-server-socket is created in a different place...


Regards,

--
Rui Nibau
email: rui.ni...@omacronides.com
im: rui.ni...@gmail.com
site: http://omacronides.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-08 Thread nomnex
 On Mon, 8 Apr 2013 08:56:51 +0200
 Jaap Karssenberg jaap.karssenb...@gmail.com wrote:

 n Sun, Apr 7, 2013 at 10:41 AM, Rui Nibau
 rui.ni...@omacronides.comwrote:
 
  Le 06/04/2013 23:14, nomnex a écrit :
 
  I take the opportunity to ask you a question:
  When I have an instance of Zim already running (notebook 'foo'
  open), and I copy some web content to the same notebook, Zim-clip
  creates another instance of the Zim tray icon on the task bar. It
  happens on a XFCE DE. Is there a setting to prevent it?
 
  NB: I do not use the Tray icon preference create a separate icon
  for each notebook
 
 
  I can't tell you. I'm on Gnome 3 and each action of zim-clip (clips
  or marks) just use an already opened instance or open a new
  instance if Zim was closed.
 
 
 Nomnex, do you perhaps run zim with the --standalone option
 enabled ?
 
 If so that will cause each call to start a new process. Otherwise zim
 should simply connect to the existing process to execute requests.

no, I don't. I wonder if another XFCE user experienced the same thing?
As long as I start Zim using the zim-clip, all the notebooks I open
use a unique tray icon.

But, if I open a Zim notebook first, and then use the Zim-clip addon; it
creates another instance of the tray icon. I can left click (to see all
the open notebooks)/right click (to open another notebook) on the
zim-clip tray icon (the second one), but I can't left/right click on the
zim tray icon (the first instance) anymore.

What I usually do, is to close the first tray icon.

Rui doesn't see that on Gnome 3. It's a minor annoyance, and I don't
know if it is related to the Xfce panel or a configuration?

-- 
nomnex nom...@gmail.com
Freenode: nomnex
Registered Linux user #505281. Be counted at: http://linuxcounter.net

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-08 Thread Jaap Karssenberg
On Mon, Apr 8, 2013 at 10:23 AM, nomnex nom...@gmail.com wrote:

  On Mon, 8 Apr 2013 08:56:51 +0200
  Jaap Karssenberg jaap.karssenb...@gmail.com wrote:
  Nomnex, do you perhaps run zim with the --standalone option
  enabled ?
 
  If so that will cause each call to start a new process. Otherwise zim
  should simply connect to the existing process to execute requests.

 no, I don't. I wonder if another XFCE user experienced the same thing?
 As long as I start Zim using the zim-clip, all the notebooks I open
 use a unique tray icon.

 But, if I open a Zim notebook first, and then use the Zim-clip addon; it
 creates another instance of the tray icon. I can left click (to see all
 the open notebooks)/right click (to open another notebook) on the
 zim-clip tray icon (the second one), but I can't left/right click on the
 zim tray icon (the first instance) anymore.

 What I usually do, is to close the first tray icon.

 Rui doesn't see that on Gnome 3. It's a minor annoyance, and I don't
 know if it is related to the Xfce panel or a configuration?


What do you see if you open zim mulitple notebooks without using zim-clip,
or when you open the same notebook multiple times without zim-clip ?

If similar behavior it is unrelated to zim-clip and likely due to the
trayicon plugin and/or XFCE panel. If so, please open a bug report for
further discussion.

Regards,

Jaap
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-08 Thread Rui Nibau

Hi Nomnex, hi all.

Le 08/04/2013 10:23, nomnex a écrit :


no, I don't. I wonder if another XFCE user experienced the same thing?
As long as I start Zim using the zim-clip, all the notebooks I open
use a unique tray icon.

But, if I open a Zim notebook first, and then use the Zim-clip addon; it
creates another instance of the tray icon. I can left click (to see all
the open notebooks)/right click (to open another notebook) on the
zim-clip tray icon (the second one), but I can't left/right click on the
zim tray icon (the first instance) anymore.



I see know what you mean. I can reproduce the behavior: if Zim is 
already opened, using zim-clip opens another tray icon.


That's strange.

Use case 1 : Zim already open

* Marking a page with zim-clip : opens a second tray icon (instance 1 + 
instance 2).
* Marking another page with zim-clip : still 2 tray icons  (instance 1 + 
instance 2).


Use case 2 : Zim already open

* Marking a page with zim-clip : opens a second tray icon (instance 1 + 
instance 2).
* Marking another page with zim-clip : still 2 tray icons (instance 1 + 
instance 2).

* Closing the first tray icon  (instance 2)
* Marking a page with zim-clip : only one tray icon (instance 2)

Use case 3 : Zim already open

* Marking a page with zim-clip : opens a second tray icon (instance 1 + 
instance 2).
* Marking another page with zim-clip : still 2 tray icons (instance 1 + 
instance 2).

* Closing the second tray icon (instance 1)
* Marking a page with zim-clip : opens a second tray icon (instance 1 + 
instance 2).


Use case 4: Zim closed.

* Marking a page with zim-clip : opens a tray icon (instance 1)
* Marking another page with zim-clip : still one tray icon  (instance 1)

Trying to find out what's happening.

--
Rui Nibau
email: rui.ni...@omacronides.com
im: rui.ni...@gmail.com
site: http://omacronides.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-07 Thread Rui Nibau

Le 06/04/2013 23:14, nomnex a écrit :


Thanks for the links. A little feedback now. I launched firefox -p with
a test profile. installed v. 0.5.0. The first command copy to Zim
took quite a long time (~30 sec.), the following copy to Zim commands
were fast. I installed 0.5.2. No problem there.

After logging out (vs. terminating the FF process), I re-installed v.
0.5.2, on my default FF profile. You add-on now works as expected.
Great!


Glad to see it works.


I take the opportunity to ask you a question:
When I have an instance of Zim already running (notebook 'foo' open),
and I copy some web content to the same notebook, Zim-clip creates
another instance of the Zim tray icon on the task bar. It happens on a
XFCE DE. Is there a setting to prevent it?

NB: I do not use the Tray icon preference create a separate icon for
each notebook


I can't tell you. I'm on Gnome 3 and each action of zim-clip (clips or 
marks) just use an already opened instance or open a new instance if Zim 
was closed.


Regards,

--
Rui Nibau
email: rui.ni...@omacronides.com
im: rui.ni...@gmail.com
site: http://omacronides.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-06 Thread Rui Nibau

Le sam. 06 avril 2013 06:51:02 CEST, nomnex a écrit :


Unfortunately, it's not working anymore on Fedora Linux/FF 19, for me.

The quick-note page (zim-clip) freezes, before to display a This window
might be busy and is not responding... message window.

Console message:
No chrome package registered for
chrome://dta-modules/content/support/filtermanager.js

Console warning:
Timestamp: 06/04/13 13:39:19
Warning: Unknown property '-moz-border-radius'.  Declaration dropped.
Source File:
http://www.textfugu.com/wp-content/themes/beveled/custom.css Line: 196



Hi Nomex.

Thanks for the report.

I use zim-clip 0.5.2 under Fedora with Firefox 19 (and now 20) myself. 
Never see the clips feature

freeze.

You must keep in mind that zim-clip is not a web page downloader - it's 
better suit to collected
some chunk of pages. To keep track of large amount of data, there's 
much better addons as

Scrapbook or Zotero.

I'll will try to find out if it occurs when you select a large amount 
of text and or pictures.


Regards,

--
Rui Nibau
email: rui.ni...@omacronides.com
im: rui.ni...@gmail.com
site: http://omacronides.com

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-06 Thread nomnex
 On Sat, 06 Apr 2013 10:13:41 +0200
 Rui Nibau rui.ni...@omacronides.com wrote:

snip
 
 For the other xpi, there are always available:
 
 0.5.2: http://omacronides.com/lab/ff-zim-clip/build/zim-clip-0.5.2.xpi
 0.5.1: http://omacronides.com/lab/ff-zim-clip/build/zim-clip-0.5.1.xpi
 0.5.0: http://omacronides.com/lab/ff-zim-clip/build/zim-clip-0.5.0.xpi

Thanks for the links. A little feedback now. I launched firefox -p with
a test profile. installed v. 0.5.0. The first command copy to Zim
took quite a long time (~30 sec.), the following copy to Zim commands
were fast. I installed 0.5.2. No problem there.

After logging out (vs. terminating the FF process), I re-installed v.
0.5.2, on my default FF profile. You add-on now works as expected.
Great!

I take the opportunity to ask you a question:
When I have an instance of Zim already running (notebook 'foo' open),
and I copy some web content to the same notebook, Zim-clip creates
another instance of the Zim tray icon on the task bar. It happens on a
XFCE DE. Is there a setting to prevent it?

NB: I do not use the Tray icon preference create a separate icon for
each notebook

--nomnex

-- 
nomnex nom...@gmail.com
Freenode: nomnex
Registered Linux user #505281. Be counted at: http://linuxcounter.net

___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Firefox addon - Zim-clip 0.5.2 : alternative location for Zim

2013-04-05 Thread Hilmar von Fintel

Thanks Rui, works beautifully now :-)

Hilmar

On 05/04/13 21:24, Rui Nibau wrote:

Hi all.

Here's a new version of Zim-clip. As jaap and Hilmar pointed out, it 
can be difficult to detect automatically where Zim is installed on 
Windows, except maybe reading the registry (but I don't know if it 
could be possible from an firefox addon). So, I change the option 'run 
from source' into an option 'run from alternative location'. So, if 
the location is provided, the addon search for 'zim.py' if it's the 
sources dir or for 'zim.exe' if we are on Windows.


Tested under Windows Seven.

Hope this one will work in (almost) all cases.

xpi: http://omacronides.com/lab/ff-zim-clip/build/zim-clip-0.5.2.xpi

If an error occurred while capturing or marking a page, you can always
see the error message in the Firefox error console (tools - Web 
Developer - error console). It seems that my log messages don't 
appear here - I have to find out why.


Regards,



___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp